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

Reinhard Tartler siretart at tauware.de
Tue Apr 18 20:55:35 UTC 2006


On Tue, Apr 18, 2006 at 10:18:10PM +0200, Felix Homann wrote:
> > > 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 ;-)

Sure, because the 'old setup' didn't care about ifupdown at all.

> 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.

What I read from your output, the interface itself is indeed down, but
still has the old ip assigned. This seems to be the way intended. You
seem to want to have if rather flushed at this point, in order to
unbreak the 'FALLBACK' mode of zeroconf.

This is something ifupdown should do, I think. Do you agree on this
point?

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

Switching setup styles isn't a that common use case, don't you think? ;)

> #/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.

Err, isn't this expected behavior?

> > 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.

Yes. Perhaps on both, just to be sure.

> > 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.

thanks.

Gruesse,
	Reinhard
 




More information about the Pkg-wpa-devel mailing list