diff --git a/channels.c b/channels.c index b0770290f..66a1274ad 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.474 2026/10/30 02:59:36 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.475 2026/10/30 04:25:21 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -601,6 +601,9 @@ channel_new(struct ssh *ssh, char *ctype, int type, int rfd, int wfd, int efd, c->ctl_chan = -1; c->delayed = 1; /* prevent call to channel_post handler */ c->inactive_deadline = lookup_timeout(ssh, c->ctype); + /* channels created already open need a last used time for timeouts */ + if (type == SSH_CHANNEL_OPEN) + channel_set_used_time(ssh, c); TAILQ_INIT(&c->status_confirms); channel_classify(ssh, c); debug("channel %d: new %s [%s] (inactive timeout: %f)", diff --git a/serverloop.c b/serverloop.c index 9d8a3429e..f47f92597 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.248 2026/07/14 01:05:05 djm Exp $ */ +/* $OpenBSD: serverloop.c,v 1.249 2026/10/30 04:25:21 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -547,7 +547,7 @@ server_request_tun(struct ssh *ssh) goto done; debug("Tunnel forwarding using interface %s", ifname); - c = channel_new(ssh, "tun", SSH_CHANNEL_OPEN, sock, sock, -1, + c = channel_new(ssh, "tun-connection", SSH_CHANNEL_OPEN, sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1); c->datagram = 1; #if defined(SSH_TUN_FILTER)