[openssh-commits] [openssh] branch master updated: upstream: mux: fix incorrect return value check in local forward
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Jul 4 10:20:11 AEST 2025
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new fd10cea0f upstream: mux: fix incorrect return value check in local forward
fd10cea0f is described below
commit fd10cea0f16e928ae2b52fbeadccd475d0438eb4
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Fri Jul 4 00:17:55 2025 +0000
upstream: mux: fix incorrect return value check in local forward
cancellation
channel_cancel_lport_listener() returns 1 on success and 0 on failure.
The previous code incorrectly checked for `== -1`, a value the function
never returns, so failure was not detected and the "port not found"
error message was never shown when cancelling dynamic or local port
forwards.
From: Boris Tonofa <b.tonofa at ideco.ru>
OpenBSD-Commit-ID: 3e9d2252a4d0bd318d4f25e2b518afb44acea170
---
mux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mux.c b/mux.c
index 415024f74..1a4f357d4 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.103 2024/10/12 10:50:37 jsg Exp $ */
+/* $OpenBSD: mux.c,v 1.104 2025/07/04 00:17:55 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm at openbsd.org>
*
@@ -931,7 +931,7 @@ mux_master_process_close_fwd(struct ssh *ssh, u_int rid,
} else { /* local and dynamic forwards */
/* Ditto */
if (channel_cancel_lport_listener(ssh, &fwd, fwd.connect_port,
- &options.fwd_opts) == -1)
+ &options.fwd_opts) != 1)
error_reason = "port not found";
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list