wait_for_interface too late - after interface configuration

Peter Lueg Peter.Lueg
Tue Aug 14 05:43:26 PDT 2007


Hi,

I use wpa_supplicant V0.5.7 with a USB WLAN Dongle and WPA PSK.

If I connect the USB Dongle first and then I start the supplicant
everything works fine. But if I start at first the supplicant and then I
connect the USB dongle, the connection to the access points does not
start. The wpa_cli tells me the supplicant is always scanning.
For all tests I use the the wpa_supplicant option -w (wait for interface
...).

If I start the supplicant not as daemon:

wpa_supplicant -d -w -i eth3 -c /etc/wpa_supplicant.conf -D wext

I see, that before the supplicant starts waiting for the interface, the
function wpa_driver_wext_init() is called. This function calls some
ioctl (SIOCSIWMODE, etc ...) to the interface and sets the drv->ifindex.
But at this point the interface is not available and every ioctl fails.
Then I connect the USB Dongle and the supplicant detects it, but then I
see the cyclic message
"Ignore event for foreign ifindex .."

Shouldn't we first check for the presence of the interface, and only
then start configuring it in wpa_driver_wext_init()? What would be the
correct fix?

Regards
Peter




More information about the Hostap mailing list