[openssh-commits] [openssh] 01/05: upstream: the GatewayPorts vs -R listen address selection logic is

git+noreply at mindrot.org git+noreply at mindrot.org
Sat Jan 25 18:20:10 AEDT 2020


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 846446bf3e7421e6671a4afd074bdf15eecd7832
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Sat Jan 25 06:40:20 2020 +0000

    upstream: the GatewayPorts vs -R listen address selection logic is
    
    still confusing people, so add another comment explaining the special
    handling of "localhost"; bz#3258
    
    OpenBSD-Commit-ID: e6bf0f0fbf1c7092bf0dbd9c6eab105970b5b53a
---
 channels.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/channels.c b/channels.c
index 0f45aee4..226ba7a3 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.394 2019/07/07 01:05:00 dtucker Exp $ */
+/* $OpenBSD: channels.c,v 1.395 2020/01/25 06:40:20 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -3356,7 +3356,12 @@ channel_fwd_bind_addr(struct ssh *ssh, const char *listen_addr, int *wildcardp,
 		} else if (strcmp(listen_addr, "localhost") != 0 ||
 		    strcmp(listen_addr, "127.0.0.1") == 0 ||
 		    strcmp(listen_addr, "::1") == 0) {
-			/* Accept localhost address when GatewayPorts=yes */
+			/*
+			 * Accept explicit localhost address when
+			 * GatewayPorts=yes. The "localhost" hostname is
+			 * deliberately skipped here so it will listen on all
+			 * available local address families.
+			 */
 			addr = listen_addr;
 		}
 	} else if (strcmp(listen_addr, "127.0.0.1") == 0 ||

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list