* [PATCH] devinet: show all addresses assigned to interface
@ 2007-09-06 15:10 Stephen Hemminger
2007-09-06 16:11 ` Thomas Graf
2007-09-06 18:15 ` Patrick McHardy
0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2007-09-06 15:10 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Bug: http://bugzilla.kernel.org/show_bug.cgi?id=8876
Not all ips are shown by "ip addr show" command when IPs number assigned to an
interface is more than 60-80 (in fact it depends on broadcast/label etc
presence on each address).
Steps to reproduce:
It's terribly simple to reproduce:
# for i in $(seq 1 100); do ip ad add 10.0.$i.1/24 dev eth10 ; done
# ip addr show
this will _not_ show all IPs.
Looks like the problem is in netlink/ipv4 message processing.
This is fix from bug submitter, it looks correct.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
--- a/net/ipv4/devinet.c 2007-08-15 12:56:38.000000000 +0100
+++ b/net/ipv4/devinet.c 2007-09-06 16:02:59.000000000 +0100
@@ -1193,7 +1193,7 @@ static int inet_dump_ifaddr(struct sk_bu
for (ifa = in_dev->ifa_list, ip_idx = 0; ifa;
ifa = ifa->ifa_next, ip_idx++) {
if (ip_idx < s_ip_idx)
- goto cont;
+ continue;
if (inet_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq,
RTM_NEWADDR, NLM_F_MULTI) <= 0)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] devinet: show all addresses assigned to interface
2007-09-06 15:10 [PATCH] devinet: show all addresses assigned to interface Stephen Hemminger
@ 2007-09-06 16:11 ` Thomas Graf
2007-09-06 18:15 ` Patrick McHardy
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Graf @ 2007-09-06 16:11 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, netdev
* Stephen Hemminger <shemminger@linux-foundation.org> 2007-09-06 16:10
> Bug: http://bugzilla.kernel.org/show_bug.cgi?id=8876
>
> Not all ips are shown by "ip addr show" command when IPs number assigned to an
> interface is more than 60-80 (in fact it depends on broadcast/label etc
> presence on each address).
The more attributes are assigned to an address, the sooner the netlink
message will be full.
> Steps to reproduce:
> It's terribly simple to reproduce:
>
> # for i in $(seq 1 100); do ip ad add 10.0.$i.1/24 dev eth10 ; done
> # ip addr show
>
> this will _not_ show all IPs.
> Looks like the problem is in netlink/ipv4 message processing.
>
> This is fix from bug submitter, it looks correct.
The fix is correct.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] devinet: show all addresses assigned to interface
2007-09-06 15:10 [PATCH] devinet: show all addresses assigned to interface Stephen Hemminger
2007-09-06 16:11 ` Thomas Graf
@ 2007-09-06 18:15 ` Patrick McHardy
2007-09-11 8:48 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Patrick McHardy @ 2007-09-06 18:15 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 693 bytes --]
Stephen Hemminger wrote:
> Bug: http://bugzilla.kernel.org/show_bug.cgi?id=8876
>
> Not all ips are shown by "ip addr show" command when IPs number assigned to an
> interface is more than 60-80 (in fact it depends on broadcast/label etc
> presence on each address).
>
> Steps to reproduce:
> It's terribly simple to reproduce:
>
> # for i in $(seq 1 100); do ip ad add 10.0.$i.1/24 dev eth10 ; done
> # ip addr show
>
> this will _not_ show all IPs.
> Looks like the problem is in netlink/ipv4 message processing.
>
> This is fix from bug submitter, it looks correct.
>
The same bug was introduced in decnet. Both are 2.6.22 regressions.
Signed-off-by: Patrick McHardy <kaber@trash.net>
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 493 bytes --]
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index fa6604f..8def682 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -814,7 +814,7 @@ static int dn_nl_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
for (ifa = dn_db->ifa_list, dn_idx = 0; ifa;
ifa = ifa->ifa_next, dn_idx++) {
if (dn_idx < skip_naddr)
- goto cont;
+ continue;
if (dn_nl_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, RTM_NEWADDR,
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] devinet: show all addresses assigned to interface
2007-09-06 18:15 ` Patrick McHardy
@ 2007-09-11 8:48 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-09-11 8:48 UTC (permalink / raw)
To: kaber; +Cc: shemminger, netdev
From: Patrick McHardy <kaber@trash.net>
Date: Thu, 06 Sep 2007 20:15:40 +0200
>
> The same bug was introduced in decnet. Both are 2.6.22 regressions.
>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
I've applied both patches, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-11 8:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06 15:10 [PATCH] devinet: show all addresses assigned to interface Stephen Hemminger
2007-09-06 16:11 ` Thomas Graf
2007-09-06 18:15 ` Patrick McHardy
2007-09-11 8:48 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).