[PATCH] AP: Do not iterate disabled interfaces when adding RNR

Andrei Otcheretianski andrei.otcheretianski at intel.com
Tue Dec 26 01:06:23 PST 2023


From: Ilan Peer <ilan.peer at intel.com>

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 src/ap/ieee802_11.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index a939ad35e2..dc41f87da6 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7403,6 +7403,9 @@ static size_t hostapd_eid_rnr_multi_iface_len(struct hostapd_data *hapd,
 		iface = hapd->iface->interfaces->iface[i];
 		bool ap_mld = false;
 
+		if (iface->state != HAPD_IFACE_ENABLED)
+			continue;
+
 #ifdef CONFIG_IEEE80211BE
 		if (hapd->conf->mld_ap && iface->bss[0]->conf->mld_ap &&
 		    hapd->conf->mld_id == iface->bss[0]->conf->mld_id)
@@ -7612,6 +7615,9 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
 	u8 tbtt_count = 0, op_class, channel;
 	bool ap_mld = false;
 
+	if (iface->state != HAPD_IFACE_ENABLED)
+		return eid;
+
 #ifdef CONFIG_IEEE80211BE
 	ap_mld = !!hapd->conf->mld_ap;
 #endif /* CONFIG_IEEE80211BE */
@@ -7676,6 +7682,9 @@ static u8 * hostapd_eid_rnr_multi_iface(struct hostapd_data *hapd, u8 *eid,
 		iface = hapd->iface->interfaces->iface[i];
 		bool ap_mld = false;
 
+		if (iface->state != HAPD_IFACE_ENABLED)
+			continue;
+
 #ifdef CONFIG_IEEE80211BE
 		if (hapd->conf->mld_ap && iface->bss[0]->conf->mld_ap &&
 		    hapd->conf->mld_id == iface->bss[0]->conf->mld_id)
-- 
2.43.0




More information about the Hostap mailing list