summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJouni Malinen <quic_jouni@quicinc.com>2023-04-25 12:04:01 +0300
committerJouni Malinen <j@w1.fi>2023-04-25 12:04:01 +0300
commit6972b0fa2bb88f80471384c5f7a1bde000f251fa (patch)
treed781b7aa4fbec1fab7fbc6bf51411c9d0324f103
parentf54ce743353f14a5007c7e908b6374ef703b77e3 (diff)
downloadhostap-6972b0fa2bb88f80471384c5f7a1bde000f251fa.tar.gz
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>
-rw-r--r--wpa_supplicant/events.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index ebac8a152..2eb2b9e31 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -59,6 +59,10 @@
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) &&