ifplugd does not detect link up
Ladislav Michl
Ladislav.Michl at seznam.cz
Thu Jan 7 22:33:23 UTC 2010
On Thu, Jan 07, 2010 at 02:52:04PM +0100, Denys Vlasenko wrote:
> On Thu, Jan 7, 2010 at 1:41 PM, Ladislav Michl <Ladislav.Michl at seznam.cz> wrote:
> > Busybox's ifplugd was a bit modified since derived from its original and now
> > it no longer works with smc91x (linux-2.6.32). After cable removal and
> > interface deconfiguration so subsequent link up is reported. Change
> > responsible for this behaviour is listed bellow. Could we revert this change
> > (or eventually add an option for that)?
>
> I want it to be documented. I think I disabled it because
> I was puzzled when ifplugd kept upping the interface.
>
> Let's confirm it: the device which you have problem with
> says "using IFF_RUNNING detection mode", right?
ifplugd(eth0): using SIOCETHTOOL detection mode
> It means that when cable is unplugged, interface cannot be "upped",
> and this is used to detect that. With unfortunate effect that now admin
> cannot set "up/down" status as he pleases.
>
> Can you check this by doing "ip l set dev ethN up; ip l l"
> and seeing whether device is up or not, with and without cable inserted?
(lo interface snipped)
[Interface deconfigured, cable plugged or unplugged]
# ip l l
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:c2:81:fe:78 brd ff:ff:ff:ff:ff:ff
[cable unplugged]
# ip l set dev eth0 up; ip l l
eth0: link down [<--- *** this comes from driver ***]
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:c2:81:fe:78 brd ff:ff:ff:ff:ff:ff
[cable plugged, line bellow comes from driver after plugging cable]
# eth0: link up, 10Mbps, half-duplex, lpa 0x0021
# ip l set dev eth0 up; ip l l
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:c2:81:fe:78 brd ff:ff:ff:ff:ff:ff
> Then we can better document it in code and in help text. For one,
> I'd say -a option "Don't up interface automatically"
> should explain that it is generally useful, but must not be used
> with devices which require IFF_RUNNING.
>
> And we can remove that #if 0 then.
>
> How about this?
ladis
More information about the busybox
mailing list