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 | e3e03ba5123d76b27b28db134603dbd6a1111f06 (patch) | |
tree | 0b54a905a49358adc37ce32e3e80239dd6ebd736 /cli-tcpfwd.c | |
parent | a82d614485700729f2b650d45a73dbf55094707f (diff) | |
download | dropbear-e3e03ba5123d76b27b28db134603dbd6a1111f06.tar.gz |
Merging in the changes from 0.41-0.43 main Dropbear tree
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; } |