mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
- Progress for allowing specifying a listenaddr for tcp forwards
--HG-- extra : convert_revision : 48fdaa8706d1acda35e9d564adc9a1fbc96c18c8
This commit is contained in:
11
svr-tcpfwd.c
11
svr-tcpfwd.c
@@ -206,11 +206,20 @@ static int svr_remotetcpreq() {
|
||||
tcpinfo = (struct TCPListener*)m_malloc(sizeof(struct TCPListener));
|
||||
tcpinfo->sendaddr = NULL;
|
||||
tcpinfo->sendport = 0;
|
||||
tcpinfo->listenaddr = bindaddr;
|
||||
tcpinfo->listenport = port;
|
||||
tcpinfo->chantype = &svr_chan_tcpremote;
|
||||
tcpinfo->tcp_type = forwarded;
|
||||
|
||||
if (!opts.listen_fwd_all
|
||||
|| (strcmp(tcpinfo->listenaddr, "localhost") == 0) ) {
|
||||
// NULL means "localhost only"
|
||||
tcpinfo->listenaddr = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
tcpinfo->listenaddr = bindaddr;
|
||||
}
|
||||
|
||||
ret = listen_tcpfwd(tcpinfo);
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user