]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: don't request TX timestamp when SW/HW timestamping is disabled
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 1 Feb 2018 16:24:26 +0000 (17:24 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 1 Feb 2018 16:27:45 +0000 (17:27 +0100)
ntp_io_linux.c

index 00caed06f7ba2e4289767b1a492e30a1edbdac73..8edcfcca84a7d551ba7d34556da6a136b5c9fd00 100644 (file)
@@ -682,6 +682,9 @@ NIO_Linux_RequestTxTimestamp(struct msghdr *msg, int cmsglen, int sock_fd)
 {
   struct cmsghdr *cmsg;
 
+  if (!ts_flags)
+    return cmsglen;
+
   /* Check if TX timestamping is disabled on this socket */
   if (permanent_ts_options || !NIO_IsServerSocket(sock_fd))
     return cmsglen;