]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add MLME auth work-around for -EEXIST errno
authorBen Greear <greearb@candelatech.com>
Fri, 16 Mar 2018 21:31:55 +0000 (14:31 -0700)
committerJouni Malinen <j@w1.fi>
Sun, 15 Apr 2018 18:58:53 +0000 (21:58 +0300)
The Linux 4.9 kernel, at least, can return EEXIST when trying to auth a
station that already exists.

We have seen this bug in multiple places, but it is difficult to
reproduce. Here is a link to someone else that appears to have hit this
issue: https://github.com/greearb/ath10k-ct/issues/18

Signed-off-by: Ben Greear <greearb@candelatech.com>
src/drivers/driver_nl80211.c

index ac06d20fc5e8e5e42d9d55b90d74f9344c0ea687..7570d12152aaf186d01a81be5359b6277bddf84e 100644 (file)
@@ -3348,11 +3348,11 @@ retry:
        msg = NULL;
        if (ret) {
                wpa_dbg(drv->ctx, MSG_DEBUG,
-                       "nl80211: MLME command failed (auth): ret=%d (%s)",
-                       ret, strerror(-ret));
+                       "nl80211: MLME command failed (auth): count=%d ret=%d (%s)",
+                       count, ret, strerror(-ret));
                count++;
-               if (ret == -EALREADY && count == 1 && params->bssid &&
-                   !params->local_state_change) {
+               if ((ret == -EALREADY || ret == -EEXIST) && count == 1 &&
+                   params->bssid && !params->local_state_change) {
                        /*
                         * mac80211 does not currently accept new
                         * authentication if we are already authenticated. As a