[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 22:47:45 UTC 2006


On Wed, Apr 19, 2006 at 12:06:47AM +0200, Felix Homann wrote:
> > > 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?
> 
> Sure, but it doesn't work with the wpacli-action-dhclient setup. I'm gonna 
> have the old IP until eventually a new one will be supplied. The interface 
> will be brought up even if the radio is off.
> 
> See the attached log (all with wpacli-action-dhclient setup).

aah, after reading your transscript (thanks for that!) I think I
understand now what's going on. When we terminate wpa_supplicant in
ifupdown.sh (with wpa_cli terminate), then wpa_supplicant brings the
interface down (but does not 'flush' the existing ip addresses from the
interface). This behavior confuses ifupdown, so that it doesn't flush
the ip addresses either, which it would do otherwise.

I can think of 4 possibilities how to solve this:

- make wpasupplicant 'flush' the interface when going down. This might
  be not portable on other system wpa_supplicant supports (e.g. windows
  or bsd)
- make ifupdown 'flush' the the interface even if the interface isn't
  'up'
- do a 'ip addr flush $iface' in ifupdown.sh 
- make wpa_supplicant to not bring the interface down on exit.

#3 could be a temporary workaround.

Do you agree with this analysis?

Gruesse,
	Reinhard




More information about the Pkg-wpa-devel mailing list