Mercurial > dropbear
changeset 1860:5001e9c5641f
Merge netio changes
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 27 Jan 2022 15:09:29 +0800 |
parents | 1d86a58fb52d (current diff) ed3326f21888 (diff) |
children | 2b3a8026a6ce |
files | netio.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/netio.c Thu Jan 27 14:34:10 2022 +0800 +++ b/netio.c Thu Jan 27 15:09:29 2022 +0800 @@ -377,7 +377,7 @@ /* Don't log ENOTSOCK errors so that this can harmlessly be called * on a client '-J' proxy pipe */ -#ifdef IPTOS_DSCP_AF21 +#ifdef IP_TOS /* Set the DSCP field for outbound IP packet priority. rfc4594 has some guidance to meanings. @@ -389,9 +389,12 @@ Old Dropbear/OpenSSH and Debian/Ubuntu OpenSSH (at Jan 2022) use IPTOS_LOWDELAY/IPTOS_THROUGHPUT + + DSCP constants are from Linux headers, applicable to other platforms + such as macos. */ if (prio == DROPBEAR_PRIO_LOWDELAY) { - val = IPTOS_DSCP_AF21; + val = 0x48; /* IPTOS_DSCP_AF21 */ } else { val = 0; /* default */ } @@ -405,7 +408,7 @@ if (rc < 0 && errno != ENOTSOCK) { TRACE(("Couldn't set IP_TOS (%s)", strerror(errno))); } -#endif +#endif /* IP_TOS */ #ifdef HAVE_LINUX_PKT_SCHED_H /* Set scheduling priority within the local Linux network stack */