Do not drop connection attempt when reconnecting to the same ESS

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>
This commit is contained in:
김우용 2022-11-04 07:54:20 +00:00 committed by Jouni Malinen
parent ef10a574d6
commit 00a762c26e

View 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