[openwrt/openwrt] hostapd: fix bss config reload while in DFS state
LEDE Commits
lede-commits at lists.infradead.org
Sat Aug 2 08:44:58 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3786d15561f6e3923eac9cdff4246226a96b589a
commit 3786d15561f6e3923eac9cdff4246226a96b589a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Jul 5 20:45:48 2025 +0200
hostapd: fix bss config reload while in DFS state
Only start a BSS after a config change if it was started before.
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
package/network/services/hostapd/src/src/ap/ucode.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index cbe2ee9506..081872ebe8 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -256,6 +256,7 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
uc_value_t *files_only = uc_fn_arg(2);
unsigned int i, idx = 0;
int ret = -1;
+ bool started;
if (!hapd || ucv_type(file) != UC_STRING)
goto out;
@@ -287,6 +288,7 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
goto free;
}
+ started = hapd->started;
__uc_hostapd_bss_stop(hapd);
old_bss = hapd->conf;
@@ -299,7 +301,10 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
if (hapd == iface->bss[0])
memcpy(hapd->own_addr, hapd->conf->bssid, ETH_ALEN);
- ret = __uc_hostapd_bss_start(hapd);
+ if (started)
+ ret = __uc_hostapd_bss_start(hapd);
+ else
+ ret = 0;
hostapd_ucode_update_interfaces();
free:
More information about the lede-commits
mailing list