From 0329b678802daaf04ac79cb3813317a93d727633 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com> Date: Tue, 28 Jan 2020 03:02:17 +0200 Subject: [PATCH] [restore_neighbors.py] build arp packet with correct hwsrc and psrc (#1158) Otherwise, we can see that DUT after warm reboot sends ARP packets with management IP (10.112.71.4) 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 61997ac0ef..935ebce166 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=ARP.who_has, pdst=dst_ip) + pkt = eth/ARP(op=ARP.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)