Heads up: USE_PACKET_TIMESTAMP tangle

Gary E. Miller gem at rellim.com
Wed Jun 7 23:19:43 UTC 2017


Yo Hal!

I'm confused by commit 7bb7a656cbabd4be451d35c6a6058fac9ca8a56d.
This new code in ntp/ntp_timestamp.c line 38:

---------------------------------------------------------

#ifdef SO_BINTIME
/* SO_BINTIME doesn't work for IpV6, FreeBSD 11, 2017-Jan
 * fortunately, FreeBSD also supports SO_TIMESTAMP
 */
#undef SO_BINTIME
#endif

void
enable_packetstamps(
    int fd,
    sockaddr_u *        addr
    )
{
        const int       on = 1;

#if defined(SO_BINTIME)
        if (setsockopt(fd, SOL_SOCKET, SO_BINTIME, (const void*)&on, sizeof(on)))
                msyslog(LOG_DEBUG,
[...]

---------------------------------------------------------

If you are going to always #undef SO_BINTIME, why a few lines later
test for it?  Some left over test code?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170607/c393f9c8/attachment.bin>


More information about the devel mailing list