Skip to content

Commit

Permalink
[IPV6]: Fix rtnetlink dump infinite loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Nov 12, 2005
1 parent 4f00555 commit efacfbc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1701,10 +1701,8 @@ static void fib6_dump_end(struct netlink_callback *cb)
fib6_walker_unlink(w);
kfree(w);
}
if (cb->args[1]) {
cb->done = (void*)cb->args[1];
cb->args[1] = 0;
}
cb->done = (void*)cb->args[1];
cb->args[1] = 0;
}

static int fib6_dump_done(struct netlink_callback *cb)
Expand Down

0 comments on commit efacfbc

Please sign in to comment.