wpa_supplicant doesn't start when no password is set

Jouni Malinen j
Thu Nov 24 12:50:29 PST 2011


On Thu, Aug 18, 2011 at 05:18:43PM +0200, Guy Morand wrote:
> 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:
> network={
> 	ssid="MyNetwork"
> }

I'm not sure how you could do this with WPS, but yes, manual addition
(or modification) of a network block can indeed leave the network block
in invalid state.

> To avoid the problem, I quickly made a DIRTY hack, here is the patch:
> Index: wpa_supplicant-0.7.3/wpa_supplicant/config_file.c
> +        /** 
> +         * 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!
> +         **/
> +        /*

I addressed this at the other end, i.e., by making the configuration
saving routine skip invalid networks that would prevent wpa_supplicant
from starting with the resulting configuration file.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list