From: Andrei Otcheretianski Date: Mon, 20 Nov 2023 23:51:39 +0000 (+0200) Subject: AP: Avoid setting same MLD and link address X-Git-Tag: hostap_2_11~755 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f60287e6c91bbb5f20758a6f5000ec9fd714fae2;p=thirdparty%2Fhostap.git 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 --- diff --git a/hostapd/main.c b/hostapd/main.c index fcb01f60e..c95cf8a71 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;