From 3c738115077a5531400fad80e44f9882e4bb5ca7 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 8 Mar 2020 16:13:35 +0200 Subject: [PATCH] OWE: Mark BSS for transition mode based on active OWE network profiles It is possible for the hidden OWE BSS to be found based on SSID-specific scan (e.g., from the special OWE scan mechanism). In that sequence, the previously used learning of OWE BSS was skipped since the SSID was already present in the BSS entry. This could result in not being able to find a matching BSS entry for the OWE BSS in transition mode. Fix this by adding the BSS flag for transition mode based on SSID matching against currently enabled OWE network profiles in addition to the previous mechanism. Signed-off-by: Jouni Malinen --- wpa_supplicant/events.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 1149aa90b..06c422968 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -995,6 +995,24 @@ static void owe_trans_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, *ret_ssid = pos; *ret_ssid_len = ssid_len; + if (!(bss->flags & WPA_BSS_OWE_TRANSITION)) { + struct wpa_ssid *ssid; + + for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) { + if (wpas_network_disabled(wpa_s, ssid)) + continue; + if (ssid->ssid_len == ssid_len && + os_memcmp(ssid->ssid, pos, ssid_len) == 0) { + /* OWE BSS in transition mode for a currently + * enabled OWE network. */ + wpa_dbg(wpa_s, MSG_DEBUG, + "OWE: transition mode OWE SSID for active OWE profile"); + bss->flags |= WPA_BSS_OWE_TRANSITION; + break; + } + } + } + if (bss->ssid_len > 0) return;