Re-open ctrl_iface socket on some failure cases as a workaround
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 25 Sep 2013 13:23:11 +0000 (16:23 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 25 Sep 2013 13:23:11 +0000 (16:23 +0300)
commit89286e91bf10d5f3647892c06d2add363df7b36a
tree6dad273facfa97ea710bf713600a23a2663c8567
parent3ca96df596e8e53b6bce6da15cc3376398aa6eae
Re-open ctrl_iface socket on some failure cases as a workaround

If wpa_supplicant ctrl_iface clients are misbehaving and refusing to
read replies or event messages from wpa_supplicant, the single socket
used in wpa_supplicant to send messages can reach the maximum send
buffer limit. When that happens, no more responses to any client can be
sent. Work around this by closed and reopening the socket in case such a
failure state is detected. This is obviously not desirable since it
breaks existing connected sockets, but is needed to avoid leaving
wpa_supplicant completely unable to respond to any client. Cleaner fix
for this may require more considerable changes in the ctrl_iface design
to move to connection oriented design to allow each client to be handled
separately and unreachability to be detected more reliably.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/ctrl_iface_unix.c