[openssh-commits] [openssh] 03/03: upstream: correctly set extended type for client-side channels.
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Apr 20 09:38:33 AEST 2026
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 45b30e0a5439a02417a4fe982a4b16a9c126ba6b
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Sun Apr 19 23:37:22 2026 +0000
upstream: correctly set extended type for client-side channels.
Fixes interactive vs bulk IPQoS for client->server traffic. ok job@
OpenBSD-Commit-ID: 34f5131face8d6dc4ae6955196e5fcafb3570cfe
---
clientloop.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/clientloop.c b/clientloop.c
index 6a0e7b6b8..8f9d16ca8 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.422 2026/03/05 05:40:35 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.423 2026/04/19 23:37:22 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -2711,7 +2711,7 @@ client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
{
size_t i, j, len;
int matched, r;
- char *name, *val;
+ char *type = NULL, *cmdstring = NULL, *name, *val;
Channel *c = NULL;
debug2_f("id %d", id);
@@ -2786,19 +2786,21 @@ client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
len = sshbuf_len(cmd);
if (len > 0) {
+ if ((cmdstring = sshbuf_dup_string(cmd)) == NULL)
+ fatal_f("sshbuf_dup_string failed");
if (len > 900)
len = 900;
if (want_subsystem) {
- debug("Sending subsystem: %.*s",
- (int)len, (const u_char*)sshbuf_ptr(cmd));
+ debug("Sending subsystem: %.*s", (int)len, cmdstring);
channel_request_start(ssh, id, "subsystem", 1);
client_expect_confirm(ssh, id, "subsystem",
CONFIRM_CLOSE);
+ xasprintf(&type, "session:subsystem:%s", cmdstring);
} else {
- debug("Sending command: %.*s",
- (int)len, (const u_char*)sshbuf_ptr(cmd));
+ debug("Sending command: %.*s", (int)len, cmdstring);
channel_request_start(ssh, id, "exec", 1);
client_expect_confirm(ssh, id, "exec", CONFIRM_CLOSE);
+ xasprintf(&type, "session:command");
}
if ((r = sshpkt_put_stringb(ssh, cmd)) != 0 ||
(r = sshpkt_send(ssh)) != 0)
@@ -2808,7 +2810,11 @@ client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
client_expect_confirm(ssh, id, "shell", CONFIRM_CLOSE);
if ((r = sshpkt_send(ssh)) != 0)
fatal_fr(r, "send shell");
+ xasprintf(&type, "session:shell");
}
+ channel_set_xtype(ssh, id, type);
+ free(cmdstring);
+ free(type);
session_setup_complete = 1;
client_repledge();
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list