Documenting some progress - magic refclock addresses are almost gone

Eric S. Raymond esr at
Fri Jun 24 11:09:48 UTC 2016

In the past, we told reference clocks from real peers by giving the
reference clocks an address of the form 127.127.t.u, where t is the
type and u is the unit number.  In ntpd itself, the filtering that
used to be done based on this magic address prefix is now done
using the is_refclock_packet() test on incoming packets.  The
remaining instances of magic-address testing are in the
configuration-language interpreter only and are used to prevent
inapropriate configuration commands from being applied to
refclock entries.  They'll go away when the configuration syntax
is redesigned.

In theory, therefore, it would now be possible for ntpd to use a
server with an address in the 127.127.t.u range.  In practice this 
is probably a bad idea as it would confuse ntpq, which keeps some
of these prefix checks in order to be able to recognize clock packets
by address only (that being all it has to work with).

De-confusing ntpq will require some modifications to mode 6
response formats so that the response to a peer query conveys
*explicitly* whether it's a refclock.  Even so, legacy ntpq 
instances will still be confused.

Does anyone on the list understand mode 6 well enough to answer
questions?  My main one is: if I add a field to a mode 6 response,
is it going to break old ntpqs or will they silently ignore it?

(The response field I intend to add, of course, is to the peer query and is
a refclock type name - empty for real servers.)

More information about the devel mailing list