diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-11-27 00:49:58 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-11-27 13:21:16 +1100 |
commit | 33313ebc1c7135085676db62189e3520341d6b73 (patch) | |
tree | 0ae54394e89d6b928fd9b4df57a96f92583c8b0d /sshconnect.c | |
parent | b2bcec13f17ce9174238a704e91d52203e916432 (diff) | |
download | openssh-git-33313ebc1c7135085676db62189e3520341d6b73.tar.gz |
upstream: Set the specified TOS/DSCP for interactive use prior to
TCP connect. The connection phase of the SSH session is time-sensitive (due
to server side login grace periods) and is frequently interactive (e.g.
entering passwords). The ultimate interactive/bulk TOS/DSCP will be set after
authentication completes.
ok dtucker@
OpenBSD-Commit-ID: f31ab10d9233363a6d2c9996007083ba43a093f1
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c index dfee55a8..6b60ca0d 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.344 2020/11/22 22:37:11 djm Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.345 2020/11/27 00:49:58 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -30,6 +30,7 @@ #include <ctype.h> #include <errno.h> #include <fcntl.h> +#include <limits.h> #include <netdb.h> #ifdef HAVE_PATHS_H #include <paths.h> @@ -363,6 +364,10 @@ ssh_create_socket(struct addrinfo *ai) } fcntl(sock, F_SETFD, FD_CLOEXEC); + /* Use interactive QOS (if specified) until authentication completed */ + if (options.ip_qos_interactive != INT_MAX) + set_sock_tos(sock, options.ip_qos_interactive); + /* Bind the socket to an alternative local IP address */ if (options.bind_address == NULL && options.bind_interface == NULL) return sock; |