[Git][NTPsec/ntpsec][master] 12 commits: Refactor to isolate network-packet test.
Eric S. Raymond
gitlab at mg.gitlab.com
Sun Jun 26 04:09:42 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
7a485ceb by Eric S. Raymond at 2016-06-25T07:51:22-04:00
Refactor to isolate network-packet test.
- - - - -
5fe69024 by Eric S. Raymond at 2016-06-25T08:06:07-04:00
Mark every packet with a network-origin flag - replaces magic-address test.
Getting this wrong was where my previous series of commits went astray.
- - - - -
af96f908 by Eric S. Raymond at 2016-06-25T08:50:50-04:00
Use is_network_packet() to avoid magic-address matching on restrictions.
- - - - -
ccf80ca0 by Eric S. Raymond at 2016-06-25T09:08:35-04:00
Push ISREFCLOCKADDR() calls up to the config interpreter...
...to isolate them from the core logic. Yes, I got this wrong in the
reverted patch series.
- - - - -
6eee19ad by Eric S. Raymond at 2016-06-25T09:14:27-04:00
Document removal of most checking for magic address formats.
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.
- - - - -
87f2bfb8 by Eric S. Raymond at 2016-06-25T09:19:50-04:00
In ntpq, don't assume the magic-clock-address convention...
...when reporting refids. This affects the rv report.
- - - - -
b39ee109 by Eric S. Raymond at 2016-06-25T09:21:25-04:00
In ntpq, cooked version of the refid variable no longer...
...assumes the magic-refclock-address convention.
- - - - -
783d211b by Eric S. Raymond at 2016-06-25T12:22:23-04:00
Consistently export driver type name as a clock variable...
...and don't export numeric type any more, as we're trying to make that
strictly an internal convention.
- - - - -
29f26ba8 by Eric S. Raymond at 2016-06-25T13:08:49-04:00
In ntp_control, ship a 'displayname' variable for peers that are clocks.
This replaces the filtering on magic address that used to happen in ntpq.
It has the minor downside that a new ntpq displaying a peer spreadsheet
for an old ntpd will show refclocks by 127.127.t.u address.
- - - - -
dbda243e by Eric S. Raymond at 2016-06-25T13:35:18-04:00
Remove refnumtoa() and its tests.
This function is no longer needed, because shortname information for
clock drivers is now kept in the driver method table and exported
to ntpq via the displayname peer variable. This change eliminates
the last magic-address-mask test outside the configuration-file
interpreter.
- - - - -
55331e6e by Eric S. Raymond at 2016-06-25T13:50:47-04:00
Reduce the scope over which IS_REFCLOCKADR() is known and used.
Knowledge of the magic 127.127.t.u address convention for refclocks is
now confined to ntp_config.c and used only for interpreting
configuration syntax.
In theory we could now assign a refclock any unique IP address we
like; neither ntpd nor ntpq would care any more. In practice it's
probably best to continue assigning only 127.127.t.u addresses so
that (at least for a while) we refrain from confusing legacy ntpq
versions.
Together with the elimination of refnumtoa(), this sets the stage
for entirely removing the external visibility of numeric driver
types, and a better clock-configuration syntax.
- - - - -
65e31229 by Eric S. Raymond at 2016-06-26T00:08:27-04:00
Fix glitches detected by Coverity.
- - - - -
30 changed files:
- devel/ChangeLog
- docs/includes/ntpq-body.txt
- include/ntp_net.h
- include/ntp_refclock.h
- include/ntp_stdlib.h
- include/ntpd.h
- include/recvbuff.h
- − libntp/refnumtoa.c
- libntp/wscript
- ntpd/ntp_config.c
- ntpd/ntp_control.c
- ntpd/ntp_io.c
- ntpd/ntp_peer.c
- ntpd/ntp_proto.c
- ntpd/ntp_refclock.c
- ntpd/ntp_restrict.c
- ntpd/refclock_jjy.c
- ntpd/refclock_neoclock4x.c
- ntpd/refclock_parse.c
- ntpd/refclock_shm.c
- ntpd/refclock_true.c
- ntpd/refclock_zyfer.c
- ntpq/ntpq-subs.c
- ntpq/ntpq.c
- ports/winnt/vs2005/libntp.vcproj
- ports/winnt/vs2008/libntp/libntp.vcproj
- ports/winnt/vs2013/libntp/libntp.vcxproj
- ports/winnt/vs2013/libntp/libntp.vcxproj.filters
- tests/common/tests_main.c
- − tests/libntp/refnumtoa.c
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/920df5b80b52dd21a764460fda9ea24d1bf7aa60...65e31229089e01426391834f9cd45caf621d2574
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160626/c326e41d/attachment.html>
More information about the vc
mailing list