mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-02-13 14:10:03 +01:00
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@nbd.name>
This commit is contained in:
parent
6e25c8bd78
commit
68c2ab8f5f
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue