]> git.ipfire.org Git - thirdparty/openssh-portable.git/commit
upstream: mux: fix incorrect return value check in local forward
authordjm@openbsd.org <djm@openbsd.org>
Fri, 4 Jul 2025 00:17:55 +0000 (00:17 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 4 Jul 2025 00:20:08 +0000 (10:20 +1000)
commitfd10cea0f16e928ae2b52fbeadccd475d0438eb4
tree6803b90ad4d01a0ad13d964305dfc28ae90e3d09
parent29cf521486bf97ab9de5b9b356f812107e0671bc
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@ideco.ru>

OpenBSD-Commit-ID: 3e9d2252a4d0bd318d4f25e2b518afb44acea170
mux.c