]> git.baikalelectronics.ru Git - kernel.git/commit
net: Evict neighbor entries on carrier down
authorDavid Ahern <dsahern@gmail.com>
Fri, 12 Oct 2018 03:33:49 +0000 (20:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Oct 2018 16:47:39 +0000 (09:47 -0700)
commit0bdf9af4c8f2d3a3f627543716a392465f57ab32
tree96f07d4fb9cc3ec82e5b60dd1aae6976aa87ead3
parent4ac6b12fc8b2b97119588131b207edd3eff62c60
net: Evict neighbor entries on carrier down

When a link's carrier goes down it could be a sign of the port changing
networks. If the new network has overlapping addresses with the old one,
then the kernel will continue trying to use neighbor entries established
based on the old network until the entries finally age out - meaning a
potentially long delay with communications not working.

This patch evicts neighbor entries on carrier down with the exception of
those marked permanent. Permanent entries are managed by userspace (either
an admin or a routing daemon such as FRR).

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/neighbour.h
net/core/neighbour.c
net/ipv4/arp.c
net/ipv6/ndisc.c