diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-01-19 23:02:41 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-01-19 23:02:41 +0000 |
commit | e0f9a6fbdec82afeb5fe006848254af1b32d4917 (patch) | |
tree | 6a7f7d06848daa1230e2e3ff918d44fbf6527d78 /usr.bin | |
parent | 65149479c42ea85f5616756d54048a1b55c4398d (diff) |
When we added support for specified bind addresses for port forwards, we
added a quirk SSH_OLD_FORWARD_ADDR. There is a bug in our handling of
this for -L port forwards that causes the client to listen on both v4
and v6 addresses when connected to a server with this quirk, despite
having set 0.0.0.0 as a bind_address.
report and patch from Jan.Pechanec AT Sun.COM; ok dtucker@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/channels.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index fdee92669c9..774817adcb1 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.271 2007/12/27 14:22:08 dtucker Exp $ */ +/* $OpenBSD: channels.c,v 1.272 2008/01/19 23:02:40 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -2368,7 +2368,7 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por wildcard = 1; } else if (gateway_ports || is_client) { if (((datafellows & SSH_OLD_FORWARD_ADDR) && - strcmp(listen_addr, "0.0.0.0") == 0) || + strcmp(listen_addr, "0.0.0.0") == 0 && is_client == 0) || *listen_addr == '\0' || strcmp(listen_addr, "*") == 0 || (!is_client && gateway_ports == 1)) wildcard = 1; |