Mercurial > dropbear
comparison svr-tcpfwd.c @ 620:79d48028457c
Fix crash when remote forwarding was requested
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 07 Apr 2011 13:39:10 +0000 |
parents | 35d27c1d0ee7 |
children | c519b78b6d1a |
comparison
equal
deleted
inserted
replaced
619:35d27c1d0ee7 | 620:79d48028457c |
---|---|
208 tcpinfo->sendport = 0; | 208 tcpinfo->sendport = 0; |
209 tcpinfo->listenport = port; | 209 tcpinfo->listenport = port; |
210 tcpinfo->chantype = &svr_chan_tcpremote; | 210 tcpinfo->chantype = &svr_chan_tcpremote; |
211 tcpinfo->tcp_type = forwarded; | 211 tcpinfo->tcp_type = forwarded; |
212 | 212 |
213 if (!opts.listen_fwd_all | 213 if (!opts.listen_fwd_all || (strcmp(bindaddr, "localhost") == 0) ) { |
214 || (strcmp(tcpinfo->listenaddr, "localhost") == 0) ) { | |
215 // NULL means "localhost only" | 214 // NULL means "localhost only" |
216 m_free(bindaddr); | 215 m_free(bindaddr); |
217 bindaddr = NULL; | 216 bindaddr = NULL; |
218 } | 217 } |
219 tcpinfo->listenaddr = bindaddr; | 218 tcpinfo->listenaddr = bindaddr; |