mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-11-06 05:16:43 +00:00
upstream: fix ChannelTimeout for PermitTunnel forwardings. These
were not being applied because 1) the server used an unexpected name to label the channel and 2) the "last used" time was never set for these channels and this would cause the timeout never to fire. Anthropic ANT-2026-SF9IN6I4 OpenBSD-Commit-ID: 8f3ba8416d5e514166666c5e02aa486c070bc0ea
This commit is contained in:
1 parent
7b2fd9baa6
commit
c0ea89627a
2 files changed
+6
-3
No files matched your search
+4
-1
@@ -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 <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, 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)",
|
||||
|
||||
+2
-2
@@ -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 <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, 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)
|
||||
|
||||
Reference in new issue
Block a user