From: Harlan Stenn Date: Sun, 10 Aug 2008 00:47:20 +0000 (-0400) Subject: Merge whimsy.udel.edu:/deacon/backroom/ntp-stable-hms X-Git-Tag: NTP_4_2_5P123~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f08c202e6f09f063f4a4000ee8dba7e4f7ba8cd;p=thirdparty%2Fntp.git Merge whimsy.udel.edu:/deacon/backroom/ntp-stable-hms into whimsy.udel.edu:/deacon/backroom/ntp-dev-hms bk: 489e3a98P71ZovZGORBZ8vGBEvCAIw --- 8f08c202e6f09f063f4a4000ee8dba7e4f7ba8cd diff --cc ChangeLog index d387b6aa5,e51b7f287..82e8e6abd --- a/ChangeLog +++ b/ChangeLog @@@ -1,309 -1,9 +1,311 @@@ +* [Bug 1046] refnumtoa.c is using the wrong header file. +* [Bug 1047] enable/disable options processing fix. +* header file cleanup. +* [Bug 1037] buffer in subroutine was 1 byte short. +* configure.ac: cleanup, add option for wintime, and lay the groundwork + for the changes needed for bug 1028. +* Fixes from Dave Mills: 'bias' and 'interleave' work. Separate + phase and frequency discipline (for long poll intervals). Update + TAI function to match current leapsecond processing. +* Documentation updates from Dave Mills. +* [Bug 1037] Use all 16 of the MD5 passwords generated by ntp-keygen. +* Fixed the incorrect edge parameter being passed to time_pps_kcbind in + NMEA refclock driver. +* [Bug 399] NMEA refclock driver does not honor time1 offset if flag3 set. +* [Bug 985] Modifications to NMEA reference clock driver to support Accord + GPS Clock. +* poll time updates from Dave Mills. +* local refclock documentation updates from Dave Mills. +* [Bug 1022] Fix compilation problems with yesterday's commit. +* Updates and cleanup from Dave Mills: + I've now spent eleven months of a sabbatical year - 7 days a week, 6-10 + hours most days - working on NTP. I have carefully reviewed every major + algorithm, examined its original design and evolution from that design. + I've trimmed off dead code and briar patches and did zillions of tests + contrived to expose evil vulnerabilities. The development article is in + rather good shape and should be ready for prime time. + + 1. The protostats statistics files have been very useful in exposing + little twitches and turns when something hiccups, like a broken PPS + signal. Most of what used to be syslog messages are now repackaged as + protostats messages with optional syslog as well. These can also be sent + as traps which might be handy to tiggle a beeper or celltext. These, the + sysstats files and cryptostats files reveal the ambient health of a busy + server, monitor traffic and error counts and spot crypto attacks. + + 2. Close inspection of the clock discipline behavior at long poll + intervals (36 h) showed it not doing as well as it should. I redesigned + the FLL loop to improve nominal accuracy from several tens of + milliseconds to something less than ten milliseconds. + + 3. Autokey (again). The enhanced error checking was becoming a major + pain. I found a way to toss out gobs of ugly fat code and replace the + function with a much simpler and more comprehensive scheme. It resists + bait-and-switch attacks and quickly detect cases when the protocol is + not correctly synchronized. + + 4. The interface code for the kernel PPS signal was not in sync with the + kernel code itself. Some error checks were duplicated and some + ineffective. I found none of the PPS-capable drivers, including the atom + driver, do anything when the prefer peer fails; the kernel PPS signal + remains in control. The atom driver now disables the kernel PPS when the + prefer peer comes bum. This is important when the prefer peer is not a + reference clock but a remote NTP server. + + 5. The flake restrict bit turned out to be really interesting, + especially with symmtric modes and of those especially those using + Autokey. Small changes in the recovery procedures when packets are lost + now avoid almost all scenarios which previously required protocol resets. + + 6. I've always been a little uncomfortable when using the clock filter + with long poll intervals because the samples become less and less + correlated as the sample age exceeds the Allan intercept. Various + schemes have been used over the years to cope with this fact. The latest + one and the one that works the best is to use a modified sort metric + where the delay is used when the age of the sample is less than the + intercept and the sum of delay and dispersion above that. The net result + is that, at small poll intervals the algorithm operates as a minimum + filter, while at larger poll intervals it morphs to FIFO. Left + unmodified, a sample could be used when twelve days old. This along with + the FLL modifications has made a dramatic improvement at large poll + intervals. + +- [Backward Incompatible] The 'state' variable is no longer reported or + available via ntpq output. The following system status bit names + have been changed: + - sync_alarm -> leap_alarm + - sync_atomic -> sync_pps + - sync_lf_clock -> sync_lf_radio + - sync_hf_clock -> sync_hf_radio + - sync_uhf_clock -> sync_uhf_radio + - sync_local_proto -> sync_local + - sync_udp/time -> sync_other + Other names have been changed as well. See the change history for + libntp/statestr.c for more details. + Other backward-incompatible changes in ntpq include: + - assID -> associd + - rootdispersion -> rootdisp + - pkt_head -> pkt_neader + See the change history for other details. + +* Updates and cleanup from Dave Mills. +* [Bug 995] Remove spurious ; from ntp-keygen.c. +* More cleanup and changes from Dave Mills. +* [Bug 980] Direct help to stdout. + --- + * [Bug 450] Windows only: Under original Windows NT we must not discard the + wildcard socket to workaround a bug in NT's getsockname(). * [Bug 1038] Built-in getpass() function also prompts for password if not built with DEBUG. +* [Bug 841] Obsolete the "dynamic" keyword and make deferred binding + to local interfaces the default. + Emit a warning if that keyword is used for configuration. +* [Bug 959] Refclock on Windows not properly releasing recvbuffs. +* [Bug 993] Fix memory leak when fetching system messages. +* much cleanup, fixes, and changes from Dave Mills. +* ntp_control.c: LEAPTAB is a filestamp, not an unsigned. From Dave Mills. +* ntp_config.c: ntp_minpoll fixes from Dave Mills. +* ntp-keygen updates from Dave Mills. +* refresh epoch, throttle, and leap cleanup from Dave Mills. +* Documentation cleanup from Dave Mills. +* [Bug 918] Only use a native md5.h if MD5Init() is available. +* [Bug 979] Provide ntptimeval if it is not otherwise present. +* [Bug 634] Re-instantiate syslog() and logfiles after the daemon fork. +* [Bug 952] Use md5 code with a friendlier license. +* [Bug 977] Fix mismatching #ifdefs for builds without IPv6. +* [Bug 830] Fix the checking order of the interface options. +* Clean up the logfile/syslog setup. +* [Bug 970] Lose obsolete -g flag to ntp-keygen. +* The -e flag to ntp-keygen can write GQ keys now, too. +* ntp_proto.c: sys_survivors and hpoll cleanup from Dave Mills. +* ntp_loopfilter.c: sys_poll cleanup from Dave Mills. +* refclock_wwv.c: maximum-likelihood digit and DSYNC fixes from Dave Mills. +* [Bug 967] preemptable associations are lost forever on a step. +* ntp_config.c: [CID 48] missing "else" clause. +* [Bug 833] ntpq config keyword is quote-mark unfriendly. +* Rename the ntpq "config" keyword to ":config". +* Dave Mills shifted some orphan processing. +* Fix typos in the [Bug 963] patch. +* bootstrap: squawk if genver fails. Use -f with cp in case Dave does a chown. +* Remove obsolete simulator command-line options. +* ntp_request.c: [CID 36] zero sin_zero. +* [Bug 963] get_systime() is too noisy. +* [Bug 960] spurious syslog:crypto_setup:spurious crypto command +* [Bug 964] Change *-*-linux* to *-*-*linux* to allow for uclinux. +* Changes from Dave Mills: + - ntp_util.c: cleanup. + - ntp_timer.c: watch the non-burst packet rate. + - ntp_request.c: cleanup. + - ntp_restrict.c: RES_LIMITED cleanup. + - ntp_proto.c: RES_LIMITED, rate bucktes, counters, overall cleanup. + - ntp_peer.c: disallow peer_unconfig(). + - ntp_monitor.c: RES_LIMITED cleanup. + - ntp_loopfilter.c: poll interval cleanup. + - ntp_crypto.c: volley -> retry. Cleanup TAI leap message. + - ntp_config: average and minimum are ^2 values. + - ntpdc: unknownversion is really "declined", not "bad version". + - Packet retry cleanup. +* [Bug 961] refclock_tpro.c:tpro_poll() calls refclock_receive() twice. +* [Bug 957] Windows only: Let command line parameters from the Windows SCM GUI + override the standard parameters from the ImagePath registry key. +* Added HAVE_INT32_T to the Windows config.h to avoid duplicate definitions. +* Work around a VPATH difference in FreeBSD's 'make' command. +* Update bugreport URL. +* Update -I documentation. +* [Bug 713] Fix bug reporting information. +* A bug in the application of the negative-sawtooth for 12 channel receivers. +* The removal of unneeded startup code used for the original LinuxPPS, it now + conforms to the PPSAPI and does not need special code. +* ntp-keygen.c: Coverity fixes [CID 33,47]. +* Volley cleanup from Dave Mills. +* Fuzz cleanup from Dave Mills. +* [Bug 861] Leap second cleanups from Dave Mills. +* ntpsim.c: add missing protypes and fix [CID 34], a nit. +* Upgraded bison at UDel. +* Update br-flock and flock-build machine lists. +* [Bug 752] QoS: add parse/config handling code. +* Fix the #include order in tickadj.c for picky machines. +* [Bug 752] QoS: On some systems, netinet/ip.h needs netinet/ip_systm.h. +* [Bug 752] Update the QoS tagging (code only - configuration to follow). +* Orphan mode and other protocol cleanup from Dave Mills. +* Documentation cleanup from Dave Mills. +* [Bug 940] ntp-keygen uses -v. Disallow it as a shortcut for --version. +* more cleanup to ntp_lineeditlibs.m4. +* Documentation updates from Dave Mills. +* -ledit cleanup for ntpdc and ntpq. +* Association and other cleanup from Dave Mills. +* NTP_UNREACH changes from Dave Mills. +* Fix the readline history test. +* [Bug 931] Require -lreadline to be asked for explicitly. +* [Bug 764] When looking for -lreadline support, also try using -lncurses. +* [Bug 909] Fix int32_t errors for ntohl(). +* [Bug 376/214] Enhancements to support multiple if names and IP addresses. +* [Bug 929] int32_t is undefined on Windows. Casting wrong. +* [Bug 928] readlink missing braces. +* [Bug 788] Update macros to support VS 2005. +* ntpd/ntp_timer.c: add missing sys_tai parameter for debug printf +* [Bug 917] config parse leaves files open +* [Bug 912] detect conflicting enable/disable configuration on interfaces + sharing an IP address +* [Bug 771] compare scopeid if available for IPv6 addresses +* Lose obsolete crypto subcommands (Dave Mills). +* WWV is an HF source, not an LF source (Dave Mills). +* [Bug 899] Only show -i/--jaildir -u/--user options if we HAVE_DROPROOT. +* [Bug 916] 'cryptosw' is undefined if built without OpenSSL. +* [Bug 891] 'restrict' config file keyword does not work (partial fix). +* [Bug 890] the crypto command seems to be required now. +* [Bug 915] ntpd cores during processing of x509 certificates. +* Crypto lint cleanup from Dave Mills. +* [Bug 897] Check RAND_status() - we may not need a .rnd file. +* Crypto cleanup from Dave Mills. +* [Bug 911] Fix error message in cmd_args.c. +* [Bug 895] Log assertion failures via syslog(), not stderr. +* Documentation updates from Dave Mills. +* Crypto cleanup from Dave Mills. +* [Bug 905] ntp_crypto.c fails to compile without -DDEBUG. +* Avoid double peer stats logging. +* ntp-keygen cleanup from Dave Mills. +* libopts needs to be built after ElectricFence. +* [Bug 894] Initialize keysdir before calling crypto_setup(). +* Calysto cleanup for ntpq. +* ntp-keygen -i takes an arg. +* Cleanup and fixes from Dave Mills. +* [Bug 887] Fix error in ntp_types.h (for sizeof int != 4). +* Bug 880 bug fixes for Windows build +* Improve Calysto support. +* The "revoke" parameter is a crypto command. +* The driftfile wander threshold is a real number. +* [Bug 850] Fix the wander threshold parameter on the driftfile command. +* ntp_io.c: Dead code cleanup - Coverity View 19. +* Leap file related cleanup from Dave Mills. +* ntp_peer.c: Set peer->srcadr before (not after) calling set_peerdstadr(). +* Initialize offset in leap_file() - Coverity View 17. +* Use the correct stratum on KISS codes. +* Fuzz bits cleanup. +* Show more digits in some debug printf's. +* Use drift_file_sw internally to control writing the drift file. +* Implement the wander_threshold option for the driftfile config keyword. +* reformat ntp_control.c; do not use c++ // comments. +* [Bug 629] Undo bug #629 fixes as they cause more problems than were being + solved +* Changes from Dave Mills: in/out-bound data rates, leapsecond cleanup, + driftfile write cleanup, packet buffer length checks, documentation updates. +* More assertion checks and malloc()->emalloc(), courtesy of Calysto. +* [Bug 864] Place ntpd service in maintenance mode if using SMF on Solaris +* [Bug 862] includefile nesting; preserve phonelist on reconfig. +* [Bug 604] ntpd regularly dies on linux/alpha. +* more leap second infrastructure fixes from Dave Mills. +* [Bug 858] recent leapfile changes broke non-OpenSSL builds. +* Use emalloc() instead of malloc() in refclock_datum.c (Calysto). +* Start using 'design by contract' assertions. +* [Bug 767] Fast sync to refclocks wanted. +* Allow null driftfile. +* Use YYERROR_VERBOSE for the new parser, and fix related BUILT_SOURCES. +* [Bug 629] changes to ensure broadcast works including on wildcard addresses +* [Bug 853] get_node() must return a pointer to maximally-aligned memory. +* Initial leap file fixes from Dave Mills. +* [Bug 858] Recent leapfile changes broke without OPENSSL. +* Use a char for DIR_SEP, not a string. +* [Bug 850] driftfile parsing changes. +* driftfile maintenance changes from Dave Mills. Use clock_phi instead of + stats_write_tolerance. +* [Bug 828] refid string not being parsed correctly. +* [Bug 846] Correct includefile parsing. +* [Bug 827] New parsing code does not handle "fudge" correctly. +* Enable debugging capability in the config parser. +* [Bug 839] Crypto password not read from ntp.conf. +* Have autogen produce writable output files. +* [Bug 825] Correct logconfig -/+ keyword processing. +* [Bug 828] Correct parsing of " delimited strings. +* Cleanup FILE * usage after fclose() in ntp_filegen.c. +* [Bug 843] Windows Completion port code was incorrectly merged from -stable. +* [Bug 840] do fudge configuration AFTER peers (thus refclocks) have been + configured. +* [Bug 824] Added new parser modules to the Windows project file. +* [Bug 832] Add libisc/log.c headers to the distribution. +* [Bug 808] Only write the drift file if we are in state 4. +* Initial import of libisc/log.c and friends. +* [Bug 826] Fix redefinition of PI. +* [Bug 825] ntp_scanner.c needs to #include . +* [Bug 824] New parser code has some build problems with the SIM code. +* [Bug 817] Use longnames for setting ntp variables on the command-line; + Allowing '-v' with and without an arg to disambiguate usage is error-prone. +* [Bug 822] set progname once, early. +* [Bug 819] remove erroneous #if 0 in Windows completion port code. +* The new config code missed an #ifdef for building without refclocks. +* Distribute some files needed by the new config parsing code. +* [Bug 819] Timeout for WaitForMultipleObjects was 500ms instead of INFINITE +* Use autogen 5.9.1. +* Fix clktest command-line arg processing.' +* Audio documentation updates from Dave Mills. +* New config file parsing code, from Sachin Kamboj. +* fuzz bit cleanup from Dave Mills. +* replay cleanup from Dave Mills. +* [Bug 542] Tolerate missing directory separator at EO statsdir. +* [Bug 812] ntpd should drop supplementary groups. +* [Bug 815] Fix warning compiling 4.2.5p22 under Windows with VC6. +* [Bug 740] Fix kernel/daemon startup drift anomaly. +* refclock_wwv.c fixes from Dave Mills. +* [Bug 810] Fix ntp-keygen documentation. +* [Bug 787] Bug fixes for 64-bit time_t on Windows. +* [Bug 796] Clean up duplicate #defines in ntp_control.c. +* [Bug 569] Use the correct precision for the Leitch CSD-5300. +* [Bug 795] Moved declaration of variable to top of function. +* [Bug 798] ntpq [p typo crashes ntpq/ntpdc. +* [Bug 786] Fix refclock_bancomm.c on Solaris. +* [Bug 774] parsesolaris.c does not compile under the new Solaris. +* [Bug 782] Remove P() macros from Windows files. +* [Bug 778] ntpd fails to lock with drift=+500 when started with drift=-500. +* [Bug 592] Trimble Thunderbolt GPS support. +* IRIG, CHU, WWV, WWVB refclock improvements from Dave Mills. +* [Bug 757] Lose ULONG_CONST(). +* [Bug 756] Require ANSI C (function prototypes). +* codec (audio) and ICOM changes from Dave Mills. + +--- + * [Bug 841] Obsolete the "dynamic" keyword and make deferred binding to local interfaces the default. Emit a warning if that keyword is used for configuration. diff --cc ntpd/ntp_peer.c index 397be7a78,deeec5bc3..d09b9e878 --- a/ntpd/ntp_peer.c +++ b/ntpd/ntp_peer.c @@@ -26,9 -29,9 +30,9 @@@ extern int accept_wildcard_if_for_winnt * NO_PEER | e 1 0 1 1 1 * ACTIVE | e 1 1 0 0 0 * PASSIVE | e 1 e 0 0 0 - * CLIENT | e 0 0 0 1 1 + * CLIENT | e 0 0 0 1 0 * SERVER | e 0 0 0 0 0 - * BCAST | e 0 0 0 0 0 + * BCAST | e 0 0 0 0 0 * BCLIENT | e 0 0 0 e 1 * * One point to note here: a packet in BCAST mode can potentially match