Commit 150730d5 authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller

[IPV6] ROUTE: Purge clones on other trees when deleting a route.

Based on MIPL2 kernel patch.
Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 982f56f3
...@@ -1169,8 +1169,18 @@ int fib6_del(struct rt6_info *rt, struct nl_info *info) ...@@ -1169,8 +1169,18 @@ int fib6_del(struct rt6_info *rt, struct nl_info *info)
BUG_TRAP(fn->fn_flags&RTN_RTINFO); BUG_TRAP(fn->fn_flags&RTN_RTINFO);
if (!(rt->rt6i_flags&RTF_CACHE)) if (!(rt->rt6i_flags&RTF_CACHE)) {
fib6_prune_clones(fn, rt); struct fib6_node *pn = fn;
#ifdef CONFIG_IPV6_SUBTREES
/* clones of this route might be in another subtree */
if (rt->rt6i_src.plen) {
while (!(pn->fn_flags&RTN_ROOT))
pn = pn->parent;
pn = pn->parent;
}
#endif
fib6_prune_clones(pn, rt);
}
/* /*
* Walk the leaf entries looking for ourself * Walk the leaf entries looking for ourself
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment