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.
This commit is contained in:
Jouni Malinen 2010-04-11 19:29:24 +03:00 committed by Jouni Malinen
parent cf4783e35f
commit 6700a277a9
1 changed files with 3 additions and 1 deletions

View File

@ -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);