]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: fix disabled vif tracking using wrong dictionary key
authorFelix Fietkau <nbd@nbd.name>
Fri, 26 Jun 2026 17:00:36 +0000 (19:00 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 26 Jun 2026 17:01:46 +0000 (19:01 +0200)
wdev_update_disabled_vifs() indexed the disabled_vifs map with the wdev
object instead of the vif name. The map is read back via
disabled_vifs[vif.name], so disabled vifs were never matched, and
coercing the wdev object into a string key triggered an infinite
escaping loop in ucv_to_string_json_encoded() during state output,
causing OOM on reboot.

Suggested-by: Shayne Chen (陳軒丞) <Shayne.Chen@mediatek.com>
Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc

index 768a421480c1e30a0ed148a26fa089c0f574bbba..f55fc3118904e053277b64ff626b22ec06e75cea 100644 (file)
@@ -353,7 +353,7 @@ function wdev_update_disabled_vifs(wdev)
 
                let name = vif.name;
                if (enabled == false)
-                       disabled[wdev] = true;
+                       disabled[name] = true;
                else if (ifindex != cache[name])
                        changed = true;