net: fix netlink address dumping in IPv4/IPv6
Subsystems (3)
PATCH 1/1 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.
--- net/ipv4/devinet.c | 2 +- net/ipv6/addrconf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/devinet.c +1 -1
@@ -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)
net/ipv6/addrconf.c +1 -1
@@ -3610,7 +3610,7 @@ static int inet6_dump_addr(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 ; ip_idx =0 ;if ((idev =__in6_dev_get (dev)) ==NULL )
Signature · 1 line
1.6.5.7
Applied, thanks.
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Fri, 26 Mar 2010 20:28:28 -0700 (PDT)
Quoted 2 lines
Applied, thanks.
BTW, you encoded this patch in such a way that:
1) patchwork didn't even notice it
2) it made more work for me to apply it
Putting just the commit message and the patch itself as an attachment isn't going to work.
It ought to be quite simple:
Mail headers:
1) If you wrote the patch the normal "From: " in your email takes care of everything. Else add a new one at the top of the mail message body for the actual author.
2) Make "Subject: " be the commit message header line. Anything in leading "[]" brackets will be removed by the git tools so you can say things like "[PATCH]" and "[PATCH net-2.6]" there.
3) After any optional "From: " override for the patch author, the content of your email body should start with the commit message.
4) If you want to make more comments that don't end up into the commit message (like: "Dave this should go to -stable for 2.6.33 only") add a line with "---" three dashes then on the following lines say what you want to say
5) Then comes the patch.
This really should be trivial.
Don't use attachments, just:
--------------------------------------------------
From: Patrick McHardy <[email protected]>
Subject: [PATCH whatever] Commit header line
Commit message
---
Any extra side notes.
net/ipv4/devinet.c | 2 +- net/ipv6/addrconf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/devinet.c +0 -0
@@ -1194,7 +1194,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct n
...
--------------------------------------------------
I really should be able to take your email and feed it to "git am" and it should "just work". I can't do that with what you're giving me.