aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2006-08-23 20:22:55 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:55:53 -0400
commit150730d5a53b1bbb486101b2a5fb82ff0d3f916e (patch)
treed14162b46a962ee3f2e15efd59ff3fd79882ee9d /net
parent982f56f3a9be4651520c0fdd3d80a5d02e95a178 (diff)
[IPV6] ROUTE: Purge clones on other trees when deleting a route.
Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ip6_fib.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 6536e33d8353..f0fdaf182b3f 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1169,8 +1169,18 @@ int fib6_del(struct rt6_info *rt, struct nl_info *info)
1169 1169
1170 BUG_TRAP(fn->fn_flags&RTN_RTINFO); 1170 BUG_TRAP(fn->fn_flags&RTN_RTINFO);
1171 1171
1172 if (!(rt->rt6i_flags&RTF_CACHE)) 1172 if (!(rt->rt6i_flags&RTF_CACHE)) {
1173 fib6_prune_clones(fn, rt); 1173 struct fib6_node *pn = fn;
1174#ifdef CONFIG_IPV6_SUBTREES
1175 /* clones of this route might be in another subtree */
1176 if (rt->rt6i_src.plen) {
1177 while (!(pn->fn_flags&RTN_ROOT))
1178 pn = pn->parent;
1179 pn = pn->parent;
1180 }
1181#endif
1182 fib6_prune_clones(pn, rt);
1183 }
1174 1184
1175 /* 1185 /*
1176 * Walk the leaf entries looking for ourself 1186 * Walk the leaf entries looking for ourself