]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip: Allow for easier debug of buggy devices that dont send their names
authorjamal <hadi@cyberus.ca>
Fri, 8 Aug 2008 14:06:17 +0000 (10:06 -0400)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 27 Mar 2009 17:59:25 +0000 (10:59 -0700)
patch attached this time..

On Fri, 2008-08-08 at 10:01 -0400, jamal wrote:
> wireless drivers using wext is a prime example if you need a test case.
>
> cheers,
> jamal

ip: Allow for easier debug of buggy devices that dont send their names

With the old message couldnt tell which device had the bug.
This patch provides at least an ifindex to narrow it down.
Theres also no point in bailing out because of one bug; we
allow it to go on so we could dump as much info as we can

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
ip/ipaddress.c

index 28d3c2d2c98bb63709e41b71e1e521a16965099c..b055b68b8314ba9d7285d01d7bd4c31c06e972b8 100644 (file)
@@ -210,8 +210,7 @@ int print_linkinfo(const struct sockaddr_nl *who,
 
        parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len);
        if (tb[IFLA_IFNAME] == NULL) {
-               fprintf(stderr, "BUG: nil ifname\n");
-               return -1;
+               fprintf(stderr, "BUG: device with ifindex %d has nil ifname\n", ifi->ifi_index);
        }
        if (filter.label &&
            (!filter.family || filter.family == AF_PACKET) &&