=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.342 retrieving revision 1.343 diff -u -r1.342 -r1.343 --- src/usr.bin/ssh/clientloop.c 2020/02/26 13:40:09 1.342 +++ src/usr.bin/ssh/clientloop.c 2020/04/03 02:40:32 1.343 @@ -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 * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1637,7 +1637,7 @@ 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; @@ -1658,6 +1658,9 @@ c = channel_new(ssh, "tun", SSH_CHANNEL_OPENING, fd, fd, -1, CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1); c->datagram = 1; + + 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 ||