mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
UPSTREAM: 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>
Cherry-pick from: 7483cea799
Bug: 64978549
Change-Id: Ibfa54cf918084138b6b19437e9ef86bfaea5deae
This commit is contained in:
committed by
Amit Pundir
parent
cc0b17f6cc
commit
d8e59293ff
@@ -909,6 +909,7 @@ add:
|
||||
fn->fn_flags |= RTN_RTINFO;
|
||||
}
|
||||
nsiblings = iter->rt6i_nsiblings;
|
||||
iter->rt6i_node = NULL;
|
||||
fib6_purge_rt(iter, fn, info->nl_net);
|
||||
if (fn->rr_ptr == iter)
|
||||
fn->rr_ptr = NULL;
|
||||
@@ -923,6 +924,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);
|
||||
if (fn->rr_ptr == iter)
|
||||
fn->rr_ptr = NULL;
|
||||
|
||||
Reference in New Issue
Block a user