[openwrt/openwrt] wifi-scripts: fix nested config accumulation in wdev_set_data

LEDE Commits lede-commits at lists.infradead.org
Mon Feb 16 00:21:10 PST 2026


nbd pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/3e3f32506377da91d69498d06bcc9c0c7239adac

commit 3e3f32506377da91d69498d06bcc9c0c7239adac
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Feb 4 10:34:55 2026 +0000

    wifi-scripts: fix nested config accumulation in wdev_set_data
    
    When storing device-level data, wdev_set_data() spread the entire wdev
    object into handler_data. Since handler_config.data is set from the
    previous handler_data[wdev.name] before each setup, this created
    exponentially growing nesting with each reload, eventually causing
    "nesting too deep" JSON parse errors.
    
    Fix by initializing cur to a simple object containing only the device
    name instead of the entire wdev object.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 68c2ab8f5fdf1c12966fa0cdf3c13d889beccdbe)
---
 package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
index 6e3a5d938f..768a421480 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
@@ -465,7 +465,7 @@ function wdev_mark_up(wdev)
 function wdev_set_data(wdev, vif, vlan, data)
 {
 	let config = wdev.handler_config;
-	let cur = wdev;
+	let cur = { name: wdev.name };
 	let cur_type = "device";
 	if (!config)
 		return ubus.STATUS_INVALID_ARGUMENT;




More information about the lede-commits mailing list