diff options
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r-- | net/ipv6/ip6_fib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index f4d7be77eb0f..268f476ef3db 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -658,6 +658,10 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, | |||
658 | ins = &iter->u.dst.rt6_next; | 658 | ins = &iter->u.dst.rt6_next; |
659 | } | 659 | } |
660 | 660 | ||
661 | /* Reset round-robin state, if necessary */ | ||
662 | if (ins == &fn->leaf) | ||
663 | fn->rr_ptr = NULL; | ||
664 | |||
661 | /* | 665 | /* |
662 | * insert node | 666 | * insert node |
663 | */ | 667 | */ |
@@ -1109,6 +1113,10 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp, | |||
1109 | rt6_stats.fib_rt_entries--; | 1113 | rt6_stats.fib_rt_entries--; |
1110 | rt6_stats.fib_discarded_routes++; | 1114 | rt6_stats.fib_discarded_routes++; |
1111 | 1115 | ||
1116 | /* Reset round-robin state, if necessary */ | ||
1117 | if (fn->rr_ptr == rt) | ||
1118 | fn->rr_ptr = NULL; | ||
1119 | |||
1112 | /* Adjust walkers */ | 1120 | /* Adjust walkers */ |
1113 | read_lock(&fib6_walker_lock); | 1121 | read_lock(&fib6_walker_lock); |
1114 | FOR_WALKERS(w) { | 1122 | FOR_WALKERS(w) { |