diff options
author | Felix Fietkau <nbd@nbd.name> | 2023-08-08 20:11:42 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-08-08 20:11:43 +0200 |
commit | 9b56c27a8a08a5c40d38064b9046f42177c94768 (patch) | |
tree | a1119f029917b6014b095f710286e558ac841738 | |
parent | 5ae3b195a17d3c8a7b25e826928cd73117fbbe57 (diff) |
hostapd: add extra sanity checks for config reload
Avoid getting stuck because of bad configurations
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | package/network/services/hostapd/files/hostapd.uc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index cc026cc853..b52732adcb 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -117,6 +117,9 @@ function iface_reload_config(phy, config, old_config) if (is_equal(old_config.bss, config.bss)) return true; + if (!old_config.bss || !old_config.bss[0]) + return false; + if (config.bss[0].ifname != old_config.bss[0].ifname) return false; |