]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Always clear SAE rejected groups on roaming to another BSS
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 8 May 2024 13:42:12 +0000 (16:42 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 12 Jul 2024 09:54:20 +0000 (12:54 +0300)
SAE rejected groups were not cleared in case of re-association to the
same ESS. Since new BSS can support different groups, keeping rejected
groups doesn't make sense and may result in AP rejecting the
authentication. Fix it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
wpa_supplicant/wpa_supplicant.c

index 17e5315005e3bab8600641db83aaa9b074ec2bbf..64394029dd96bdbdd8013a36a4e78b1943d8b6d6 100644 (file)
@@ -2586,6 +2586,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit);
 void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
                              struct wpa_bss *bss, struct wpa_ssid *ssid)
 {
+       bool clear_rejected = true;
        struct wpa_connect_work *cwork;
        enum wpas_mac_addr_style rand_style;
 
@@ -2627,14 +2628,15 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
                        wmm_ac_save_tspecs(wpa_s);
 #endif /* CONFIG_NO_WMM_AC */
                        wpa_s->reassoc_same_bss = 1;
+                       clear_rejected = false;
                } else if (wpa_s->current_bss && wpa_s->current_bss != bss) {
                        os_get_reltime(&wpa_s->roam_start);
                }
-       } else {
-#ifdef CONFIG_SAE
-               wpa_s_clear_sae_rejected(wpa_s);
-#endif /* CONFIG_SAE */
        }
+
+       if (clear_rejected)
+               wpa_s_clear_sae_rejected(wpa_s);
+
 #ifdef CONFIG_SAE
        wpa_s_setup_sae_pt(wpa_s->conf, ssid, false);
 #endif /* CONFIG_SAE */