]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Apply same restrictions for MLD as for 6 GHz BSS
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 30 Nov 2022 13:09:39 +0000 (15:09 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 3 Dec 2022 15:43:46 +0000 (17:43 +0200)
Though not explicitely forced by IEEE 802.11be draft yet, it makes sense
to apply the same logic for MLD as for 6 GHz BSSs. Change
wpa_supplicant_ssid_bss_match() accordingly.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
wpa_supplicant/events.c

index dddf35315c1c3060030e908a562be20cfcd9151c..e55dbce5a32d4e7f390e1467862ec5a55892a5f4 100644 (file)
@@ -608,7 +608,8 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
 #ifdef CONFIG_WEP
        int wep_ok;
 #endif /* CONFIG_WEP */
-       bool is_6ghz_bss = is_6ghz_freq(bss->freq);
+       bool is_6ghz_bss_or_mld = is_6ghz_freq(bss->freq) ||
+               !is_zero_ether_addr(bss->mld_addr);
 
        ret = wpas_wps_ssid_bss_match(wpa_s, ssid, bss);
        if (ret >= 0)
@@ -623,10 +624,10 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
 #endif /* CONFIG_WEP */
 
        rsn_ie = wpa_bss_get_ie(bss, WLAN_EID_RSN);
-       if (is_6ghz_bss && !rsn_ie) {
+       if (is_6ghz_bss_or_mld && !rsn_ie) {
                if (debug_print)
                        wpa_dbg(wpa_s, MSG_DEBUG,
-                               "   skip - 6 GHz BSS without RSNE");
+                               "   skip - 6 GHz/MLD BSS without RSNE");
                return 0;
        }
 
@@ -644,7 +645,7 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
                if (!ie.has_group)
                        ie.group_cipher = wpa_default_rsn_cipher(bss->freq);
 
-               if (is_6ghz_bss) {
+               if (is_6ghz_bss_or_mld) {
                        /* WEP and TKIP are not allowed on 6 GHz */
                        ie.pairwise_cipher &= ~(WPA_CIPHER_WEP40 |
                                                WPA_CIPHER_WEP104 |
@@ -695,12 +696,12 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
                        break;
                }
 
-               if (is_6ghz_bss) {
+               if (is_6ghz_bss_or_mld) {
                        /* MFPC must be supported on 6 GHz */
                        if (!(ie.capabilities & WPA_CAPABILITY_MFPC)) {
                                if (debug_print)
                                        wpa_dbg(wpa_s, MSG_DEBUG,
-                                               "   skip RSNE - 6 GHz without MFPC");
+                                               "   skip RSNE - 6 GHz/MLD without MFPC");
                                break;
                        }
 
@@ -740,10 +741,10 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
                return 1;
        }
 
-       if (is_6ghz_bss) {
+       if (is_6ghz_bss_or_mld) {
                if (debug_print)
                        wpa_dbg(wpa_s, MSG_DEBUG,
-                               "   skip - 6 GHz BSS without matching RSNE");
+                               "   skip - 6 GHz/MLD BSS without matching RSNE");
                return 0;
        }