percent_expand for QoS in ControlPath
Jared Yanovich
slovichon at gmail.com
Fri Mar 30 10:01:56 EST 2012
Hi,
Not sure if this anyone else is interested in this but to me it seems to make
sense to use different control session multiplexer sockets for bulk and
interactive workloads.
Index: auth.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/auth.c,v
retrieving revision 1.94
diff -u -p -r1.94 auth.c
--- auth.c 23 May 2011 03:33:38 -0000 1.94
+++ auth.c 29 Mar 2012 23:00:06 -0000
@@ -326,7 +326,7 @@ check_key_in_hostfiles(struct passwd *pw
*
* XXX Should any specific check be done for sym links ?
*
- * Takes an open file descriptor, the file name, a uid and and
+ * Takes an open file descriptor, the file name, a uid and an
* error buffer plus max size as arguments.
*
* Returns 0 on success and -1 on failure
Index: ssh.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/ssh.c,v
retrieving revision 1.368
diff -u -p -r1.368 ssh.c
--- ssh.c 24 Oct 2011 02:10:46 -0000 1.368
+++ ssh.c 29 Mar 2012 23:00:06 -0000
@@ -701,7 +701,7 @@ main(int ac, char **av)
options.port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT;
}
- /* preserve host name given on command line for %n expansion */
+ /* preserve host name given on command line for %h expansion */
host_arg = host;
if (options.hostname != NULL) {
host = percent_expand(options.hostname,
@@ -750,6 +750,8 @@ main(int ac, char **av)
options.control_path = percent_expand(cp, "h", host,
"l", thishost, "n", host_arg, "r", options.user,
"p", portstr, "u", pw->pw_name, "L", shorthost,
+ "Q", iptos2str(tty_flag ?
+ options.ip_qos_interactive : options.ip_qos_bulk),
(char *)NULL);
xfree(cp);
}
Index: ssh_config.5
===================================================================
RCS file: /cvs/src/usr.bin/ssh/ssh_config.5,v
retrieving revision 1.154
diff -u -p -r1.154 ssh_config.5
--- ssh_config.5 9 Sep 2011 00:43:00 -0000 1.154
+++ ssh_config.5 29 Mar 2012 23:00:06 -0000
@@ -313,23 +313,30 @@ in the
section above or the string
.Dq none
to disable connection sharing.
-In the path,
-.Ql %L
-will be substituted by the first component of the local host name,
-.Ql %l
-will be substituted by the local host name (including any domain name),
-.Ql %h
-will be substituted by the target host name,
-.Ql %n
-will be substituted by the original target host name
-specified on the command line,
-.Ql %p
-the port,
-.Ql %r
-by the remote login username, and
-.Ql %u
-by the username of the user running
-.Xr ssh 1 .
+.Pp
+In the path, the following substitutions are recognized:
+.Pp
+.Bl -tag -width 3n -compact -offset 2n
+.It \&%h
+target host name
+.It \&%L
+first component of the local host name
+.It \&%l
+local host name (including any domain name)
+.It \&%n
+original target host name specified on the command line
+.It \&%p
+port
+.It \&%Q
+quality of service string
+.Pq e.g. Dq lowdelay
+.It \&%r
+remote login username
+.It \&%u
+username of the user running
+.Xr ssh 1
+.El
+.Pp
It is recommended that any
.Cm ControlPath
used for opportunistic connection sharing include
More information about the openssh-unix-dev
mailing list