]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IPV4] devinet: show all addresses assigned to interface
authorStephen Hemminger <shemminger@linux-foundation.org>
Tue, 11 Sep 2007 08:41:04 +0000 (10:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Sep 2007 08:41:04 +0000 (10:41 +0200)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/devinet.c

index 5b77bdaa57dd2440d85e3e418215276d71605cf7..5dbe5803b7d591968a6c1376f37f25692ea1c302 100644 (file)
@@ -1193,7 +1193,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
                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)