summaryrefslogtreecommitdiffstats
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-05-21 17:13:36 +1000
committerDamien Miller <djm@mindrot.org>2014-05-21 17:13:36 +1000
commite84d10302aeaf7a1acb05c451f8718143656856a (patch)
tree4bc1fa4033df09c4d75cab0dac274baf95c2c75b /channels.c
parent795b86313f1f1aab9691666c4f2d5dae6e4acd50 (diff)
revert a diff I didn't mean to commit
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/channels.c b/channels.c
index ea79dd3c..1020071f 100644
--- a/channels.c
+++ b/channels.c
@@ -2700,7 +2700,6 @@ channel_set_af(int af)
* "0.0.0.0" -> wildcard v4/v6 if SSH_OLD_FORWARD_ADDR
* "" (empty string), "*" -> wildcard v4/v6
* "localhost" -> loopback v4/v6
- * "127.0.0.1" / "::1" -> accepted even if gateway_ports isn't set
*/
static const char *
channel_fwd_bind_addr(const char *listen_addr, int *wildcardp,
@@ -2730,20 +2729,9 @@ channel_fwd_bind_addr(const char *listen_addr, int *wildcardp,
"\"%s\" overridden by server "
"GatewayPorts", listen_addr);
}
- } 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 */
- addr = listen_addr;
}
- } else if (strcmp(listen_addr, "127.0.0.1") == 0 ||
- strcmp(listen_addr, "::1") == 0) {
- /*
- * If a specific IPv4/IPv6 localhost address has been
- * requested then accept it even if gateway_ports is in
- * effect. This allows the client to prefer IPv4 or IPv6.
- */
- addr = listen_addr;
+ else if (strcmp(listen_addr, "localhost") != 0)
+ addr = listen_addr;
}
if (wildcardp != NULL)
*wildcardp = wildcard;