]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arp: always override existing neigh entries with gratuitous ARP
authorIhar Hrachyshka <ihrachys@redhat.com>
Thu, 18 May 2017 19:41:21 +0000 (12:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 May 2017 17:26:45 +0000 (13:26 -0400)
commit7d472a59c0e5ec117220a05de6b370447fb6cb66
tree601cf49aa80d31c5805f2aa6b596b748560daf61
parentd9ef2e7bf99f59179b89d5c1c4d5b4919375daee
arp: always override existing neigh entries with gratuitous ARP

Currently, when arp_accept is 1, we always override existing neigh
entries with incoming gratuitous ARP replies. Otherwise, we override
them only if new replies satisfy _locktime_ conditional (packets arrive
not earlier than _locktime_ seconds since the last update to the neigh
entry).

The idea behind locktime is to pick the very first (=> close) reply
received in a unicast burst when ARP proxies are used. This helps to
avoid ARP thrashing where Linux would switch back and forth from one
proxy to another.

This logic has nothing to do with gratuitous ARP replies that are
generally not aligned in time when multiple IP address carriers send
them into network.

This patch enforces overriding of existing neigh entries by all incoming
gratuitous ARP packets, irrespective of their time of arrival. This will
make the kernel honour all incoming gratuitous ARP packets.

Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/arp.c