[openwrt/openwrt] wifi-scripts: netifd: fix null dereference in config_init for missing devices
LEDE Commits
lede-commits at lists.infradead.org
Mon Feb 16 00:21:11 PST 2026
nbd pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/f867497e3580628e55ce0757c31df16aa51c3955
commit f867497e3580628e55ce0757c31df16aa51c3955
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Feb 15 08:23:57 2026 +0000
wifi-scripts: netifd: fix null dereference in config_init for missing devices
Add optional chaining when accessing device config in the wifi-iface
loop to handle cases where a referenced device doesn't exist.
Signed-off-by: Felix Fietkau <nbd at nbd.name>
(cherry picked from commit 8b994ed3970ffd02ee77889304ca32bdbecdb1f3)
---
package/network/config/wifi-scripts/files/lib/netifd/wireless.uc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index cb505a9eb8..513fa30ef7 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -133,7 +133,7 @@ function config_init(uci)
let mlo_vif = parse_bool(data.mlo);
let radios = map(dev_names, (v) => radio_idx[v]);
radios = filter(radios, (v) => v != null);
- let radio_config = map(dev_names, (v) => devices[v].config);
+ let radio_config = map(dev_names, (v) => devices[v]?.config);
let ifname;
let mlo_created = false;
More information about the lede-commits
mailing list