]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: change route cache aging logic
authorWei Wang <weiwan@google.com>
Fri, 26 Jan 2018 19:40:17 +0000 (11:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2018 19:22:05 +0000 (14:22 -0500)
commit20585cd880298f33534e00420eb1dae05268b958
tree08c7751b1ab6d54456473683a01af5471867a0c0
parent2ae4ef66478fcbed33e75a5a26fb515e979887d5
ipv6: change route cache aging logic

In current route cache aging logic, if a route has both RTF_EXPIRE and
RTF_GATEWAY set, the route will only be removed if the neighbor cache
has no NTF_ROUTER flag. Otherwise, even if the route has expired, it
won't get deleted.
Fix this logic to always check if the route has expired first and then
do the gateway neighbor cache check if previous check decide to not
remove the exception entry.

Fixes: 9ec4fc933f2d ("ipv6: remove from fib tree aged out RTF_CACHE dst")
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c