Skip to contentSkip to conversation

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

PATCH In review jamal 1 participant 2 messages Aug 8, 2008

Subsystems (2)
lore
Share & tools
lore

jamal

author
#0 lore raw

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

wireless drivers using wext is a prime example if you need a test case.

cheers,
jamal

author
#1 lore raw

patch attached this time..

Quoted 4 lines · jamal

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

---
commit 741059fd8ae6c07794d56c56395354f95543f648
tree 0a0e8e4508a2d08c4bd450fcb1c74142fbd64837
parent 488f1c77fec1b283ef5237943d397786f90d2fe5
author Jamal Hadi Salim <[email protected]> Fri, 08 Aug 2008 09:57:49 -0400 committer Jamal Hadi Salim <[email protected]> Fri, 08 Aug 2008 09:57:49 -0400

 ip/ipaddress.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
ip/ipaddress.c +1 -2
index 373312f..a5af36d 100644
@@ -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) &&