diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-04-03 02:40:32 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-04-03 13:42:33 +1100 |
commit | 663e84bb53de2a60e56a44d538d25b8152b5c1cc (patch) | |
tree | 2b8a180730e1bd4e130f1af40800b0393beb818e /clientloop.c | |
parent | ed833da176611a39d3376d62154eb88eb440d31c (diff) | |
download | openssh-git-663e84bb53de2a60e56a44d538d25b8152b5c1cc.tar.gz |
upstream: make failures when establishing "Tunnel" forwarding terminate
the connection when ExitOnForwardFailure is enabled; bz3116; ok dtucker
OpenBSD-Commit-ID: ef4b4808de0a419c17579b1081da768625c1d735
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clientloop.c b/clientloop.c index 5bfccdd3..8950f444 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.342 2020/02/26 13:40:09 jsg Exp $ */ +/* $OpenBSD: clientloop.c,v 1.343 2020/04/03 02:40:32 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1645,7 +1645,7 @@ client_request_agent(struct ssh *ssh, const char *request_type, int rchan) char * client_request_tun_fwd(struct ssh *ssh, int tun_mode, - int local_tun, int remote_tun) + int local_tun, int remote_tun, channel_open_fn *cb, void *cbctx) { Channel *c; int r, fd; @@ -1673,6 +1673,9 @@ client_request_tun_fwd(struct ssh *ssh, int tun_mode, sys_tun_outfilter, NULL, NULL); #endif + if (cb != NULL) + channel_register_open_confirm(ssh, c->self, cb, cbctx); + if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_OPEN)) != 0 || (r = sshpkt_put_cstring(ssh, "tun@openssh.com")) != 0 || (r = sshpkt_put_u32(ssh, c->self)) != 0 || |