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:
parent
c6d20bbf51
commit
06a7b0245f
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue