From e6eebd0d5cda2e6704d384adc1bcea37d269213f Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Tue, 21 Nov 2023 01:51:27 +0200 Subject: [PATCH] MLD: Do not consider ignored BSSs for links when parsing RNR info 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 Signed-off-by: Andrei Otcheretianski --- 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 0ca36f1bc..329d3cdc7 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -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];