hostapd: ucode: handle null config in iface_set_config again

config_reset and shutdown call iface_set_config(name) with no config, but
the null-config guard was dropped in the MLO rework, so config.phy
dereferenced null and threw: config_reset reset nothing and shutdown left
hostapd-created interfaces behind. Restore the guard, removing the stale
config entry and tearing the interface down via iface_config_remove.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2026-07-10 13:57:16 +02:00
parent c6d20bbf51
commit 06a7b0245f

View file

@ -1009,6 +1009,11 @@ function iface_set_config(name, config)
{
let old_config = hostapd.data.config[name];
if (!config) {
delete hostapd.data.config[name];
return iface_config_remove(name, old_config);
}
hostapd.data.config[name] = config;
let phy = config.phy;