summaryrefslogtreecommitdiff
path: root/tcp-accept.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2010-02-24 16:13:15 +0000
committerMatt Johnston <matt@ucc.asn.au>2010-02-24 16:13:15 +0000
commit50f271a869623ed3a5b91263522396fe21342bb2 (patch)
treefd24d6e0438a367d925b2d06be44100de3c78583 /tcp-accept.c
parent60a4ac6e822bb1dc388a50045a98230b899c7092 (diff)
downloaddropbear-50f271a869623ed3a5b91263522396fe21342bb2.tar.gz
- Progress for allowing specifying a listenaddr for tcp forwards
Diffstat (limited to 'tcp-accept.c')
-rw-r--r--tcp-accept.c10
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);