OWE: Update transition mode information on selecting a new BSS

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>
This commit is contained in:
Jouni Malinen 2023-04-25 12:04:01 +03:00 committed by Jouni Malinen
parent f54ce74335
commit 6972b0fa2b

View file

@ -59,6 +59,10 @@
static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s, static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
int new_scan, int own_request); int new_scan, int own_request);
#endif /* CONFIG_NO_SCAN_PROCESSING */ #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) 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 */ return 0; /* current profile still in use */
#ifdef CONFIG_OWE #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) && if ((wpa_s->current_ssid->key_mgmt & WPA_KEY_MGMT_OWE) &&
wpa_s->current_bss && wpa_s->current_bss &&
(wpa_s->current_bss->flags & WPA_BSS_OWE_TRANSITION) && (wpa_s->current_bss->flags & WPA_BSS_OWE_TRANSITION) &&