]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MLD: Do not consider ignored BSSs for links when parsing RNR info
authorBenjamin Berg <benjamin.berg@intel.com>
Mon, 20 Nov 2023 23:51:27 +0000 (01:51 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 25 Nov 2023 14:52:08 +0000 (16:52 +0200)
This avoids, e.g., trying to use a BSS that is rejected by mac80211 as a
link, which could fail the connection as a whole.

Note that this is not perfect. Ideally, the internal state would have a
more context sensitive ignore flag so that one could still use a BSS as
a link in some situation.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
wpa_supplicant/bss.c

index 0ca36f1bca4374aa707ed535ef9b752e88f67be5..329d3cdc7fce32818f36164dc8609119f9baf8b1 100644 (file)
@@ -18,6 +18,7 @@
 #include "config.h"
 #include "notify.h"
 #include "scan.h"
+#include "bssid_ignore.h"
 #include "bss.h"
 
 static void wpa_bss_set_hessid(struct wpa_bss *bss)
@@ -1535,13 +1536,16 @@ wpa_bss_parse_ml_rnr_ap_info(struct wpa_supplicant *wpa_s,
                        wpa_printf(MSG_DEBUG, "MLD: mld ID=%u, link ID=%u",
                                   *mld_params, link_id);
 
+
                        if (!neigh_bss) {
                                *missing |= BIT(link_id);
-                       } else if (!ssid ||
-                                  (bss_params & (RNR_BSS_PARAM_SAME_SSID |
-                                                 RNR_BSS_PARAM_CO_LOCATED)) ||
-                                  wpa_scan_res_match(wpa_s, 0, neigh_bss,
-                                                     ssid, 1, 0)) {
+                       } else if ((!ssid ||
+                                   (bss_params & (RNR_BSS_PARAM_SAME_SSID |
+                                                  RNR_BSS_PARAM_CO_LOCATED)) ||
+                                   wpa_scan_res_match(wpa_s, 0, neigh_bss,
+                                                      ssid, 1, 0)) &&
+                                  !wpa_bssid_ignore_is_listed(
+                                          wpa_s, neigh_bss->bssid)) {
                                struct mld_link *l;
 
                                l = &bss->mld_links[bss->n_mld_links];