- 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@
This commit is contained in:
Darren Tucker 2013-10-10 10:27:21 +11:00
parent b59aaf3c4f
commit 71152bc991
2 changed files with 19 additions and 2 deletions

View File

@ -12,6 +12,11 @@
- djm@cvs.openbsd.org 2013/09/19 00:49:12
[sftp-client.c]
fix swapped pflag and printflag in sftp upload_dir; from Iain Morgan
- 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@
20131009
- (djm) [openbsd-compat/arc4random.c openbsd-compat/chacha_private.h] Pull

View File

@ -1,4 +1,4 @@
/* $OpenBSD: channels.c,v 1.325 2013/09/13 06:54:34 djm Exp $ */
/* $OpenBSD: channels.c,v 1.326 2013/09/19 01:24:46 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* 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,
if (((datafellows & SSH_OLD_FORWARD_ADDR) &&
strcmp(listen_addr, "0.0.0.0") == 0 && is_client == 0) ||
*listen_addr == '\0' || strcmp(listen_addr, "*") == 0 ||
(!is_client && gateway_ports == 1))
(!is_client && gateway_ports == 1)) {
wildcard = 1;
/*
* Notify client if they requested a specific listen
* address and it was overridden.
*/
if (*listen_addr != '\0' &&
strcmp(listen_addr, "0.0.0.0") != 0 &&
strcmp(listen_addr, "*") != 0) {
packet_send_debug("Forwarding listen address "
"\"%s\" overridden by server "
"GatewayPorts", listen_addr);
}
}
else if (strcmp(listen_addr, "localhost") != 0)
addr = listen_addr;
}