ntp: don't request TX timestamp when SW/HW timestamping is disabled

This commit is contained in:
Miroslav Lichvar 2018-02-01 17:24:26 +01:00
parent 3e854006c7
commit 4ddadd5622

View file

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