diff options
author | Eric Dumazet <edumazet@google.com> | 2012-06-25 18:37:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-25 18:37:19 -0400 |
commit | fa809e2fd6e317226c046202a88520962672eac0 (patch) | |
tree | 1aec3e52fc38592894507dbff9c469297b32cb1d /net/ipv6/ip6_fib.c | |
parent | 8b8e4bc0391f8abbcdb9e1c54415bcc0f4f5a2a0 (diff) |
ipv6: fib: fix fib dump restart
Commit 2bec5a369ee79576a3 (ipv6: fib: fix crash when changing large fib
while dumping it) introduced ability to restart the dump at tree root,
but failed to skip correctly a count of already dumped entries. Code
didn't match Patrick intent.
We must skip exactly the number of already dumped entries.
Note that like other /proc/net files or netlink producers, we could
still dump some duplicates entries.
Reported-by: Debabrata Banerjee <dbavatar@gmail.com>
Reported-by: Josh Hunt <johunt@akamai.com>
Signed-off-by: Eric Dumazet <edumazet@google.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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 74c21b924a79..608327661960 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -1349,8 +1349,8 @@ static int fib6_walk_continue(struct fib6_walker_t *w) | |||
1349 | if (w->leaf && fn->fn_flags & RTN_RTINFO) { | 1349 | if (w->leaf && fn->fn_flags & RTN_RTINFO) { |
1350 | int err; | 1350 | int err; |
1351 | 1351 | ||
1352 | if (w->count < w->skip) { | 1352 | if (w->skip) { |
1353 | w->count++; | 1353 | w->skip--; |
1354 | continue; | 1354 | continue; |
1355 | } | 1355 | } |
1356 | 1356 | ||