]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
unetmsg: fix stale network cleanup in unetd_network_update()
authorFelix Fietkau <nbd@nbd.name>
Fri, 6 Feb 2026 09:17:50 +0000 (09:17 +0000)
committerFelix Fietkau <nbd@nbd.name>
Sat, 7 Feb 2026 09:04:17 +0000 (10:04 +0100)
The condition checked !data.networks instead of !data.networks[name],
making it always false since data.networks was already validated earlier
in the function. Networks removed from unetd were never closed.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc

index 7122a9825f93442eeb9604720830ad23c161c1e5..92f81262efb2f2581d1d4c882bdbed82cae6226f 100644 (file)
@@ -524,7 +524,7 @@ function unetd_network_update()
        }
 
        for (let name in networks)
-               if (!data.networks)
+               if (!data.networks[name])
                        network_close(name);
 }