]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Avoid setting same MLD and link address
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Mon, 20 Nov 2023 23:51:39 +0000 (01:51 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 25 Nov 2023 19:44:28 +0000 (21:44 +0200)
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 <andrei.otcheretianski@intel.com>
hostapd/main.c

index fcb01f60e104b102455261c7763868e5a159f601..c95cf8a71e3d04ec837fe479bcd5665ec963da32 100644 (file)
@@ -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;