summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2017-08-03 13:28:22 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-03 15:36:00 -0700
commit7483cea79957312e9f8e9cf760a1bc5d6c507113 (patch)
tree1c7053e01df1e38f332a0f75a592bcafa6ac45cb /net/ipv6/ip6_fib.c
parentc5b12410fa591acb1d48e167b9bd0d2a7a38498d (diff)
downloadlinux-stable-7483cea79957312e9f8e9cf760a1bc5d6c507113.tar.gz
linux-stable-7483cea79957312e9f8e9cf760a1bc5d6c507113.tar.bz2
linux-stable-7483cea79957312e9f8e9cf760a1bc5d6c507113.zip
ipv6: fib: Unlink replaced routes from their nodes
When a route is deleted its node pointer is set to NULL to indicate it's no longer linked to its node. Do the same for routes that are replaced. This will later allow us to test if a route is still in the FIB by checking its node pointer instead of its reference count. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index fa27905de92e..fe193b48ef61 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1019,6 +1019,7 @@ add:
fn->fn_flags |= RTN_RTINFO;
}
nsiblings = iter->rt6i_nsiblings;
+ iter->rt6i_node = NULL;
fib6_purge_rt(iter, fn, info->nl_net);
rt6_release(iter);
@@ -1031,6 +1032,7 @@ add:
break;
if (rt6_qualify_for_ecmp(iter)) {
*ins = iter->dst.rt6_next;
+ iter->rt6i_node = NULL;
fib6_purge_rt(iter, fn, info->nl_net);
rt6_release(iter);
nsiblings--;