diff options
author | Matt Johnston <matt@ucc.asn.au> | 2010-02-24 16:13:15 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2010-02-24 16:13:15 +0000 |
commit | 85288d7b6174b78af903fb55593bccd0014e5f30 (patch) | |
tree | fd24d6e0438a367d925b2d06be44100de3c78583 /tcp-accept.c | |
parent | 3dbc7078206b544dd80a6a9bbd091075634b2942 (diff) |
- Progress for allowing specifying a listenaddr for tcp forwards
--HG--
extra : convert_revision : 48fdaa8706d1acda35e9d564adc9a1fbc96c18c8
Diffstat (limited to 'tcp-accept.c')
-rw-r--r-- | tcp-accept.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tcp-accept.c b/tcp-accept.c index 7457c9b..cf0aa7a 100644 --- a/tcp-accept.c +++ b/tcp-accept.c @@ -104,21 +104,13 @@ int listen_tcpfwd(struct TCPListener* tcpinfo) { struct Listener *listener = NULL; int nsocks; char* errstring = NULL; - /* listen_spec = NULL indicates localhost */ - const char* listen_spec = NULL; TRACE(("enter listen_tcpfwd")) /* first we try to bind, so don't need to do so much cleanup on failure */ snprintf(portstring, sizeof(portstring), "%d", tcpinfo->listenport); - /* a listenaddr of "" will indicate all interfaces */ - if (opts.listen_fwd_all - && (strcmp(tcpinfo->listenaddr, "localhost") != 0) ) { - listen_spec = tcpinfo->listenaddr; - } - - nsocks = dropbear_listen(listen_spec, portstring, socks, + nsocks = dropbear_listen(tcpinfo->listenaddr, portstring, socks, DROPBEAR_MAX_SOCKS, &errstring, &ses.maxfd); if (nsocks < 0) { dropbear_log(LOG_INFO, "TCP forward failed: %s", errstring); |