From 00a762c26e89532f1936e56d9abb4185c30b74a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=B0=EC=9A=A9?= Date: Fri, 4 Nov 2022 07:54:20 +0000 Subject: [PATCH] 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 --- wpa_supplicant/bss.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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