Mercurial > dropbear
comparison cli-tcpfwd.c @ 66:38c3146aa23d
Some more sanity-checking of args, and just warn and ignore OpenSSH args
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 12 Aug 2004 14:19:05 +0000 |
parents | efb5e0b335cf |
children | b0316ce64e4b |
comparison
equal
deleted
inserted
replaced
65:02e4a7f614f8 | 66:38c3146aa23d |
---|---|
30 | 30 |
31 void setup_localtcp() { | 31 void setup_localtcp() { |
32 | 32 |
33 int ret; | 33 int ret; |
34 | 34 |
35 TRACE(("enter setup_localtcp")); | |
36 | |
35 if (cli_opts.localfwds == NULL) { | 37 if (cli_opts.localfwds == NULL) { |
36 TRACE(("cli_opts.localfwds == NULL")); | 38 TRACE(("cli_opts.localfwds == NULL")); |
37 } | 39 } |
38 | 40 |
39 while (cli_opts.localfwds != NULL) { | 41 while (cli_opts.localfwds != NULL) { |
47 cli_opts.localfwds->connectport); | 49 cli_opts.localfwds->connectport); |
48 } | 50 } |
49 | 51 |
50 cli_opts.localfwds = cli_opts.localfwds->next; | 52 cli_opts.localfwds = cli_opts.localfwds->next; |
51 } | 53 } |
54 TRACE(("leave setup_localtcp")); | |
52 | 55 |
53 } | 56 } |
54 | 57 |
55 static int cli_localtcp(unsigned int listenport, const char* remoteaddr, | 58 static int cli_localtcp(unsigned int listenport, const char* remoteaddr, |
56 unsigned int remoteport) { | 59 unsigned int remoteport) { |
94 | 97 |
95 void setup_remotetcp() { | 98 void setup_remotetcp() { |
96 | 99 |
97 struct TCPFwdList * iter = NULL; | 100 struct TCPFwdList * iter = NULL; |
98 | 101 |
102 TRACE(("enter setup_remotetcp")); | |
103 | |
99 if (cli_opts.remotefwds == NULL) { | 104 if (cli_opts.remotefwds == NULL) { |
100 TRACE(("cli_opts.remotefwds == NULL")); | 105 TRACE(("cli_opts.remotefwds == NULL")); |
101 } | 106 } |
102 | 107 |
103 iter = cli_opts.remotefwds; | 108 iter = cli_opts.remotefwds; |
104 | 109 |
105 while (iter != NULL) { | 110 while (iter != NULL) { |
106 send_msg_global_request_remotetcp(iter->listenport); | 111 send_msg_global_request_remotetcp(iter->listenport); |
107 iter = iter->next; | 112 iter = iter->next; |
108 } | 113 } |
114 TRACE(("leave setup_remotetcp")); | |
109 } | 115 } |
110 | 116 |
111 static int newtcpforwarded(struct Channel * channel) { | 117 static int newtcpforwarded(struct Channel * channel) { |
112 | 118 |
113 unsigned int origport; | 119 unsigned int origport; |