Only start a BSS after a config change if it was started before.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
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;
goto free;
}
+ started = hapd->started;
__uc_hostapd_bss_stop(hapd);
old_bss = hapd->conf;
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: