comparison cli-main.c @ 1466:f787f60f8e45

bind to port as well with -b
author Matt Johnston <matt@ucc.asn.au>
date Fri, 26 Jan 2018 00:27:48 +0800
parents f7a53832501d
children 0c16b4ccbd54
comparison
equal deleted inserted replaced
1465:f7a53832501d 1466:f787f60f8e45
64 if (opts.usingsyslog) { 64 if (opts.usingsyslog) {
65 startsyslog("dbclient"); 65 startsyslog("dbclient");
66 } 66 }
67 #endif 67 #endif
68 68
69 TRACE(("user='%s' host='%s' port='%s' bind_address='%s'", cli_opts.username, 69 TRACE(("user='%s' host='%s' port='%s' bind_address='%s' bind_port='%s'", cli_opts.username,
70 cli_opts.remotehost, cli_opts.remoteport, cli_opts.bind_address)) 70 cli_opts.remotehost, cli_opts.remoteport, cli_opts.bind_address, cli_opts.bind_port))
71 71
72 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) { 72 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
73 dropbear_exit("signal() error"); 73 dropbear_exit("signal() error");
74 } 74 }
75 75
84 dropbear_exit("signal() error"); 84 dropbear_exit("signal() error");
85 } 85 }
86 } else 86 } else
87 #endif 87 #endif
88 { 88 {
89 progress = connect_remote(cli_opts.remotehost, cli_opts.remoteport, cli_connected, &ses, cli_opts.bind_address); 89 progress = connect_remote(cli_opts.remotehost, cli_opts.remoteport,
90 cli_connected, &ses, cli_opts.bind_address, cli_opts.bind_port);
90 sock_in = sock_out = -1; 91 sock_in = sock_out = -1;
91 } 92 }
92 93
93 cli_session(sock_in, sock_out, progress, proxy_cmd_pid); 94 cli_session(sock_in, sock_out, progress, proxy_cmd_pid);
94 95