diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-11-12 15:12:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-12 15:12:05 -0500 |
commit | efacfbcb6c88677809f44a574fbcd9824835dccb (patch) | |
tree | 6fea7fcaf7c979a0be6c370c3bb99736753e4ada /net | |
parent | 4f005551a8fac21b6fec8d10d57cd12d373d79e1 (diff) |
[IPV6]: Fix rtnetlink dump infinite loop
The recent change to netlink dump "done" callback handling broke IPv6
which played dirty tricks with the "done" callback. This causes an
infinite loop during a dump.
The following patch fixes it.
This bug was reported by Jeff Garzik.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/route.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index f7f42c3e96cb..a7a537b50595 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1701,10 +1701,8 @@ static void fib6_dump_end(struct netlink_callback *cb) | |||
1701 | fib6_walker_unlink(w); | 1701 | fib6_walker_unlink(w); |
1702 | kfree(w); | 1702 | kfree(w); |
1703 | } | 1703 | } |
1704 | if (cb->args[1]) { | 1704 | cb->done = (void*)cb->args[1]; |
1705 | cb->done = (void*)cb->args[1]; | 1705 | cb->args[1] = 0; |
1706 | cb->args[1] = 0; | ||
1707 | } | ||
1708 | } | 1706 | } |
1709 | 1707 | ||
1710 | static int fib6_dump_done(struct netlink_callback *cb) | 1708 | static int fib6_dump_done(struct netlink_callback *cb) |