udp_diag: Fix socket skipping within chain
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 23 Jan 2015 21:02:40 +0000 (08:02 +1100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jan 2015 08:02:41 +0000 (00:02 -0800)
commit86f3cddbc3037882414c7308973530167906b7e9
treea763a5c75a0f5d53e4247422039c9b685226b158
parent7d63585bf0a6c99382f97a5af71c5b5547fb58a4
udp_diag: Fix socket skipping within chain

While working on rhashtable walking I noticed that the UDP diag
dumping code is buggy.  In particular, the socket skipping within
a chain never happens, even though we record the number of sockets
that should be skipped.

As this code was supposedly copied from TCP, this patch does what
TCP does and resets num before we walk a chain.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp_diag.c