From: Felix Fietkau Date: Fri, 6 Feb 2026 10:12:31 +0000 (+0000) Subject: unetmsg: fix reconnect loop when RX authenticates before TX X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=212040b5cac619ec8009b0b4262d11b4e3abfdc4;p=thirdparty%2Fopenwrt.git unetmsg: fix reconnect loop when RX authenticates before TX When both peers connect simultaneously, the RX side can authenticate before the TX handshake completes. network_check_auth() was sending a ping on the unauthenticated TX channel, which gets rejected by the remote's pre-auth handler as "Auth failed", killing the connection and triggering an endless reconnect cycle. Check chan.auth before interacting with the TX channel. If TX auth hasn't completed yet, just schedule a reconnect timer - auth_data_cb already handles state sync when TX auth completes. Signed-off-by: Felix Fietkau --- 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 f6b0ef2d595..c7301e1a09f 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 @@ -203,16 +203,8 @@ function network_check_auth(sock_data, info) core.dbg(`Incoming connection from ${sock_data.name} established\n`); let chan = net.tx_channels[sock_data.name]; - if (!chan) { + if (!chan || !chan.auth) net.timer.set(100); - return; - } - - chan.channel.request({ - method: "ping", - data: {}, - return: "ignore", - }); } function network_accept(net, sock, addr)