[openwrt/openwrt] hostapd: fix dealing with mac address changes for the primary BSS
LEDE Commits
lede-commits at lists.infradead.org
Fri Jun 20 05:57:53 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3ebf11071159d8b2d238cfd19cadad85059fe7e3
commit 3ebf11071159d8b2d238cfd19cadad85059fe7e3
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Jun 20 14:20:36 2025 +0200
hostapd: fix dealing with mac address changes for the primary BSS
Ensure that hapd->own_addr is set properly, since hostapd_setup_bss
only handles it for secondary BSS interfaces
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
package/network/services/hostapd/src/src/ap/ucode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index 393e8f86c7..9486108e62 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -258,6 +258,9 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
hapd->conf = conf->bss[idx];
conf->bss[idx] = old_bss;
+ if (hapd == iface->bss[0])
+ memcpy(hapd->own_addr, hapd->conf->bssid, ETH_ALEN);
+
hostapd_setup_bss(hapd, hapd == iface->bss[0], true);
hostapd_ucode_update_interfaces();
hostapd_owe_update_trans(iface);
More information about the lede-commits
mailing list