From f60287e6c91bbb5f20758a6f5000ec9fd714fae2 Mon Sep 17 00:00:00 2001 From: Andrei Otcheretianski Date: Tue, 21 Nov 2023 01:51:39 +0200 Subject: [PATCH] AP: Avoid setting same MLD and link address For AP MLD, when BSSID configuration is specified without mld_addr, the first link address is used as the MLD MAC address as well. Though IEEE P802.11be allows this, the current implementation and the kernel aren't happy about it. Better avoid this. Signed-off-by: Andrei Otcheretianski --- hostapd/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hostapd/main.c b/hostapd/main.c index fcb01f60e1..c95cf8a71e 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -247,8 +247,12 @@ static int hostapd_driver_init(struct hostapd_iface *iface) * Use the configured MLD MAC address as the interface hardware address * if this AP is a part of an AP MLD. */ - if (!is_zero_ether_addr(hapd->conf->mld_addr) && hapd->conf->mld_ap) - params.bssid = hapd->conf->mld_addr; + if (hapd->conf->mld_ap) { + if (!is_zero_ether_addr(hapd->conf->mld_addr)) + params.bssid = hapd->conf->mld_addr; + else + params.bssid = NULL; + } #endif /* CONFIG_IEEE80211BE */ params.ifname = hapd->conf->iface; -- 2.47.2