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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ilan Peer <ilan.peer@xxxxxxxxx>

Signed-off-by: Ilan Peer <ilan.peer@xxxxxxxxx>
---
 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


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux