summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/clientloop.c b/clientloop.c
index 5bfccdd35..8950f444b 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.342 2020/02/26 13:40:09 jsg Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.343 2020/04/03 02:40:32 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * 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)
1645 1645
1646char * 1646char *
1647client_request_tun_fwd(struct ssh *ssh, int tun_mode, 1647client_request_tun_fwd(struct ssh *ssh, int tun_mode,
1648 int local_tun, int remote_tun) 1648 int local_tun, int remote_tun, channel_open_fn *cb, void *cbctx)
1649{ 1649{
1650 Channel *c; 1650 Channel *c;
1651 int r, fd; 1651 int r, fd;
@@ -1673,6 +1673,9 @@ client_request_tun_fwd(struct ssh *ssh, int tun_mode,
1673 sys_tun_outfilter, NULL, NULL); 1673 sys_tun_outfilter, NULL, NULL);
1674#endif 1674#endif
1675 1675
1676 if (cb != NULL)
1677 channel_register_open_confirm(ssh, c->self, cb, cbctx);
1678
1676 if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_OPEN)) != 0 || 1679 if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_OPEN)) != 0 ||
1677 (r = sshpkt_put_cstring(ssh, "tun@openssh.com")) != 0 || 1680 (r = sshpkt_put_cstring(ssh, "tun@openssh.com")) != 0 ||
1678 (r = sshpkt_put_u32(ssh, c->self)) != 0 || 1681 (r = sshpkt_put_u32(ssh, c->self)) != 0 ||