]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
timesync: IPTOS_LOWDELAY --> IPTOS_DSCP_EF
authorCristian Rodríguez <cristian@rodriguez.im>
Sun, 7 Jan 2024 22:49:45 +0000 (19:49 -0300)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 8 Jan 2024 15:31:58 +0000 (00:31 +0900)
Deprecated IPTOS_LOWDELAY is ignored by most of today's
network equipment that only ever care about DSCP.

Use the DSCP found in other NTP implementations and set the appropiate
TCLASS for IPv6.

src/timesync/timesyncd-manager.c

index 6ed15aa402570c6365d60bb0f3aecce24b87c058..bb37de9f2534838a3b47ffb28e68d4c20cd22f0a 100644 (file)
@@ -658,8 +658,7 @@ static int manager_listen_setup(Manager *m) {
         if (r < 0)
                 return r;
 
-        if (addr.sa.sa_family == AF_INET)
-                (void) setsockopt_int(m->server_socket, IPPROTO_IP, IP_TOS, IPTOS_LOWDELAY);
+        (void) socket_set_option(m->server_socket, addr.sa.sa_family, IP_TOS, IPV6_TCLASS, IPTOS_DSCP_EF);
 
         return sd_event_add_io(m->event, &m->event_receive, m->server_socket, EPOLLIN, manager_receive_response, m);
 }