Commit 00236277 authored by Kumar Sundararajan's avatar Kumar Sundararajan Committed by Sasha Levin

ipv6: fib: fix fib dump restart

Commit 2bec5a36 (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: default avatarDebabrata Banerjee <dbavatar@gmail.com>
Reported-by: default avatarJosh Hunt <johunt@akamai.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>

(cherry picked from commit fa809e2f)
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 88ada84e
......@@ -1420,7 +1420,7 @@ static int fib6_walk_continue(struct fib6_walker_t *w)
if (w->skip) {
w->skip--;
continue;
goto skip;
}
err = w->func(w);
......@@ -1430,6 +1430,7 @@ static int fib6_walk_continue(struct fib6_walker_t *w)
w->count++;
continue;
}
skip:
w->state = FWS_U;
case FWS_U:
if (fn == w->root)
......
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