wpa_supplicant doesn't start when no password is set
Morand at telecontrol.ch
Thu Aug 18 11:18:43 EDT 2011
I'm playing with wpa_supplicant, it's working greate, thanks for the excellent job!
However, I sometime use the "save" command to save my current configuration and it writes that kind of configuration. I never edit the file myself, I only configure my network with wpa_cli. This happens when the connection failed using the WPS button or when I add a fake network without encryption:
At next startup, it fails with an error. I've found a bug report in archlinux that perfectly describes the case:
To avoid the problem, I quickly made a DIRTY hack, here is the patch:
@@ -105,6 +105,12 @@ static int wpa_config_validate_network(s
+ * Do not make error if PSK network as no key set. This to avoid an error at
+ * startup when wpa_supplicant update the configuration file and is not able
+ * to follow its own syntax!
if ((ssid->key_mgmt & (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_FT_PSK |
@@ -112,6 +118,7 @@ static int wpa_config_validate_network(s
"management, but no PSK configured.", line);
if ((ssid->group_cipher & WPA_CIPHER_CCMP) &&
!(ssid->pairwise_cipher & WPA_CIPHER_CCMP) &&
It does some ioctl error at startup but at least the service is started... As it is said on archlinux bug report, it would be better to add the "security=NONE" directly when the configuration is saved...
Probably you already know that behavior but as it looks like it has not been corrected since last February, I thought it was a good idea to tell you. Should I also do a bug report ?
More information about the HostAP