Re: network status change issue...



On Thu, 2009-05-07 at 08:01 -0700, Marcel Holtmann wrote:
> Hi Dan,
> 
> > > I am currently having issues with Network Manager. Whenever I unplug
> > > the ethernet cable Network Manager picks up on the fact it is
> > > disconnected. Then it tries to connect to whatever wifi connections I
> > > have setup. This works properly. The issue I am running into is
> > > whenever I plug back in the active network cable Network Manager
> > > continues to see the ethernet card as disconnected. I have to either
> > > restart Network Manager or at least uncheck Enable Networking and
> > > recheck it in the Network Manager menu. Only after I do that does
> > 
> > This says that the carrier detection logic with netlink may not be
> > working properly.  Can you check /sys/class/net/<interface>/carrier
> > after you plug it back in, and what that says?  If it's '1', then
> > proceed to the next step here.  If it's '0', then it's a driver problem
> > in the kernel.
> > 
> > If carrier is '1', then it could be a problem with netlink carrier
> > events being delivered to NM.  You'll want to poke around in the NM
> > source in src/nm-netlink-monitor.c, in the
> > netlink_object_message_handler() function, and put some debugging prints
> > in there to see what's going on.  We're especially interested in the
> > 'flags' variable is at this point, and whether it's IFF_UP or
> > IFF_LOWER_UP or what.
> 
> actually just calling "ip link" after plugging in that cable would be
> enough. It shows the proper flags.
> 
> Jonathan, you might be running an old version of NM that uses IFF_UP for
> carrier detection and that is wrong (not an obvious bug, but neverless a
> bug). For detecting carrier changes via interface flags, IFF_LOWER_UP
> should be used.

It was correct up to 2.6.17, and still works for some drivers that
didn't quite get converted over...  But yes, IFF_LOWER_UP is the real
correct flag, and if something doesn't work with IFF_LOWER_UP then that
driver needs to be fixed.

dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]