summaryrefslogtreecommitdiffhomepage
path: root/svr-tcpfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2011-04-07 13:39:10 +0000
committerMatt Johnston <matt@ucc.asn.au>2011-04-07 13:39:10 +0000
commitb9e21e236771e819b86f324c0c20048546ccdcb6 (patch)
treee3d0be4ca275bd5b964f24fafb22fb639197e895 /svr-tcpfwd.c
parent665b768cef475fae9e6322bfb72875cd6fc0aa60 (diff)
Fix crash when remote forwarding was requested
--HG-- extra : convert_revision : 5c0a794976692a54ec36111291179020e2ae6c1e
Diffstat (limited to 'svr-tcpfwd.c')
-rw-r--r--svr-tcpfwd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c
index bf529cc..591a2fc 100644
--- a/svr-tcpfwd.c
+++ b/svr-tcpfwd.c
@@ -210,8 +210,7 @@ static int svr_remotetcpreq() {
tcpinfo->chantype = &svr_chan_tcpremote;
tcpinfo->tcp_type = forwarded;
- if (!opts.listen_fwd_all
- || (strcmp(tcpinfo->listenaddr, "localhost") == 0) ) {
+ if (!opts.listen_fwd_all || (strcmp(bindaddr, "localhost") == 0) ) {
// NULL means "localhost only"
m_free(bindaddr);
bindaddr = NULL;