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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Feb 2015 01:48:48 +0000 (17:48 -0800)
commitbd1f50c627afe99e374da23b76f0d0ee83244223
tree1f801a7a9751197785b0cf56317a0b2f87b10806
parent8c6dafeba6f8d1435f05e39142b50bc605f7a91c
udp_diag: Fix socket skipping within chain

[ Upstream commit 86f3cddbc3037882414c7308973530167906b7e9 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/udp_diag.c