From: 김우용 Date: Fri, 4 Nov 2022 07:54:20 +0000 (+0000) Subject: Do not drop connection attempt when reconnecting to the same ESS X-Git-Tag: hostap_2_11~1575 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00a762c26e89532f1936e56d9abb4185c30b74a2;p=thirdparty%2Fhostap.git 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 --- diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index a3da86cae..401c5342e 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -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