After connecting to either the x or y networks, wpa_supplicant calls `wpa_action connect` which calls `ifup wlan0=dhcp_dns` or `ifup wlan0=dhcp`, which fails with "ifup: recursion detected for parent interface wlan0 in post-up phase". Therefore, dhclient is never run, so wlan0 never gets an IP address.
Note that the wpa_supplicant daemon is started by the /etc/network/if-up.d/wpasupplicant script, and it inherits the environment from `ifup wlan0` (including the environment variable used to detect recursion). `wpa_action connect` then inherits the environment from wpa_supplicant, and `ifup wlan0=dhcp` inherits it from wpa_action, hence the error from ifup.
I understand that this variable is meant to avoid certain race conditions, but I don't believe the type of race condition reported in bug #1337873 is applicable to this situation. Because wpa_supplicant is started by ifup itself (and not a boot script), there is no way for the `ifup wlan0` and `ifup wlan0=dhcp` to be called out of order, so there is no chance of a race condition. However, maybe I'm missing something here. Could you explain how the wpa-roam implementation could play along with ifupdown given that it is started by ifup itself and needs to call ifup to reconfigure the interface?
My configuration:
/etc/network/ interfaces supplicant/ wpa.conf roam-default- iface dhcp
auto wlan0
iface wlan0 inet manual
wpa-driver wext
wpa-roam /etc/wpa_
wpa-
iface dhcp inet dhcp
dns-nameservers 8.8.8.8 8.8.4.4
iface dhcp_dns
/etc/wpa_ supplicant/ wpa.conf mgmt=WPA- PSK str="dhcp_ dns" mgmt=WPA- PSK
network={
ssid="x"
priority=10
key_
psk="..."
id_
}
network={
ssid="y"
priority=9
key_
psk="..."
}
After connecting to either the x or y networks, wpa_supplicant calls `wpa_action connect` which calls `ifup wlan0=dhcp_dns` or `ifup wlan0=dhcp`, which fails with "ifup: recursion detected for parent interface wlan0 in post-up phase". Therefore, dhclient is never run, so wlan0 never gets an IP address.
Note that the wpa_supplicant daemon is started by the /etc/network/ if-up.d/ wpasupplicant script, and it inherits the environment from `ifup wlan0` (including the environment variable used to detect recursion). `wpa_action connect` then inherits the environment from wpa_supplicant, and `ifup wlan0=dhcp` inherits it from wpa_action, hence the error from ifup.
I understand that this variable is meant to avoid certain race conditions, but I don't believe the type of race condition reported in bug #1337873 is applicable to this situation. Because wpa_supplicant is started by ifup itself (and not a boot script), there is no way for the `ifup wlan0` and `ifup wlan0=dhcp` to be called out of order, so there is no chance of a race condition. However, maybe I'm missing something here. Could you explain how the wpa-roam implementation could play along with ifupdown given that it is started by ifup itself and needs to call ifup to reconfigure the interface?