]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OWE: Mark BSS for transition mode based on active OWE network profiles
authorJouni Malinen <j@w1.fi>
Sun, 8 Mar 2020 14:13:35 +0000 (16:13 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 8 Mar 2020 14:16:11 +0000 (16:16 +0200)
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 <j@w1.fi>
wpa_supplicant/events.c

index 1149aa90bacdc927ca398edc0a38c5b706c04450..06c4229686bdfda8bf91161a1dade7e67f85a3ce 100644 (file)
@@ -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;