diff options
author | Patrick McHardy <kaber@trash.net> | 2010-03-26 20:27:49 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-26 20:27:49 -0700 |
commit | 4b97efdf392563bf03b4917a0b5add2df65de39a (patch) | |
tree | 4add83ac917bb6d8319fc48c64529fd607721151 /net/ipv4/devinet.c | |
parent | ac90a149361a331f697d5aa500bedcff22054669 (diff) | |
download | linux-exynos-4b97efdf392563bf03b4917a0b5add2df65de39a.tar.gz linux-exynos-4b97efdf392563bf03b4917a0b5add2df65de39a.tar.bz2 linux-exynos-4b97efdf392563bf03b4917a0b5add2df65de39a.zip |
net: fix netlink address dumping in IPv4/IPv6
When a dump is interrupted at the last device in a hash chain and
then continued, "idx" won't get incremented past s_idx, so s_ip_idx
is not reset when moving on to the next device. This means of all
following devices only the last n - s_ip_idx addresses are dumped.
Tested-by: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 51ca946e3392..3feb2b390308 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1194,7 +1194,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) hlist_for_each_entry_rcu(dev, node, head, index_hlist) { if (idx < s_idx) goto cont; - if (idx > s_idx) + if (h > s_h || idx > s_idx) s_ip_idx = 0; in_dev = __in_dev_get_rcu(dev); if (!in_dev) |