From: Felix Fietkau Date: Fri, 20 Jun 2025 12:20:36 +0000 (+0200) Subject: hostapd: fix dealing with mac address changes for the primary BSS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ebf11071159d8b2d238cfd19cadad85059fe7e3;p=thirdparty%2Fopenwrt.git 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 --- diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index 393e8f86c72..9486108e628 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);