comparison cli-main.c @ 1465:f7a53832501d

cli_bind_address_connect * replaces -b dummy option in dbclient to be similar with openssh -b option * useful in multi-wan connections
author houseofkodai <karthik@houseofkodai.in>
date Mon, 01 May 2017 08:26:15 +0530
parents 58a74cb829b8
children f787f60f8e45
comparison
equal deleted inserted replaced
1464:ad637c9e0f6f 1465:f7a53832501d
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'", cli_opts.username, 69 TRACE(("user='%s' host='%s' port='%s' bind_address='%s'", cli_opts.username,
70 cli_opts.remotehost, cli_opts.remoteport)) 70 cli_opts.remotehost, cli_opts.remoteport, cli_opts.bind_address))
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); 89 progress = connect_remote(cli_opts.remotehost, cli_opts.remoteport, cli_connected, &ses, cli_opts.bind_address);
90 sock_in = sock_out = -1; 90 sock_in = sock_out = -1;
91 } 91 }
92 92
93 cli_session(sock_in, sock_out, progress, proxy_cmd_pid); 93 cli_session(sock_in, sock_out, progress, proxy_cmd_pid);
94 94