Subject: Re: iproute2: no error message when link up command fails.

From: Stephen Hemminger <[email-masked]>
Date: Wed, 16 Jul 2008 15:26:31 -0700

On Thu, 17 Jul 2008 00:27:17 +0200
Andreas Henriksson <[email-masked]> wrote:

> On ons, 2008-07-16 at 15:03 -0700, Stephen Hemminger wrote:
> > On Thu, 17 Jul 2008 00:00:58 +0200
> > Andreas Henriksson <[email-masked]> wrote:
> [...]
> > > +						fprintf(stderr, "Unknown netlink error.\n");
> > >  						return 0;
> [..]
> > libnetlink shouldn't print the error, it needs to be done by the caller.
> ... and iproute should exit with a proper error code. This isn't
> possible today, as there's no way for the caller to detect the error!
> I was just trying to be a bit helpful on where we end up in the code.
> 
> If anyone could help out with how to modify the code to solve all this,
> that would be nice. I don't understand the current code tries to do.
> 
> (By the way, most uses of rtnl_* seems to be if (rtnl_* < 0) exit(1); in
> iproute2 currently. The error messages are in libnetlink.)
> 
> 

The problem is the driver is responding with an error packet but the
errno is 0. This looks like a kernel bug, not an library bug.