[ntp:questions] ntpdate fails with IPv6 server addresses on Windows XP

Joachim Kross mailing-lists at bayern-mail.de
Tue Oct 23 20:58:43 UTC 2012


Hi,

I am wondering:

What would be the drawbacks of not setting the IPV6_V6ONLY socket option
on IPv6 sockets in ntpdate, at least for certain versions of Windows
(namely prior to Vista)?

I do understand that ntpdate is deprecated. However, as long as the sntp
utility is not available for the Windows platform, ntpdate seems to me
the easiest way to quickly check e.g. offset of own clock to some remote
clock in those cases where setting the local clock is not desired (as
that is already managed by ntpd) and where the remote clock may not let
me query it via ntpq.

Unfortunately, doing something like "ntpdate -q 2.de.pool.ntp.org" will 
quit on my Windows XP Professional SP3 32 bit machine with "setsockopt()
IPV6_V6ONLY failed: Bad protocol option". This happens with all 
IPv6-enables Windows binaries I tried so far: 4.2.6p5 provided by 
Meinberg, 4.2.7p287 provided by Dave Hart, 4.2.7p313 built by myself.

My suspicion is that this might be due to the IPV6_V6ONLY socket option
apparently only being supported from Windows Vista onwards, see table
towards the bottom of
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738574(v=vs.85).aspx.

A modified version of ntpdate that simply ignores any error in setting
the option works as desired. However, of course, this check and the
strict consequence in case it fails have been put there for a reason, so
I would like to understand what the drawbacks are of not enforcing this
option in the context of ntpdate (and for "private" use in this
particular setting - ntpd would be another matter, but anyway handles
this more gracefully already).

Thanks!

Kind regards,

Joachim



More information about the questions mailing list