]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: Avoid syslog message variable data does not exist
authorTobias Waldvogel <tobias.waldvogel@gmail.com>
Thu, 14 Aug 2025 17:33:02 +0000 (19:33 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 14 Aug 2025 18:40:31 +0000 (20:40 +0200)
Initialize data to {} if null before calling mac80211.sh
to avoid a confusing error message in the syslog.

Fixes: https://github.com/openwrt/openwrt/issues/14010
Signed-off-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cosmetic change]
package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc

index 22f5ee54d97388e0278ef0a44c244e88b75356e1..950f10ed17cff9860bbd166092a0b3e5702830bf 100644 (file)
@@ -221,7 +221,7 @@ function __run_next_handler()
        wdev.dbg("run " + op);
        if (name != mlo_name)
                wdev_mlo_fixup(wdev.handler_config);
-       wdev.handler_config.data = wdev.handler_data[wdev.name];
+       wdev.handler_config.data = wdev.handler_data[wdev.name] ?? {};
        wdev_script_task = netifd.process({
                cb: () => run_handler_cb(wdev, cb),
                dir: netifd.wireless.path,