wpa_supplicant daemon is blocking

Jouni Malinen j at w1.fi
Sat May 31 11:51:44 EDT 2014


On Tue, May 27, 2014 at 05:50:46PM +0300, Flavius-Mihai Lazar wrote:
> I'm developing an application on an embedded linux device on top of
> wpa_supplicant daemon. I'm using the wpa_ctrl interface to interact with
> the daemon.
> My problem is that after 200-300 commands sent to wpa_supplicant daemon
> (mainly scan, scan_results, add_network, set_network, enable_nework)
> wpa_ctrl_request() returns timeout (-2) and if I continue to send commands
> then after another 5-6 commands it will stop returning timeout and the call
> simply hangs forever. Restarting the wpa_supplicant daemon seems to fix the
> problem, but implementing such a mechanism in my application is not easy
> and straightforward and I would avoid this.
> 
> The network to which I'm connecting is using WPA2 authentication.
> The version of wpa_supplicant that I use is 0.7.3.

I would recommend starting by updating a bit more recent version; 0.7.3
or the 0.7.x branch in general has not been supported for quite some
time. If you can reproduce with the current hostap.git snapshot, I would
be interested in getting more detailed description of what the external
program does and whether it attaches for monitor events, etc.

It is possible for the control interface socket on wpa_supplicant to hit
some kernel socket size limits if the external client application does
some inconvenient things, like registers for events and then never reads
them. Some of these have been addressed in more recent versions, but it
is quite likely that some cases are still possible (and also
inconveniently difficult to fix with the current design). If you hit
these cases, wpa_supplicant debug log should show send() failures when
trying to send events or reply to commands.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list