summaryrefslogtreecommitdiff
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
parent795b86313f1f1aab9691666c4f2d5dae6e4acd50 (diff)
revert a diff I didn't mean to commit
-rw-r--r--channels.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/channels.c b/channels.c
index ea79dd3c5..1020071ff 100644
--- a/channels.c
+++ b/channels.c
@@ -2700,7 +2700,6 @@ channel_set_af(int af)
2700 * "0.0.0.0" -> wildcard v4/v6 if SSH_OLD_FORWARD_ADDR 2700 * "0.0.0.0" -> wildcard v4/v6 if SSH_OLD_FORWARD_ADDR
2701 * "" (empty string), "*" -> wildcard v4/v6 2701 * "" (empty string), "*" -> wildcard v4/v6
2702 * "localhost" -> loopback v4/v6 2702 * "localhost" -> loopback v4/v6
2703 * "127.0.0.1" / "::1" -> accepted even if gateway_ports isn't set
2704 */ 2703 */
2705static const char * 2704static const char *
2706channel_fwd_bind_addr(const char *listen_addr, int *wildcardp, 2705channel_fwd_bind_addr(const char *listen_addr, int *wildcardp,
@@ -2730,20 +2729,9 @@ channel_fwd_bind_addr(const char *listen_addr, int *wildcardp,
2730 "\"%s\" overridden by server " 2729 "\"%s\" overridden by server "
2731 "GatewayPorts", listen_addr); 2730 "GatewayPorts", listen_addr);
2732 } 2731 }
2733 } else if (strcmp(listen_addr, "localhost") != 0 ||
2734 strcmp(listen_addr, "127.0.0.1") == 0 ||
2735 strcmp(listen_addr, "::1") == 0) {
2736 /* Accept localhost address when GatewayPorts=yes */
2737 addr = listen_addr;
2738 } 2732 }
2739 } else if (strcmp(listen_addr, "127.0.0.1") == 0 || 2733 else if (strcmp(listen_addr, "localhost") != 0)
2740 strcmp(listen_addr, "::1") == 0) { 2734 addr = listen_addr;
2741 /*
2742 * If a specific IPv4/IPv6 localhost address has been
2743 * requested then accept it even if gateway_ports is in
2744 * effect. This allows the client to prefer IPv4 or IPv6.
2745 */
2746 addr = listen_addr;
2747 } 2735 }
2748 if (wildcardp != NULL) 2736 if (wildcardp != NULL)
2749 *wildcardp = wildcard; 2737 *wildcardp = wildcard;