]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OWE: Update transition mode information on selecting a new BSS
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 25 Apr 2023 09:04:01 +0000 (12:04 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 25 Apr 2023 09:04:01 +0000 (12:04 +0300)
It is possible for a new BSS entry to be added for the
hidden-SSID-OWE-BSS when running a new scan after having previously
learned the hidden SSID during a previous OWE connection attempt. That
new entry would not necessarily have the WPA_BSS_OWE_TRANSITION flag set
and that would result in not being able to recognize the appropriate OWE
profile when checking the association event against the transition mode
configuration.

Fix this by updating the BSS entry for OWE transition mode information
for the cases where this might happen.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wpa_supplicant/events.c

index ebac8a1526b18d3e47660603e545bb442f7b4e2b..2eb2b9e31922ad488a463e9750d914bfd1a782dc 100644 (file)
 static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
                                              int new_scan, int own_request);
 #endif /* CONFIG_NO_SCAN_PROCESSING */
+#ifdef CONFIG_OWE
+static void owe_trans_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
+                          const u8 **ret_ssid, size_t *ret_ssid_len);
+#endif /* CONFIG_OWE */
 
 
 int wpas_temp_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
@@ -209,6 +213,14 @@ static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s,
                        return 0; /* current profile still in use */
 
 #ifdef CONFIG_OWE
+               if (wpa_s->current_bss &&
+                   !(wpa_s->current_bss->flags & WPA_BSS_OWE_TRANSITION)) {
+                       const u8 *match_ssid;
+                       size_t match_ssid_len;
+
+                       owe_trans_ssid(wpa_s, wpa_s->current_bss,
+                                      &match_ssid, &match_ssid_len);
+               }
                if ((wpa_s->current_ssid->key_mgmt & WPA_KEY_MGMT_OWE) &&
                    wpa_s->current_bss &&
                    (wpa_s->current_bss->flags & WPA_BSS_OWE_TRANSITION) &&