]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 13 Feb 2018 13:30:21 +0000 (07:30 -0600)
commitafe95ad6336fbaca69f21560c851bbf021c84fc6
treec75eb9ff148a5bc1dcac35a48000104cebb37db1
parent2527a7e2b8e91030f567001525d188c7e3c45f33
ipv6: change route cache aging logic

BugLink: http://bugs.launchpad.net/bugs/1749191
[ Upstream commit 31afeb425f7fad8bcf9561aeb0b8405479f97a98 ]

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: 1859bac04fb6 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
net/ipv6/route.c