netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Stephen Hemminger <stephen.hemminger@vyatta.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH]ip: Allow for easier debug of buggy devices that dont send their names
Date: Fri, 08 Aug 2008 10:06:17 -0400	[thread overview]
Message-ID: <1218204378.4688.65.camel@localhost> (raw)
In-Reply-To: <1218204048.4688.62.camel@localhost>

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

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

[-- Attachment #2: iprl1 --]
[-- Type: text/plain, Size: 1229 bytes --]

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>

---
commit 741059fd8ae6c07794d56c56395354f95543f648
tree 0a0e8e4508a2d08c4bd450fcb1c74142fbd64837
parent 488f1c77fec1b283ef5237943d397786f90d2fe5
author Jamal Hadi Salim <hadi@cyberus.ca> Fri, 08 Aug 2008 09:57:49 -0400
committer Jamal Hadi Salim <hadi@cyberus.ca> Fri, 08 Aug 2008 09:57:49 -0400

 ip/ipaddress.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 373312f..a5af36d 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -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) &&

      reply	other threads:[~2008-08-08 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08 14:00 [PATCH]ip: Allow for easier debug of buggy devices that dont send their names jamal
2008-08-08 14:06 ` jamal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1218204378.4688.65.camel@localhost \
    --to=hadi@cyberus.ca \
    --cc=netdev@vger.kernel.org \
    --cc=stephen.hemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).