diff options
author | Matt Johnston <matt@ucc.asn.au> | 2004-08-12 16:41:58 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2004-08-12 16:41:58 +0000 |
commit | 8e1ec24f55be1a9af2595a58bb4b805bebd7fa9d (patch) | |
tree | 0b54a905a49358adc37ce32e3e80239dd6ebd736 /cli-tcpfwd.c | |
parent | 538bc5a09e8a7aa6fdc7f38f0bac649efd6bd264 (diff) |
Merging in the changes from 0.41-0.43 main Dropbear tree
--HG--
extra : convert_revision : 4c3428781bc8faf0fd7cadd7099fbd7f4ea386e7
Diffstat (limited to 'cli-tcpfwd.c')
-rw-r--r-- | cli-tcpfwd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cli-tcpfwd.c b/cli-tcpfwd.c index 52268b9..8d8e605 100644 --- a/cli-tcpfwd.c +++ b/cli-tcpfwd.c @@ -120,7 +120,7 @@ static int newtcpforwarded(struct Channel * channel) { struct TCPFwdList * iter = NULL; char portstring[NI_MAXSERV]; int sock; - int ret = DROPBEAR_FAILURE; + int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; /* We don't care what address they connected to */ buf_eatstring(ses.payload); @@ -148,6 +148,7 @@ static int newtcpforwarded(struct Channel * channel) { sock = connect_remote(iter->connectaddr, portstring, 1, NULL); if (sock < 0) { TRACE(("leave newtcpdirect: sock failed")); + err = SSH_OPEN_CONNECT_FAILED; goto out; } @@ -160,9 +161,9 @@ static int newtcpforwarded(struct Channel * channel) { channel->infd = sock; channel->initconn = 1; - ret = DROPBEAR_SUCCESS; + err = SSH_OPEN_IN_PROGRESS; out: - TRACE(("leave newtcpdirect: ret %d", ret)); - return ret; + TRACE(("leave newtcpdirect: err %d", err)); + return err; } |