[pkg-wpa-devel] wpa_supplicant ifupdown script: should ignore wired interfaces

Raphaël Droz raphael.droz at gmail.com
Tue Nov 25 02:48:17 UTC 2014


I've a wlan0 interfaces setup and working using wpasupplicant.
I've a custom configuration for eth0 (using guessnet).

Using if-up -v eth0 trigger the scripts, and end-up executing *all*
if-pre.d/* scripts.
Strangely, wpasupplicant's ifupdown.sh "succeeds", runs a daemon and
creates a /var/run/wpa_action.eth0.pid

This is probably not expected.
Since there's no way to avoid execution of if-*.d/ on an interface
definition basis (interfaces(5)), wpasupplicant's ifupdown.sh should be
more "intelligent" about whether to run for an interface or not.

Currently only a check on $IFACE != lo is done but this is not sufficient.
Would wpasupplicant depend upon wireless-tools, it could check the return
value of `/sbin/iwconfig $IFACE`. But this is not the case.

Thus, in the attached patch, the script returns 0 if
/sys/class/net/$IFACE/phy80211 does not exist.
[patch against the version in Wheezy]



best regards



References:
http://anonscm.debian.org/viewvc/pkg-wpa/wpa/trunk/debian/ifupdown/wpasupplicant.sh?revision=1693&view=markup

Please keep me in CC: since I'm not subscribed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpasupplicant-dont-up-wired-ifaces.patch
Type: text/x-diff
Size: 468 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-wpa-devel/attachments/20141125/ece675f2/attachment.patch>


More information about the Pkg-wpa-devel mailing list