From d9551924e13c0f525d472b689b1ab16398e8962f Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Fri, 20 Dec 2019 11:44:34 +0200 Subject: [PATCH] [restore_neighbors.py] build arp packet with correct hwsrc and psrc Otherwise, we can see that DUT after warm reboot sends ARP packets with management IP (10.112.71.4) $ sudo tcpdump -ni PortChannel0003 --direction out 16:33:40.572995 ARP, Request who-has 10.0.0.61 tell 10.112.71.4, length 28 All neighbors than are stil considered as STALE. Signed-off-by: Stepan Blyschak --- neighsyncd/restore_neighbors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neighsyncd/restore_neighbors.py b/neighsyncd/restore_neighbors.py index 73453ce7d2..63242bf1c1 100755 --- a/neighsyncd/restore_neighbors.py +++ b/neighsyncd/restore_neighbors.py @@ -194,7 +194,7 @@ def set_neigh_in_kernel(ipclass, family, intf_idx, dst_ip, dmac): def build_arp_ns_pkt(family, smac, src_ip, dst_ip): if family == 'IPv4': eth = Ether(src=smac, dst='ff:ff:ff:ff:ff:ff') - pkt = eth/ARP(op='who-has', pdst=dst_ip) + pkt = eth/ARP(op='who-has', pdst=dst_ip, psrc=src_ip, hwsrc=smac) elif family == 'IPv6': nsma = in6_getnsma(inet_pton(AF_INET6, dst_ip)) mcast_dst_ip = inet_ntop(AF_INET6, nsma)