Bug#363347: [pkg-wpa-devel] Bug#363347: wpasupplicant: ifdown doesn't work correctly when using wpacli-action-dhclient script

Felix Homann fexpop at onlinehome.de
Tue Apr 18 20:18:10 UTC 2006


On Tuesday 18 April 2006 21:29, Reinhard Tartler wrote:
> Thanks for trying to clarify, but please provide the requested
> information I asked you before.

Patience! I had this one submitted even before you answered to the original 
report :-)

>
> > Here's what happens.
> >
> > 1. Effect on ifup
> > =========
> >
> > Bring the interface up once, then ifdown it.
>
> With or without successful association?

With succesful association.

> > Subsequent ifups will be successful even if they should fail (if e.g.
> > the AP is unreachable or you turned your radio off). ifconfig will
> > show the interface as configured with the old IP.
>
> This is due to design limitations of ifupdown and the Linux kernel.
> ifupdown will bring the interface up regardless if it was able to
> configure the interface or not. I don't know of any concept in ifupdown
> to detect if 'bringing the interface up' has failed.

I'm really sorry to tell you that this isn't an issue with the old setup ;-)

I've tried the following:

1. ifup succesfully then ifdown with the wpacli-action-dhclient setup thus 
leaving the interface in a "semi-down" state, i.e. leaving the inet line 
behind.

2. Switch off the radio. Switch to an old style setup:

#/etc/network/interfaces:
iface wlan inet dhcp

3. Start a wpa_supplicant process for the interface. 

4. Then ifup the interface.

Since the radio is off, this attempt to bring the interface up will fail but 
afterwards the inet line from the /bin/ip output will be gone.

> In (at least recent) linux kernels, the interface does not loose the
> associated ip. 

I'm running 2.6.15.3.

> This sounds to me that ifupdown should always do a
> 'ip addr flush dev $IFACE' on ifup. Would this fix your problem?

I don't think so. I guess it should rather flush the interface on ifdown.

> As a workaround, I'd suggest adding this command to
> /etc/wpa_supplicant/ifupdown.sh. Could you please try that and tell me
> if this fixes your problems?

I'll see tomorrow.

Regards,

Felix




More information about the Pkg-wpa-devel mailing list