[lkml]   [2007]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[36/50] Fix device address listing for ipv4.

    From: Stephen Hemminger <>

    commit 596e41509550447b030f7b16adaeb0138ab585a8 in mainline


    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 <>
    Signed-off-by: David S. Miller <>
    Signed-off-by: Greg Kroah-Hartman <>

    net/ipv4/devinet.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/ipv4/devinet.c
    +++ b/net/ipv4/devinet.c
    @@ -1194,7 +1194,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,
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-09-24 18:43    [W:0.022 / U:2.464 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site