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>
{
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;