]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1374] Support SO_TIMESTAMPNS
authorHarlan Stenn <stenn@ntp.org>
Wed, 10 Oct 2012 02:55:48 +0000 (22:55 -0400)
committerHarlan Stenn <stenn@ntp.org>
Wed, 10 Oct 2012 02:55:48 +0000 (22:55 -0400)
bk: 5074e3b4wxE62xi-JqDCeK9-yHTeNQ

ntpd/ntp_io.c

index 14ae72dfeb817d0d26eaae2218d02615919398de..091254aa9128bb231626d4ea202969f141a8a0a2 100644 (file)
@@ -3248,14 +3248,8 @@ fetch_timestamp(
 #endif /* DEBUG_TIMING */
                        ts = nts;  /* network time stamp */
                        break;
-
-               default:
-                       DPRINTF(4, ("fetch_timestamp: skipping control message 0x%x\n",
-                                   cmsghdr->cmsg_type));
-               }
-               cmsghdr = CMSG_NXTHDR(msghdr, cmsghdr);
-       }
 #endif /* HAVE_TIMESTAMP */
+
 #ifdef HAVE_TIMESTAMPNS
                case SCM_TIMESTAMPNS:
                {
@@ -3287,9 +3281,16 @@ fetch_timestamp(
                        break;
                }
 #endif /* HAVE_TIMESTAMPNS */
+
+               default:
+                       DPRINTF(4, ("fetch_timestamp: skipping control message 0x%x\n",
+                                   cmsghdr->cmsg_type));
+               }
+               cmsghdr = CMSG_NXTHDR(msghdr, cmsghdr);
+       }
        return ts;
 }
-#endif /* HAVE_TIMESTAMP */
+#endif /* HAVE_PACKET_TIMESTAMP */
 
 
 /*