From: Miroslav Lichvar Date: Thu, 1 Feb 2018 16:24:26 +0000 (+0100) Subject: ntp: don't request TX timestamp when SW/HW timestamping is disabled X-Git-Tag: 3.3-pre1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ddadd5622b2248784cc171568fdcb709d9980e2;p=thirdparty%2Fchrony.git ntp: don't request TX timestamp when SW/HW timestamping is disabled --- diff --git a/ntp_io_linux.c b/ntp_io_linux.c index 00caed06..8edcfcca 100644 --- a/ntp_io_linux.c +++ b/ntp_io_linux.c @@ -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;