[PATCH 13/42] bss: do not consider ignored BSSs for links

Andrei Otcheretianski andrei.otcheretianski at intel.com
Mon Nov 20 15:51:27 PST 2023


From: Benjamin Berg <benjamin.berg at intel.com>

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 at intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 wpa_supplicant/bss.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index 9f48da31b0..401df12fea 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -19,6 +19,7 @@
 #include "scan.h"
 #include "bss.h"
 #include "rsn_supp/wpa.h"
+#include "bssid_ignore.h"
 
 static void wpa_bss_set_hessid(struct wpa_bss *bss)
 {
@@ -1534,13 +1535,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 ||
-				   bss_params & 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 ||
+				    bss_params & 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];
-- 
2.38.1




More information about the Hostap mailing list