diff options
author | David Ahern <dsahern@gmail.com> | 2018-10-11 20:33:49 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-12 09:47:39 -0700 |
commit | 859bd2ef1fc1110a8031b967ee656c53a6260a76 (patch) | |
tree | 96f07d4fb9cc3ec82e5b60dd1aae6976aa87ead3 /include/net | |
parent | 7c6bb7d2faaf1ed7d78bafd712476e4cf2cf0d7d (diff) | |
download | op-kernel-dev-859bd2ef1fc1110a8031b967ee656c53a6260a76.zip op-kernel-dev-859bd2ef1fc1110a8031b967ee656c53a6260a76.tar.gz |
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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/neighbour.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 0874f7fc..f58b384 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -323,6 +323,7 @@ void __neigh_set_probe_once(struct neighbour *neigh); bool neigh_remove_one(struct neighbour *ndel, struct neigh_table *tbl); void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev); int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev); +int neigh_carrier_down(struct neigh_table *tbl, struct net_device *dev); int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb); int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb); int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb); |