summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2026-02-06 09:30:26 +0000
committerFelix Fietkau2026-02-16 08:09:16 +0000
commitd63541ff9841853679b8ff49af72eec25aabf901 (patch)
treeb1c5a5ebc99b15f51b954667c7dc059a66a55171
parentef79f65981306409812d4dcd294b6a2bca31d5af (diff)
downloadopenwrt-d63541ff9841853679b8ff49af72eec25aabf901.tar.gz
unetmsg: fix inverted condition in network_rx_socket_close()
The cleanup condition checked != instead of ==, inverting the logic. This caused two problems: When an authenticated RX connection disconnected, remote state for that host was never cleaned up since the stored entry matched the one being closed. When a stale unauthenticated connection from a peer closed, any existing authenticated connection from the same peer was incorrectly deleted and its remote state wiped. Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit f09596f84f3572d963e1c893762fd105b4ceee2e)
-rw-r--r--package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc b/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc
index 1f1c97a2ca..54e77596f1 100644
--- a/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc
+++ b/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc
@@ -62,7 +62,7 @@ function network_rx_socket_close(data)
core.dbg(`Incoming connection from ${data.name} closed\n`);
let net = networks[data.network];
- if (net && net.rx_channels[data.name] != data) {
+ if (net && net.rx_channels[data.name] == data) {
delete net.rx_channels[data.name];
network_rx_cleanup_state(data.name);
}