]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Do not drop connection attempt when reconnecting to the same ESS
author김우용 <wykim@newratek.com>
Fri, 4 Nov 2022 07:54:20 +0000 (07:54 +0000)
committerJouni Malinen <j@w1.fi>
Sat, 5 Nov 2022 10:36:56 +0000 (12:36 +0200)
Connection attempt could have been intermittently drop when reconnecting
to the same ESS due the current BSS entry getting removed immediately
after the disconnection for the purpose of reconnecting to the same ESS.

Avoid this by not removing a BSS entry for the same ESS when in this
special state of trying to reconnect to the same ESS.

Signed-off-by : WooYong Kim <wykim@newratek.com>

wpa_supplicant/bss.c

index a3da86cae86a6e9d712993e43037925554f14a34..401c5342ee923ca412153505bc62637d1d290c28 100644 (file)
@@ -992,6 +992,14 @@ void wpa_bss_flush_by_age(struct wpa_supplicant *wpa_s, int age)
                if (wpa_bss_in_use(wpa_s, bss))
                        continue;
 
+               if (wpa_s->reassoc_same_ess &&
+                   wpa_s->wpa_state != WPA_COMPLETED &&
+                   wpa_s->last_ssid &&
+                   bss->ssid_len == wpa_s->last_ssid->ssid_len &&
+                   os_memcmp(bss->ssid, wpa_s->last_ssid->ssid,
+                             bss->ssid_len) == 0)
+                       continue;
+
                if (os_reltime_before(&bss->last_update, &t)) {
                        wpa_bss_remove(wpa_s, bss, __func__);
                } else