From: Jouni Malinen Date: Sun, 11 Apr 2010 16:29:24 +0000 (+0300) Subject: Avoid dropping ctrl_iface on ENOBUFS error burst X-Git-Tag: hostap_0_7_2~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6700a277a9ca66c0d4d5ffca62c02c1ca27594b2;p=thirdparty%2Fhostap.git Avoid dropping ctrl_iface on ENOBUFS error burst These bursts can result in control interface monitors being detached even if the external program is still working properly. Use much larger error threshold for ENOBUFS to avoid this. --- diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c index 9b596ba71..84ac76088 100644 --- a/wpa_supplicant/ctrl_iface_unix.c +++ b/wpa_supplicant/ctrl_iface_unix.c @@ -525,7 +525,9 @@ static void wpa_supplicant_ctrl_iface_send(struct ctrl_iface_priv *priv, "%d - %s", idx, errno, strerror(errno)); dst->errors++; - if (dst->errors > 10 || _errno == ENOENT) { + if (dst->errors > 1000 || + (_errno != ENOBUFS && dst->errors > 10) || + _errno == ENOENT) { wpa_supplicant_ctrl_iface_detach( priv, &dst->addr, dst->addrlen);