]> 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>
Mon, 16 Feb 2026 08:07:46 +0000 (08:07 +0000)
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>
(cherry picked from commit a2368e0f6906cd6ad374c0280a1c219f789ca258)

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);
 }