[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:58:35 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/ba25b419134e4295cec45bd2d1040d469ad48340
commit ba25b419134e4295cec45bd2d1040d469ad48340
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>
(cherry picked from commit 3ebf11071159d8b2d238cfd19cadad85059fe7e3)
---
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 b13c0ff77c..758bb81ab2 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