Skip to content

Commit

Permalink
[restore_neighbors.py] build arp packet with correct hwsrc and psrc (#…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
stepanblyschak authored and yxieca committed Jan 30, 2020
1 parent e237e12 commit 0329b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neighsyncd/restore_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0329b67

Please sign in to comment.