diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-10-10 10:27:21 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-10-10 10:27:21 +1100 |
commit | 71152bc9911bc34a98810b2398dac20df3fe8de3 (patch) | |
tree | f4267d4f757eb26429e15857ebb8c9b7de62713f /channels.c | |
parent | b59aaf3c4f3f449a4b86d8528668bd979be9aa5f (diff) |
- djm@cvs.openbsd.org 2013/09/19 01:24:46
[channels.c]
bz#1297 - tell the client (via packet_send_debug) when their preferred
listen address has been overridden by the server's GatewayPorts;
ok dtucker@
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/channels.c b/channels.c index 698fa6da2..d227379d0 100644 --- a/channels.c +++ b/channels.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: channels.c,v 1.325 2013/09/13 06:54:34 djm Exp $ */ | 1 | /* $OpenBSD: channels.c,v 1.326 2013/09/19 01:24:46 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -2710,8 +2710,20 @@ channel_fwd_bind_addr(const char *listen_addr, int *wildcardp, | |||
2710 | if (((datafellows & SSH_OLD_FORWARD_ADDR) && | 2710 | if (((datafellows & SSH_OLD_FORWARD_ADDR) && |
2711 | strcmp(listen_addr, "0.0.0.0") == 0 && is_client == 0) || | 2711 | strcmp(listen_addr, "0.0.0.0") == 0 && is_client == 0) || |
2712 | *listen_addr == '\0' || strcmp(listen_addr, "*") == 0 || | 2712 | *listen_addr == '\0' || strcmp(listen_addr, "*") == 0 || |
2713 | (!is_client && gateway_ports == 1)) | 2713 | (!is_client && gateway_ports == 1)) { |
2714 | wildcard = 1; | 2714 | wildcard = 1; |
2715 | /* | ||
2716 | * Notify client if they requested a specific listen | ||
2717 | * address and it was overridden. | ||
2718 | */ | ||
2719 | if (*listen_addr != '\0' && | ||
2720 | strcmp(listen_addr, "0.0.0.0") != 0 && | ||
2721 | strcmp(listen_addr, "*") != 0) { | ||
2722 | packet_send_debug("Forwarding listen address " | ||
2723 | "\"%s\" overridden by server " | ||
2724 | "GatewayPorts", listen_addr); | ||
2725 | } | ||
2726 | } | ||
2715 | else if (strcmp(listen_addr, "localhost") != 0) | 2727 | else if (strcmp(listen_addr, "localhost") != 0) |
2716 | addr = listen_addr; | 2728 | addr = listen_addr; |
2717 | } | 2729 | } |