From 7c43d431173a73617c079b7945b6629daaa7bca0 Mon Sep 17 00:00:00 2001 From: Codarren Velvindron Date: Sun, 15 Apr 2018 20:37:50 +0400 Subject: [PATCH] ntpd: deprecate IPTOS_LOWDELAY in favor of IPTOS_DSCP_AF21 Update QoS markers. Use DSCP AF21 for interactive traffic. DSCP is defined in RFC2474. Many modern equipment no longer support IPTOS. Signed-off-by: Codarren Velvindron Signed-off-by: Denys Vlasenko --- networking/ntpd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/networking/ntpd.c b/networking/ntpd.c index 6cd497090..a1b8ac5b0 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c @@ -93,10 +93,10 @@ #include "libbb.h" #include -#include /* For IPTOS_LOWDELAY definition */ +#include /* For IPTOS_DSCP_AF21 definition */ #include -#ifndef IPTOS_LOWDELAY -# define IPTOS_LOWDELAY 0x10 +#ifndef IPTOS_DSCP_AF21 +# define IPTOS_DSCP_AF21 0x48 #endif @@ -910,7 +910,7 @@ send_query_to_peer(peer_t *p) #if ENABLE_FEATURE_IPV6 if (family == AF_INET) #endif - setsockopt_int(fd, IPPROTO_IP, IP_TOS, IPTOS_LOWDELAY); + setsockopt_int(fd, IPPROTO_IP, IP_TOS, IPTOS_DSCP_AF21); free(local_lsa); } @@ -2320,7 +2320,7 @@ static NOINLINE void ntp_init(char **argv) xfunc_die(); } socket_want_pktinfo(G_listen_fd); - setsockopt_int(G_listen_fd, IPPROTO_IP, IP_TOS, IPTOS_LOWDELAY); + setsockopt_int(G_listen_fd, IPPROTO_IP, IP_TOS, IPTOS_DSCP_AF21); } #endif /* I hesitate to set -20 prio. -15 should be high enough for timekeeping */ -- 2.25.1