summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2017-07-23 23:37:03 +0000
committerDamien Miller <djm@cvs.openbsd.org>2017-07-23 23:37:03 +0000
commit107de4d4ca1d4f75c726a0e717701a08bec523a6 (patch)
treed8c2145e75d6c200de8b04874d277c6a700bef76
parent34e43262370413958ec6cec7a71c6d4fde6e99e3 (diff)
Allow IPQoS=none in ssh/sshd to not set an explicit ToS/DSCP value
and just use the operating system default; ok dtucker@
-rw-r--r--usr.bin/ssh/misc.c3
-rw-r--r--usr.bin/ssh/packet.c4
-rw-r--r--usr.bin/ssh/ssh_config.58
-rw-r--r--usr.bin/ssh/sshd_config.58
4 files changed, 14 insertions, 9 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c
index ce6cb34a0cd..8c9f22cc39d 100644
--- a/usr.bin/ssh/misc.c
+++ b/usr.bin/ssh/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.110 2017/05/31 09:15:42 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.111 2017/07/23 23:37:02 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -1033,6 +1033,7 @@ static const struct {
const char *name;
int value;
} ipqos[] = {
+ { "none", INT_MAX }, /* can't use 0 here; that's CS0 */
{ "af11", IPTOS_DSCP_AF11 },
{ "af12", IPTOS_DSCP_AF12 },
{ "af13", IPTOS_DSCP_AF13 },
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 11056c7d3dd..a63939b05f1 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.262 2017/06/24 06:38:11 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.263 2017/07/23 23:37:02 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1982,7 +1982,7 @@ ssh_packet_not_very_much_data_to_write(struct ssh *ssh)
void
ssh_packet_set_tos(struct ssh *ssh, int tos)
{
- if (!ssh_packet_connection_is_on_socket(ssh))
+ if (!ssh_packet_connection_is_on_socket(ssh) || tos == INT_MAX)
return;
switch (ssh_packet_connection_af(ssh)) {
case AF_INET:
diff --git a/usr.bin/ssh/ssh_config.5 b/usr.bin/ssh/ssh_config.5
index 89da9b53ab7..15ca0b4f99b 100644
--- a/usr.bin/ssh/ssh_config.5
+++ b/usr.bin/ssh/ssh_config.5
@@ -33,8 +33,8 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: ssh_config.5,v 1.252 2017/07/13 19:16:33 jmc Exp $
-.Dd $Mdocdate: July 13 2017 $
+.\" $OpenBSD: ssh_config.5,v 1.253 2017/07/23 23:37:02 djm Exp $
+.Dd $Mdocdate: July 23 2017 $
.Dt SSH_CONFIG 5
.Os
.Sh NAME
@@ -969,7 +969,9 @@ Accepted values are
.Cm lowdelay ,
.Cm throughput ,
.Cm reliability ,
-or a numeric value.
+a numeric value, or
+.Cm none
+to use the operating system default.
This option may take one or two arguments, separated by whitespace.
If one argument is specified, it is used as the packet class unconditionally.
If two values are specified, the first is automatically selected for
diff --git a/usr.bin/ssh/sshd_config.5 b/usr.bin/ssh/sshd_config.5
index 49d30838b9d..7897ecb0e92 100644
--- a/usr.bin/ssh/sshd_config.5
+++ b/usr.bin/ssh/sshd_config.5
@@ -33,8 +33,8 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: sshd_config.5,v 1.249 2017/07/13 19:16:33 jmc Exp $
-.Dd $Mdocdate: July 13 2017 $
+.\" $OpenBSD: sshd_config.5,v 1.250 2017/07/23 23:37:02 djm Exp $
+.Dd $Mdocdate: July 23 2017 $
.Dt SSHD_CONFIG 5
.Os
.Sh NAME
@@ -793,7 +793,9 @@ Accepted values are
.Cm lowdelay ,
.Cm throughput ,
.Cm reliability ,
-or a numeric value.
+a numeric value, or
+.Cm none
+to use the operating system default.
This option may take one or two arguments, separated by whitespace.
If one argument is specified, it is used as the packet class unconditionally.
If two values are specified, the first is automatically selected for