From 59ae61ee7587502c0446655ecbe3daa296498f56 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 7 Jun 2018 18:09:49 -0700 Subject: Gratuitous ARP packet handling only learn from a GARP packet if it is an update to an existing entry. Change-Id: I4c1b59cfedb911466e5e4c9756cf53a6676e1909 Signed-off-by: Neale Ranns --- test/vpp_neighbor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/vpp_neighbor.py') diff --git a/test/vpp_neighbor.py b/test/vpp_neighbor.py index e8ba3b28823..c08132d1d40 100644 --- a/test/vpp_neighbor.py +++ b/test/vpp_neighbor.py @@ -9,7 +9,7 @@ from vpp_object import * from util import mactobinary -def find_nbr(test, sw_if_index, ip_addr, is_static=0, inet=AF_INET): +def find_nbr(test, sw_if_index, ip_addr, is_static=0, inet=AF_INET, mac=None): nbrs = test.vapi.ip_neighbor_dump(sw_if_index, is_ipv6=1 if AF_INET6 == inet else 0) if inet == AF_INET: @@ -21,7 +21,11 @@ def find_nbr(test, sw_if_index, ip_addr, is_static=0, inet=AF_INET): for n in nbrs: if nbr_addr == n.ip_address[:s] \ and is_static == n.is_static: - return True + if mac: + if n.mac_address == mactobinary(mac): + return True + else: + return True return False -- cgit 1.2.3-korg