aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface_unix.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-04-11 16:29:24 (GMT)
committerJouni Malinen <j@w1.fi>2010-04-11 16:29:24 (GMT)
commit6700a277a9ca66c0d4d5ffca62c02c1ca27594b2 (patch)
tree608c4be764676c215dc8bab1b20357ea5f81ffa6 /wpa_supplicant/ctrl_iface_unix.c
parentcf4783e35fb4861181c275a3dbd607b58c7d4067 (diff)
downloadhostap-6700a277a9ca66c0d4d5ffca62c02c1ca27594b2.zip
hostap-6700a277a9ca66c0d4d5ffca62c02c1ca27594b2.tar.gz
hostap-6700a277a9ca66c0d4d5ffca62c02c1ca27594b2.tar.bz2
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.
Diffstat (limited to 'wpa_supplicant/ctrl_iface_unix.c')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 9b596ba..84ac760 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);