[openwrt/openwrt] unetmsg: ping on tx channel after new incoming connection
LEDE Commits
lede-commits at lists.infradead.org
Mon May 12 03:47:38 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9bdbe24176ca32925e4aaa3f8650d5eb11fdfc5f
commit 9bdbe24176ca32925e4aaa3f8650d5eb11fdfc5f
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon May 12 11:13:44 2025 +0200
unetmsg: ping on tx channel after new incoming connection
Ensure that stale connections are timed out faster
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
.../unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
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 cf92a67e13..d905dbd349 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
@@ -191,8 +191,18 @@ function network_check_auth(sock_data, info)
sock_data.auth = true;
net.rx_channels[sock_data.name] = sock_data;
core.dbg(`Incoming connection from ${sock_data.name} established\n`);
- if (!net.tx_channels[sock_data.name])
+
+ let chan = net.tx_channels[sock_data.name];
+ if (!chan) {
net.timer.set(100);
+ return;
+ }
+
+ chan.channel.request({
+ method: "ping",
+ data: {},
+ return: "ignore",
+ });
}
function network_accept(net, sock, addr)
More information about the lede-commits
mailing list