diff --git a/contrib/ntp/COPYRIGHT b/contrib/ntp/COPYRIGHT index 013202c0fb09..0cb57168ebfc 100644 --- a/contrib/ntp/COPYRIGHT +++ b/contrib/ntp/COPYRIGHT @@ -3,7 +3,7 @@ This file is automatically generated from html/copyright.html jpg "Clone me," says Dolly sheepishly. - Last update: 2-Mar-2023 05:21 UTC + Last update: 7-Jan-2024 00:29 UTC __________________________________________________________________ The following copyright notice applies to all files collectively called @@ -32,7 +32,7 @@ This file is automatically generated from html/copyright.html Hart, Danny Mayer, Martin Burnicki, and possibly others is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2023 * +* Copyright (c) Network Time Foundation 2011-2024 * * * * All Rights Reserved * * * diff --git a/contrib/ntp/ChangeLog b/contrib/ntp/ChangeLog index 93cdab8b94eb..f4a196aa57cd 100644 --- a/contrib/ntp/ChangeLog +++ b/contrib/ntp/ChangeLog @@ -1,3 +1,121 @@ +--- +(4.2.8p18) 2024/05/25 Released by Harlan Stenn + +* [Bug 3918] Tweak openssl header/library handling. +* [Bug 3914] Spurious "Unexpected origin timestamp" logged after time + stepped. +* [Bug 3913] Avoid duplicate IPv6 link-local manycast associations. + +* [Bug 3912] Avoid rare math errors in ntptrace. +* [Bug 3910] Memory leak using openssl-3 +* [Bug 3909] Do not select multicast local address for unicast peer. + +* [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe. + +* [Bug 3901] LIB_GETBUF isn't thread-safe. +* [Bug 3900] fast_xmit() selects wrong local addr responding to mcast on + Windows. +* [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient creates + duplicate associations. +* [Bug 3872] Ignore restrict mask for hostname. +* [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails. + Reported by Hans Mayer. Moved NONEMPTY_TRANSLATION_UNIT + declaration from ntp_types.h to config.h. +* [Bug 3870] Server drops client packets with ppoll < 4. +* [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs. + Reported by PoolMUC@web.de. +* [Bug 3868] Cannot restrict a pool peer. Thanks to + Edward McGuire for tracking down the deficiency. +* [Bug 3864] ntpd IPv6 refid different for big-endian and little-endian. + +* [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. +* [Bug 3856] Enable Edit & Continue debugging with Visual Studio. + +* [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict. +* [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid. + +* [Bug 3853] Clean up warnings with modern compilers. +* [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as + intended. +* [Bug 3851] Drop pool server when no local address can reach it. + +* [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid. + +* [Bug 3849] ntpd --wait-sync times out. +* [Bug 3847] SSL detection in configure should run-test if runpath is needed. + +* [Bug 3846] Use -Wno-format-truncation by default. +* [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access. + +* [Bug 3842] Windows ntpd PPSAPI DLL load failure crashes. +* [Bug 3841] 4.2.8p17 build break w/ gcc 12 -Wformat-security without -Wformat + Need to remove --Wformat-security when removing -Wformat to + silence numerous libopts warnings. +* [Bug 3837] NULL pointer deref crash when ntpd deletes last interface. + Reported by renmingshuai. Correct UNLINK_EXPR_SLIST() when the + list is empty. +* [Bug 3835] NTP_HARD_*FLAGS not used by libevent tearoff. +* [Bug 3831] pollskewlist zeroed on runtime configuration. +* [Bug 3830] configure libevent check intersperses output with answer. +* [Bug 3828] BK should ignore a git repo in the same directory. + +* [Bug 3827] Fix build in case CLOCK_HOPF6021 or CLOCK_WHARTON_400A + is disabled. +* [Bug 3825] Don't touch HTML files unless building inside a BK repo. + Fix the script checkHtmlFileDates. +* [Bug 3756] Improve OpenSSL library/header detection. +* [Bug 3753] ntpd fails to start with FIPS-enabled OpenSSL 3. +* [Bug 2734] TEST3 prevents initial interleave sync. Fix from +* Log failures to allocate receive buffers. +* Remove extraneous */ from libparse/ieee754io.c +* Fix .datecheck target line in Makefile.am. +* Update the copyright year. +* Update ntp.conf documentation to add "delrestrict" and correct information + about KoD rate limiting. +* html/clockopt.html cleanup. +* util/lsf-times - added. +* Add DSA, DSA-SHA, and SHA to tests/libntp/digests.c. +* Provide ntpd thread names to debugger on Windows. +* Remove dead code libntp/numtohost.c and its unit tests. +* Remove class A, B, C IPv4 distinctions in netof(). +* Use @configure_input@ in various *.in files to include a comment that + the file is generated from another pointing to the *.in. +* Correct underquoting, indents in ntp_facilitynames.m4. +* Clean up a few warnings seen building with older gcc. +* Fix build on older FreeBSD lacking sys/procctl.h. +* Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix + that makes it unnecessary, re-enabling ASLR stack gap. +* Use NONEMPTY_COMPILATION_UNIT in more conditionally-compiled files. +* Remove useless pointer to Windows Help from system error messages. +* Avoid newlines within Windows error messages. +* Ensure unique association IDs if wrapped. +* Simplify calc_addr_distance(). +* Clamp min/maxpoll in edge cases in newpeer(). +* Quiet local addr change logging when unpeering. +* Correct missing arg for %s printf specifier in + send_blocking_resp_internal(). +* Suppress OpenSSL 3 deprecation warning clutter. +* Correct OpenSSL usage in Autokey code to avoid warnings about + discarding const qualifiers with OpenSSL 3. +* Display KoD refid as text in recently added message. +* Avoid running checkHtmlFileDates script repeatedly when no html/*.html + files have changed. +* Abort configure if --enable-crypto-rand given & unavailable. +* Add configure --enable-verbose-ssl to trace SSL detection. +* Add build test coverage for --disable-saveconfig to flock-build script. + +* Remove deprecated configure --with-arlib option. +* Remove configure support for ISC UNIX ca. 1998. +* Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files + to NTP_LIBNTP. +* Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS. +* Eliminate [v]snprintf redefinition warnings on macOS. +* Fix clang 14 cast increases alignment warning on Linux. +* Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests. + +* Use NTP_HARD_CPPFLAGS in libopts tearoff. +* wire in --enable-build-framework-help + --- (4.2.8p17) 2023/06/06 Released by Harlan Stenn @@ -10,7 +128,7 @@ Miroslav Lichvar and Matt for rapid testing and identifying the problem. * Add tests/libntp/digests.c to catch regressions reading keys file or with - symmetric authentication digest output. + symmetric authentication digest output. --- (4.2.8p16) 2023/05/31 Released by Harlan Stenn diff --git a/contrib/ntp/CommitLog b/contrib/ntp/CommitLog index adeda2c60402..49952cfaef0d 100644 --- a/contrib/ntp/CommitLog +++ b/contrib/ntp/CommitLog @@ -1,3 +1,3224 @@ +ChangeSet@1.4062, 2024-05-25 00:06:49-07:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P18 + TAG: NTP_4_2_8P18 + + ChangeLog@1.2103 +1 -0 + NTP_4_2_8P18 + + ntpd/invoke-ntp.conf.texi@1.231 +1 -1 + NTP_4_2_8P18 + + ntpd/invoke-ntp.keys.texi@1.214 +1 -1 + NTP_4_2_8P18 + + ntpd/invoke-ntpd.texi@1.528 +2 -2 + NTP_4_2_8P18 + + ntpd/ntp.conf.5man@1.265 +2 -2 + NTP_4_2_8P18 + + ntpd/ntp.conf.5mdoc@1.265 +2 -2 + NTP_4_2_8P18 + + ntpd/ntp.conf.html@1.213 +1 -1 + NTP_4_2_8P18 + + ntpd/ntp.conf.man.in@1.265 +2 -2 + NTP_4_2_8P18 + + ntpd/ntp.conf.mdoc.in@1.265 +2 -2 + NTP_4_2_8P18 + + ntpd/ntp.keys.5man@1.248 +2 -2 + NTP_4_2_8P18 + + ntpd/ntp.keys.5mdoc@1.248 +2 -2 + NTP_4_2_8P18 + + ntpd/ntp.keys.html@1.208 +1 -1 + NTP_4_2_8P18 + + ntpd/ntp.keys.man.in@1.248 +2 -2 + NTP_4_2_8P18 + + ntpd/ntp.keys.mdoc.in@1.248 +2 -2 + NTP_4_2_8P18 + + ntpd/ntpd-opts.c@1.553 +245 -245 + NTP_4_2_8P18 + + ntpd/ntpd-opts.h@1.552 +3 -3 + NTP_4_2_8P18 + + ntpd/ntpd.1ntpdman@1.357 +2 -2 + NTP_4_2_8P18 + + ntpd/ntpd.1ntpdmdoc@1.357 +2 -2 + NTP_4_2_8P18 + + ntpd/ntpd.html@1.202 +2 -2 + NTP_4_2_8P18 + + ntpd/ntpd.man.in@1.357 +2 -2 + NTP_4_2_8P18 + + ntpd/ntpd.mdoc.in@1.357 +2 -2 + NTP_4_2_8P18 + + ntpdc/invoke-ntpdc.texi@1.527 +2 -2 + NTP_4_2_8P18 + + ntpdc/ntpdc-opts.c@1.548 +113 -113 + NTP_4_2_8P18 + + ntpdc/ntpdc-opts.h@1.547 +3 -3 + NTP_4_2_8P18 + + ntpdc/ntpdc.1ntpdcman@1.358 +2 -2 + NTP_4_2_8P18 + + ntpdc/ntpdc.1ntpdcmdoc@1.358 +2 -2 + NTP_4_2_8P18 + + ntpdc/ntpdc.html@1.372 +2 -2 + NTP_4_2_8P18 + + ntpdc/ntpdc.man.in@1.358 +2 -2 + NTP_4_2_8P18 + + ntpdc/ntpdc.mdoc.in@1.358 +2 -2 + NTP_4_2_8P18 + + ntpq/invoke-ntpq.texi@1.537 +2 -2 + NTP_4_2_8P18 + + ntpq/ntpq-opts.c@1.557 +120 -120 + NTP_4_2_8P18 + + ntpq/ntpq-opts.h@1.555 +3 -3 + NTP_4_2_8P18 + + ntpq/ntpq.1ntpqman@1.365 +2 -2 + NTP_4_2_8P18 + + ntpq/ntpq.1ntpqmdoc@1.365 +2 -2 + NTP_4_2_8P18 + + ntpq/ntpq.html@1.202 +2 -2 + NTP_4_2_8P18 + + ntpq/ntpq.man.in@1.365 +2 -2 + NTP_4_2_8P18 + + ntpq/ntpq.mdoc.in@1.365 +2 -2 + NTP_4_2_8P18 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.527 +2 -2 + NTP_4_2_8P18 + + ntpsnmpd/ntpsnmpd-opts.c@1.548 +68 -68 + NTP_4_2_8P18 + + ntpsnmpd/ntpsnmpd-opts.h@1.547 +3 -3 + NTP_4_2_8P18 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.356 +2 -2 + NTP_4_2_8P18 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.356 +2 -2 + NTP_4_2_8P18 + + ntpsnmpd/ntpsnmpd.html@1.194 +1 -1 + NTP_4_2_8P18 + + ntpsnmpd/ntpsnmpd.man.in@1.356 +2 -2 + NTP_4_2_8P18 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.356 +2 -2 + NTP_4_2_8P18 + + packageinfo.sh@1.553 +2 -2 + NTP_4_2_8P18 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.117 +2 -2 + NTP_4_2_8P18 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.119 +2 -2 + NTP_4_2_8P18 + + scripts/calc_tickadj/calc_tickadj.html@1.118 +1 -1 + NTP_4_2_8P18 + + scripts/calc_tickadj/calc_tickadj.man.in@1.116 +2 -2 + NTP_4_2_8P18 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.119 +2 -2 + NTP_4_2_8P18 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.121 +1 -1 + NTP_4_2_8P18 + + scripts/invoke-plot_summary.texi@1.139 +2 -2 + NTP_4_2_8P18 + + scripts/invoke-summary.texi@1.138 +2 -2 + NTP_4_2_8P18 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.350 +2 -2 + NTP_4_2_8P18 + + scripts/ntp-wait/ntp-wait-opts@1.86 +2 -2 + NTP_4_2_8P18 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.345 +2 -2 + NTP_4_2_8P18 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.347 +2 -2 + NTP_4_2_8P18 + + scripts/ntp-wait/ntp-wait.html@1.366 +2 -2 + NTP_4_2_8P18 + + scripts/ntp-wait/ntp-wait.man.in@1.345 +2 -2 + NTP_4_2_8P18 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.347 +2 -2 + NTP_4_2_8P18 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.136 +2 -2 + NTP_4_2_8P18 + + scripts/ntpsweep/ntpsweep-opts@1.89 +2 -2 + NTP_4_2_8P18 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.124 +2 -2 + NTP_4_2_8P18 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.124 +2 -2 + NTP_4_2_8P18 + + scripts/ntpsweep/ntpsweep.html@1.138 +2 -2 + NTP_4_2_8P18 + + scripts/ntpsweep/ntpsweep.man.in@1.124 +2 -2 + NTP_4_2_8P18 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.125 +2 -2 + NTP_4_2_8P18 + + scripts/ntptrace/invoke-ntptrace.texi@1.139 +2 -2 + NTP_4_2_8P18 + + scripts/ntptrace/ntptrace-opts@1.89 +2 -2 + NTP_4_2_8P18 + + scripts/ntptrace/ntptrace.1ntptraceman@1.124 +2 -2 + NTP_4_2_8P18 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.126 +2 -2 + NTP_4_2_8P18 + + scripts/ntptrace/ntptrace.html@1.139 +2 -2 + NTP_4_2_8P18 + + scripts/ntptrace/ntptrace.man.in@1.124 +2 -2 + NTP_4_2_8P18 + + scripts/ntptrace/ntptrace.mdoc.in@1.127 +2 -2 + NTP_4_2_8P18 + + scripts/plot_summary-opts@1.90 +2 -2 + NTP_4_2_8P18 + + scripts/plot_summary.1plot_summaryman@1.137 +2 -2 + NTP_4_2_8P18 + + scripts/plot_summary.1plot_summarymdoc@1.137 +2 -2 + NTP_4_2_8P18 + + scripts/plot_summary.html@1.141 +2 -2 + NTP_4_2_8P18 + + scripts/plot_summary.man.in@1.137 +2 -2 + NTP_4_2_8P18 + + scripts/plot_summary.mdoc.in@1.137 +2 -2 + NTP_4_2_8P18 + + scripts/summary-opts@1.89 +2 -2 + NTP_4_2_8P18 + + scripts/summary.1summaryman@1.136 +2 -2 + NTP_4_2_8P18 + + scripts/summary.1summarymdoc@1.136 +2 -2 + NTP_4_2_8P18 + + scripts/summary.html@1.140 +2 -2 + NTP_4_2_8P18 + + scripts/summary.man.in@1.136 +2 -2 + NTP_4_2_8P18 + + scripts/summary.mdoc.in@1.136 +2 -2 + NTP_4_2_8P18 + + scripts/update-leap/invoke-update-leap.texi@1.37 +1 -1 + NTP_4_2_8P18 + + scripts/update-leap/update-leap-opts@1.39 +2 -2 + NTP_4_2_8P18 + + scripts/update-leap/update-leap.1update-leapman@1.37 +2 -2 + NTP_4_2_8P18 + + scripts/update-leap/update-leap.1update-leapmdoc@1.38 +2 -2 + NTP_4_2_8P18 + + scripts/update-leap/update-leap.html@1.37 +1 -1 + NTP_4_2_8P18 + + scripts/update-leap/update-leap.man.in@1.37 +2 -2 + NTP_4_2_8P18 + + scripts/update-leap/update-leap.mdoc.in@1.38 +2 -2 + NTP_4_2_8P18 + + sntp/invoke-sntp.texi@1.527 +2 -2 + NTP_4_2_8P18 + + sntp/sntp-opts.c@1.549 +161 -161 + NTP_4_2_8P18 + + sntp/sntp-opts.h@1.547 +3 -3 + NTP_4_2_8P18 + + sntp/sntp.1sntpman@1.362 +2 -2 + NTP_4_2_8P18 + + sntp/sntp.1sntpmdoc@1.362 +2 -2 + NTP_4_2_8P18 + + sntp/sntp.html@1.543 +2 -2 + NTP_4_2_8P18 + + sntp/sntp.man.in@1.362 +2 -2 + NTP_4_2_8P18 + + sntp/sntp.mdoc.in@1.362 +2 -2 + NTP_4_2_8P18 + + util/invoke-ntp-keygen.texi@1.530 +2 -2 + NTP_4_2_8P18 + + util/ntp-keygen-opts.c@1.551 +174 -174 + NTP_4_2_8P18 + + util/ntp-keygen-opts.h@1.549 +3 -3 + NTP_4_2_8P18 + + util/ntp-keygen.1ntp-keygenman@1.358 +2 -2 + NTP_4_2_8P18 + + util/ntp-keygen.1ntp-keygenmdoc@1.358 +2 -2 + NTP_4_2_8P18 + + util/ntp-keygen.html@1.203 +2 -2 + NTP_4_2_8P18 + + util/ntp-keygen.man.in@1.358 +2 -2 + NTP_4_2_8P18 + + util/ntp-keygen.mdoc.in@1.358 +2 -2 + NTP_4_2_8P18 + +ChangeSet@1.4061, 2024-05-24 23:46:58-07:00, ntpreleng@ntp-build.tal1.ntfo.org + ntp-4.2.8p18 + + ChangeLog@1.2102 +0 -2 + ntp-4.2.8p18 + +ChangeSet@1.4060, 2024-05-24 22:53:53-07:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P18_RCGO + TAG: NTP_4_2_8P18_RCGO + + ChangeLog@1.2101 +1 -0 + NTP_4_2_8P18_RCGO + + ntpd/invoke-ntp.conf.texi@1.230 +1 -1 + NTP_4_2_8P18_RCGO + + ntpd/invoke-ntp.keys.texi@1.213 +1 -1 + NTP_4_2_8P18_RCGO + + ntpd/invoke-ntpd.texi@1.527 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntp.conf.5man@1.264 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntp.conf.5mdoc@1.264 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntp.conf.html@1.212 +1 -1 + NTP_4_2_8P18_RCGO + + ntpd/ntp.conf.man.in@1.264 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntp.conf.mdoc.in@1.264 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntp.keys.5man@1.247 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntp.keys.5mdoc@1.247 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntp.keys.html@1.207 +1 -1 + NTP_4_2_8P18_RCGO + + ntpd/ntp.keys.man.in@1.247 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntp.keys.mdoc.in@1.247 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntpd-opts.c@1.552 +7 -7 + NTP_4_2_8P18_RCGO + + ntpd/ntpd-opts.h@1.551 +3 -3 + NTP_4_2_8P18_RCGO + + ntpd/ntpd.1ntpdman@1.356 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntpd.1ntpdmdoc@1.356 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntpd.html@1.201 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntpd.man.in@1.356 +2 -2 + NTP_4_2_8P18_RCGO + + ntpd/ntpd.mdoc.in@1.356 +2 -2 + NTP_4_2_8P18_RCGO + + ntpdc/invoke-ntpdc.texi@1.526 +2 -2 + NTP_4_2_8P18_RCGO + + ntpdc/ntpdc-opts.c@1.547 +7 -7 + NTP_4_2_8P18_RCGO + + ntpdc/ntpdc-opts.h@1.546 +3 -3 + NTP_4_2_8P18_RCGO + + ntpdc/ntpdc.1ntpdcman@1.357 +2 -2 + NTP_4_2_8P18_RCGO + + ntpdc/ntpdc.1ntpdcmdoc@1.357 +2 -2 + NTP_4_2_8P18_RCGO + + ntpdc/ntpdc.html@1.371 +2 -2 + NTP_4_2_8P18_RCGO + + ntpdc/ntpdc.man.in@1.357 +2 -2 + NTP_4_2_8P18_RCGO + + ntpdc/ntpdc.mdoc.in@1.357 +2 -2 + NTP_4_2_8P18_RCGO + + ntpq/invoke-ntpq.texi@1.536 +2 -2 + NTP_4_2_8P18_RCGO + + ntpq/ntpq-opts.c@1.556 +7 -7 + NTP_4_2_8P18_RCGO + + ntpq/ntpq-opts.h@1.554 +3 -3 + NTP_4_2_8P18_RCGO + + ntpq/ntpq.1ntpqman@1.364 +2 -2 + NTP_4_2_8P18_RCGO + + ntpq/ntpq.1ntpqmdoc@1.364 +2 -2 + NTP_4_2_8P18_RCGO + + ntpq/ntpq.html@1.201 +2 -2 + NTP_4_2_8P18_RCGO + + ntpq/ntpq.man.in@1.364 +2 -2 + NTP_4_2_8P18_RCGO + + ntpq/ntpq.mdoc.in@1.364 +2 -2 + NTP_4_2_8P18_RCGO + + ntpsnmpd/invoke-ntpsnmpd.texi@1.526 +2 -2 + NTP_4_2_8P18_RCGO + + ntpsnmpd/ntpsnmpd-opts.c@1.547 +7 -7 + NTP_4_2_8P18_RCGO + + ntpsnmpd/ntpsnmpd-opts.h@1.546 +3 -3 + NTP_4_2_8P18_RCGO + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.355 +2 -2 + NTP_4_2_8P18_RCGO + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.355 +2 -2 + NTP_4_2_8P18_RCGO + + ntpsnmpd/ntpsnmpd.html@1.193 +1 -1 + NTP_4_2_8P18_RCGO + + ntpsnmpd/ntpsnmpd.man.in@1.355 +2 -2 + NTP_4_2_8P18_RCGO + + ntpsnmpd/ntpsnmpd.mdoc.in@1.355 +2 -2 + NTP_4_2_8P18_RCGO + + packageinfo.sh@1.552 +3 -1 + NTP_4_2_8P18_RCGO + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.116 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.118 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/calc_tickadj/calc_tickadj.html@1.117 +1 -1 + NTP_4_2_8P18_RCGO + + scripts/calc_tickadj/calc_tickadj.man.in@1.115 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.118 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.120 +1 -1 + NTP_4_2_8P18_RCGO + + scripts/invoke-plot_summary.texi@1.138 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/invoke-summary.texi@1.137 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntp-wait/invoke-ntp-wait.texi@1.349 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntp-wait/ntp-wait-opts@1.85 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.344 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.346 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntp-wait/ntp-wait.html@1.365 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntp-wait/ntp-wait.man.in@1.344 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntp-wait/ntp-wait.mdoc.in@1.346 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntpsweep/invoke-ntpsweep.texi@1.135 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntpsweep/ntpsweep-opts@1.88 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.123 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.123 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntpsweep/ntpsweep.html@1.137 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntpsweep/ntpsweep.man.in@1.123 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntpsweep/ntpsweep.mdoc.in@1.124 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntptrace/invoke-ntptrace.texi@1.138 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntptrace/ntptrace-opts@1.88 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntptrace/ntptrace.1ntptraceman@1.123 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.125 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntptrace/ntptrace.html@1.138 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntptrace/ntptrace.man.in@1.123 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/ntptrace/ntptrace.mdoc.in@1.126 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/plot_summary-opts@1.89 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/plot_summary.1plot_summaryman@1.136 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/plot_summary.1plot_summarymdoc@1.136 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/plot_summary.html@1.140 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/plot_summary.man.in@1.136 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/plot_summary.mdoc.in@1.136 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/summary-opts@1.88 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/summary.1summaryman@1.135 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/summary.1summarymdoc@1.135 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/summary.html@1.139 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/summary.man.in@1.135 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/summary.mdoc.in@1.135 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/update-leap/invoke-update-leap.texi@1.36 +1 -1 + NTP_4_2_8P18_RCGO + + scripts/update-leap/update-leap-opts@1.38 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/update-leap/update-leap.1update-leapman@1.36 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/update-leap/update-leap.1update-leapmdoc@1.37 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/update-leap/update-leap.html@1.36 +1 -1 + NTP_4_2_8P18_RCGO + + scripts/update-leap/update-leap.man.in@1.36 +2 -2 + NTP_4_2_8P18_RCGO + + scripts/update-leap/update-leap.mdoc.in@1.37 +2 -2 + NTP_4_2_8P18_RCGO + + sntp/invoke-sntp.texi@1.526 +2 -2 + NTP_4_2_8P18_RCGO + + sntp/sntp-opts.c@1.548 +7 -7 + NTP_4_2_8P18_RCGO + + sntp/sntp-opts.h@1.546 +3 -3 + NTP_4_2_8P18_RCGO + + sntp/sntp.1sntpman@1.361 +2 -2 + NTP_4_2_8P18_RCGO + + sntp/sntp.1sntpmdoc@1.361 +2 -2 + NTP_4_2_8P18_RCGO + + sntp/sntp.html@1.542 +2 -2 + NTP_4_2_8P18_RCGO + + sntp/sntp.man.in@1.361 +2 -2 + NTP_4_2_8P18_RCGO + + sntp/sntp.mdoc.in@1.361 +2 -2 + NTP_4_2_8P18_RCGO + + util/invoke-ntp-keygen.texi@1.529 +2 -2 + NTP_4_2_8P18_RCGO + + util/ntp-keygen-opts.c@1.550 +7 -7 + NTP_4_2_8P18_RCGO + + util/ntp-keygen-opts.h@1.548 +3 -3 + NTP_4_2_8P18_RCGO + + util/ntp-keygen.1ntp-keygenman@1.357 +2 -2 + NTP_4_2_8P18_RCGO + + util/ntp-keygen.1ntp-keygenmdoc@1.357 +2 -2 + NTP_4_2_8P18_RCGO + + util/ntp-keygen.html@1.202 +2 -2 + NTP_4_2_8P18_RCGO + + util/ntp-keygen.man.in@1.357 +2 -2 + NTP_4_2_8P18_RCGO + + util/ntp-keygen.mdoc.in@1.357 +2 -2 + NTP_4_2_8P18_RCGO + +ChangeSet@1.4059, 2024-05-24 00:40:40-07:00, ntpreleng@ntp-build.tal1.ntfo.org + Remove duplicate ChangeLog entries + + ChangeLog@1.2100 +1 -1 + Remove duplicate ChangeLog entries + + NEWS@1.221 +3898 -7 + Remove duplicate ChangeLog entries + +ChangeSet@1.4058, 2024-05-24 00:30:46-07:00, ntpreleng@ntp-build.tal1.ntfo.org + Remove duplicate ChangeLog entries + + ChangeLog@1.2099 +0 -4 + Remove duplicate ChangeLog entries + +ChangeSet@1.4057, 2024-05-07 16:50:59-07:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P18_RC1 + TAG: NTP_4_2_8P18_RC1 + + ChangeLog@1.2098 +1 -0 + NTP_4_2_8P18_RC1 + + ntpd/invoke-ntp.conf.texi@1.229 +1 -1 + NTP_4_2_8P18_RC1 + + ntpd/invoke-ntp.keys.texi@1.212 +1 -1 + NTP_4_2_8P18_RC1 + + ntpd/invoke-ntpd.texi@1.526 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntp.conf.5man@1.263 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntp.conf.5mdoc@1.263 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntp.conf.html@1.211 +765 -817 + NTP_4_2_8P18_RC1 + + ntpd/ntp.conf.man.in@1.263 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntp.conf.mdoc.in@1.263 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntp.keys.5man@1.246 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntp.keys.5mdoc@1.246 +3 -3 + NTP_4_2_8P18_RC1 + + ntpd/ntp.keys.html@1.206 +105 -97 + NTP_4_2_8P18_RC1 + + ntpd/ntp.keys.man.in@1.246 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntp.keys.mdoc.in@1.246 +3 -3 + NTP_4_2_8P18_RC1 + + ntpd/ntpd-opts.c@1.551 +245 -245 + NTP_4_2_8P18_RC1 + + ntpd/ntpd-opts.h@1.550 +3 -3 + NTP_4_2_8P18_RC1 + + ntpd/ntpd.1ntpdman@1.355 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntpd.1ntpdmdoc@1.355 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntpd.html@1.200 +398 -427 + NTP_4_2_8P18_RC1 + + ntpd/ntpd.man.in@1.355 +2 -2 + NTP_4_2_8P18_RC1 + + ntpd/ntpd.mdoc.in@1.355 +2 -2 + NTP_4_2_8P18_RC1 + + ntpdc/invoke-ntpdc.texi@1.525 +2 -2 + NTP_4_2_8P18_RC1 + + ntpdc/ntpdc-opts.c@1.546 +113 -113 + NTP_4_2_8P18_RC1 + + ntpdc/ntpdc-opts.h@1.545 +3 -3 + NTP_4_2_8P18_RC1 + + ntpdc/ntpdc.1ntpdcman@1.356 +2 -2 + NTP_4_2_8P18_RC1 + + ntpdc/ntpdc.1ntpdcmdoc@1.356 +2 -2 + NTP_4_2_8P18_RC1 + + ntpdc/ntpdc.html@1.370 +209 -215 + NTP_4_2_8P18_RC1 + + ntpdc/ntpdc.man.in@1.356 +2 -2 + NTP_4_2_8P18_RC1 + + ntpdc/ntpdc.mdoc.in@1.356 +2 -2 + NTP_4_2_8P18_RC1 + + ntpq/invoke-ntpq.texi@1.535 +2 -2 + NTP_4_2_8P18_RC1 + + ntpq/ntpq-opts.c@1.555 +120 -120 + NTP_4_2_8P18_RC1 + + ntpq/ntpq-opts.h@1.553 +3 -3 + NTP_4_2_8P18_RC1 + + ntpq/ntpq.1ntpqman@1.363 +2 -2 + NTP_4_2_8P18_RC1 + + ntpq/ntpq.1ntpqmdoc@1.363 +2 -2 + NTP_4_2_8P18_RC1 + + ntpq/ntpq.html@1.200 +815 -813 + NTP_4_2_8P18_RC1 + + ntpq/ntpq.man.in@1.363 +2 -2 + NTP_4_2_8P18_RC1 + + ntpq/ntpq.mdoc.in@1.363 +2 -2 + NTP_4_2_8P18_RC1 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.525 +2 -2 + NTP_4_2_8P18_RC1 + + ntpsnmpd/ntpsnmpd-opts.c@1.546 +68 -68 + NTP_4_2_8P18_RC1 + + ntpsnmpd/ntpsnmpd-opts.h@1.545 +3 -3 + NTP_4_2_8P18_RC1 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.354 +2 -2 + NTP_4_2_8P18_RC1 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.354 +2 -2 + NTP_4_2_8P18_RC1 + + ntpsnmpd/ntpsnmpd.html@1.192 +52 -39 + NTP_4_2_8P18_RC1 + + ntpsnmpd/ntpsnmpd.man.in@1.354 +2 -2 + NTP_4_2_8P18_RC1 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.354 +2 -2 + NTP_4_2_8P18_RC1 + + packageinfo.sh@1.551 +3 -3 + NTP_4_2_8P18_RC1 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.115 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.117 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/calc_tickadj/calc_tickadj.html@1.116 +30 -51 + NTP_4_2_8P18_RC1 + + scripts/calc_tickadj/calc_tickadj.man.in@1.114 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.117 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.119 +1 -1 + NTP_4_2_8P18_RC1 + + scripts/invoke-plot_summary.texi@1.137 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/invoke-summary.texi@1.136 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.348 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntp-wait/ntp-wait-opts@1.84 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.343 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.345 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntp-wait/ntp-wait.html@1.364 +109 -93 + NTP_4_2_8P18_RC1 + + scripts/ntp-wait/ntp-wait.man.in@1.343 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.345 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.134 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntpsweep/ntpsweep-opts@1.87 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.122 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.122 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntpsweep/ntpsweep.html@1.136 +39 -65 + NTP_4_2_8P18_RC1 + + scripts/ntpsweep/ntpsweep.man.in@1.122 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.123 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntptrace/invoke-ntptrace.texi@1.137 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntptrace/ntptrace-opts@1.87 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntptrace/ntptrace.1ntptraceman@1.122 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.124 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntptrace/ntptrace.html@1.137 +96 -81 + NTP_4_2_8P18_RC1 + + scripts/ntptrace/ntptrace.man.in@1.122 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/ntptrace/ntptrace.mdoc.in@1.125 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/plot_summary-opts@1.88 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/plot_summary.1plot_summaryman@1.135 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/plot_summary.1plot_summarymdoc@1.135 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/plot_summary.html@1.139 +46 -73 + NTP_4_2_8P18_RC1 + + scripts/plot_summary.man.in@1.135 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/plot_summary.mdoc.in@1.135 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/summary-opts@1.87 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/summary.1summaryman@1.134 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/summary.1summarymdoc@1.134 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/summary.html@1.138 +41 -66 + NTP_4_2_8P18_RC1 + + scripts/summary.man.in@1.134 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/summary.mdoc.in@1.134 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/update-leap/invoke-update-leap.texi@1.35 +1 -1 + NTP_4_2_8P18_RC1 + + scripts/update-leap/update-leap-opts@1.37 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/update-leap/update-leap.1update-leapman@1.35 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/update-leap/update-leap.1update-leapmdoc@1.36 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/update-leap/update-leap.html@1.35 +48 -80 + NTP_4_2_8P18_RC1 + + scripts/update-leap/update-leap.man.in@1.35 +2 -2 + NTP_4_2_8P18_RC1 + + scripts/update-leap/update-leap.mdoc.in@1.36 +2 -2 + NTP_4_2_8P18_RC1 + + sntp/invoke-sntp.texi@1.525 +2 -2 + NTP_4_2_8P18_RC1 + + sntp/sntp-opts.c@1.547 +161 -161 + NTP_4_2_8P18_RC1 + + sntp/sntp-opts.h@1.545 +3 -3 + NTP_4_2_8P18_RC1 + + sntp/sntp.1sntpman@1.360 +2 -2 + NTP_4_2_8P18_RC1 + + sntp/sntp.1sntpmdoc@1.360 +2 -2 + NTP_4_2_8P18_RC1 + + sntp/sntp.html@1.541 +258 -267 + NTP_4_2_8P18_RC1 + + sntp/sntp.man.in@1.360 +2 -2 + NTP_4_2_8P18_RC1 + + sntp/sntp.mdoc.in@1.360 +2 -2 + NTP_4_2_8P18_RC1 + + util/invoke-ntp-keygen.texi@1.528 +2 -2 + NTP_4_2_8P18_RC1 + + util/ntp-keygen-opts.c@1.549 +174 -174 + NTP_4_2_8P18_RC1 + + util/ntp-keygen-opts.h@1.547 +3 -3 + NTP_4_2_8P18_RC1 + + util/ntp-keygen.1ntp-keygenman@1.356 +2 -2 + NTP_4_2_8P18_RC1 + + util/ntp-keygen.1ntp-keygenmdoc@1.356 +2 -2 + NTP_4_2_8P18_RC1 + + util/ntp-keygen.html@1.201 +676 -652 + NTP_4_2_8P18_RC1 + + util/ntp-keygen.man.in@1.356 +2 -2 + NTP_4_2_8P18_RC1 + + util/ntp-keygen.mdoc.in@1.356 +2 -2 + NTP_4_2_8P18_RC1 + +ChangeSet@1.4056, 2024-04-28 22:49:42-05:00, stenn@stenn.chi1.ntfo.org + [Bug 2734] TEST3 prevents initial interleave sync + + ChangeLog@1.2097 +1 -0 + [Bug 2734] TEST3 prevents initial interleave sync + + ntpd/ntp_proto.c@1.459 +3 -1 + [Bug 2734] TEST3 prevents initial interleave sync + +ChangeSet@1.4055, 2024-04-21 03:19:48-05:00, harlan@stenn.chi1.ntfo.org + [Bug 3910] Memory leak using openssl-3 + + ChangeLog@1.2096 +1 -0 + [Bug 3910] Memory leak using openssl-3 + +ChangeSet@1.4054, 2024-04-21 03:11:17-05:00, harlan@stenn.chi1.ntfo.org + [Bug 3918] Tweak openssl header/library handling. + + ChangeLog@1.2095 +3 -3 + [Bug 3918] Tweak openssl header/library handling. + +ChangeSet@1.4053, 2024-04-17 04:23:11-05:00, harlan@stenn.chi1.ntfo.org + [Bug 3870] Server drops client packets with ppoll < 4. + + ChangeLog@1.2094 +1 -0 + [Bug 3870] Server drops client packets with ppoll < 4. + + ntpd/ntp_proto.c@1.458 +5 -0 + [Bug 3870] Server drops client packets with ppoll < 4. + +ChangeSet@1.4052, 2024-04-17 01:06:36-05:00, harlan@stenn.chi1.ntfo.org + [Bug 3912] Avoid rare math errors in ntptrace. + + ChangeLog@1.2093 +1 -0 + [Bug 3912] Avoid rare math errors in ntptrace. + + scripts/ntptrace/ntptrace.in@1.14 +10 -0 + [Bug 3912] Avoid rare math errors in ntptrace. + +ChangeSet@1.4051, 2024-04-16 21:21:02-05:00, harlan@stenn.chi1.ntfo.org + [Bug 3756] Improve OpenSSL-3 detection and usage. + + ChangeLog@1.2092 +1 -0 + [Bug 3756] Improve OpenSSL-3 detection and usage. + +ChangeSet@1.4050, 2024-04-16 18:54:42-05:00, harlan@stenn.chi1.ntfo.org + [Bug 3874] ntp_openssl.m4: openssl detection cleanup. + + ChangeLog@1.2091 +1 -1 + [Bug 3874] ntp_openssl.m4: openssl detection cleanup. + +ChangeSet@1.4040.3.2, 2024-04-15 18:23:02-07:00, harlan@ntp-testbuild.tal1.ntfo.org + openssl detection cleanup + + ChangeLog@1.2085.3.2 +1 -0 + openssl detection cleanup + + sntp/m4/ntp_openssl.m4@1.36.1.1 +115 -0 + openssl detection cleanup + +ChangeSet@1.4040.2.3, 2024-04-15 23:27:13+00:00, davehart@tl.ntp.md + revert unintended change to "case BLAH:" label indent level in ntp_proto.c + + ntpd/ntp_proto.c@1.454.2.2 +10 -11 + revert unintended change to "case BLAH:" label indent level. + +ChangeSet@1.4040.2.2, 2024-04-15 22:28:07+00:00, davehart@tl.ntp.md + Log failures to allocate receive buffers. + + ChangeLog@1.2085.2.2 +1 -0 + Log failures to allocate receive buffers. + + libntp/recvbuff.c@1.46 +26 -13 + Log failures to allocate receive buffers. + +ChangeSet@1.4040.3.1, 2024-04-14 23:49:56-07:00, harlan@ntp-testbuild.tal1.ntfo.org + Wire in --enable-build-framework + + ChangeLog@1.2085.3.1 +1 -0 + Wire in --enable-build-framework + + configure.ac@1.634.2.1 +17 -0 + Wire in --enable-build-framework + +ChangeSet@1.4040.2.1, 2024-04-13 18:47:27+00:00, davehart@tl.ntp.md + [Bug 3914] Spurious "Unexpected origin timestamp" logged after time stepped. + + ChangeLog@1.2085.2.1 +2 -0 + [Bug 3914] Spurious "Unexpected origin timestamp" logged after time stepped. + + ntpd/ntp_proto.c@1.454.2.1 +34 -20 + [Bug 3914] Spurious "Unexpected origin timestamp" logged after time stepped. + Log suggested poll value with KoD. + +ChangeSet@1.4040.1.5, 2024-04-12 12:23:49+00:00, davehart@tl.ntp.md + Update libtool initialization macros to recommended. + Quiet some more Autoconf deprecation warnings. + + configure.ac@1.634.1.1 +2 -3 + Update libtool initialization macros to recommended. + + ntpsnmpd/netsnmp_daemonize.c@1.8 +4 -12 + https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#AC_005fHEADER_005fTIME + + sntp/configure.ac@1.92.1.1 +2 -3 + Update libtool initialization macros to recommended. + + sntp/libevent/configure.ac@1.21 +1 -1 + Quiet Autoconf warning by using equivalent non-obsolete macro. + + sntp/libevent/m4/acx_pthread.m4@1.2 +1 -1 + Quiet Autoconf warning by using equivalent non-obsolete macro. + + sntp/m4/ntp_compiler.m4@1.11 +1 -6 + Quiet Autoconf warning by using equivalent non-obsolete macro. + + sntp/m4/ntp_libntp.m4@1.41.1.1 +1 -1 + https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#AC_005fHEADER_005fTIME + +ChangeSet@1.4040.1.4, 2024-04-11 02:51:34+00:00, davehart@tl.ntp.md + [Bug 3913] Avoid duplicate IPv6 link-local manycast associations. + Complete the switch from struct interface to endpt. + + ChangeLog@1.2085.1.2 +2 -0 + [Bug 3913] Avoid duplicate IPv6 link-local manycast associations. + + include/ntp.h@1.239.1.1 +6 -5 + Complete the switch from struct interface to endpt. + + include/ntp_control.h@1.61 +1 -1 + Complete the switch from struct interface to endpt. + + include/ntp_net.h@1.15 +1 -1 + Complete the switch from struct interface to endpt. + + include/ntpd.h@1.214 +3 -3 + Complete the switch from struct interface to endpt. + + libntp/socket.c@1.11 +8 -8 + Complete the switch from struct interface to endpt. + + ntpd/ntp_config.c@1.389 +2 -2 + Complete the switch from struct interface to endpt. + + ntpd/ntp_control.c@1.242.1.1 +8 -8 + Complete the switch from struct interface to endpt. + + ntpd/ntp_crypto.c@1.193.1.3 +1 -1 + Complete the switch from struct interface to endpt. + + ntpd/ntp_io.c@1.443.1.2 +200 -262 + [Bug 3913] Avoid duplicate IPv6 link-local manycast associations. + + ntpd/ntp_proto.c@1.454.1.1 +33 -10 + [Bug 3913] Avoid duplicate IPv6 link-local manycast associations. + + ports/winnt/include/ntp_iocpltypes.h@1.7 +0 -1 + omplete the switch from struct interface to endpt. + +ChangeSet@1.4040.1.3, 2024-04-11 01:49:09+00:00, davehart@tl.ntp.md + [Bug 3909] Do not select multicast local address for unicast peer. + + ChangeLog@1.2085.1.1 +2 -0 + [Bug 3909] Do not select multicast local address for unicast peer. + + ntpd/ntp_io.c@1.443.1.1 +26 -20 + [Bug 3909] Do not select multicast local address for unicast peer. + +ChangeSet@1.4047, 2024-04-08 04:35:34+00:00, davehart@tl.ntp.md + Fix mismatched braces breaking --enable-leap-smear builds (my mistake). + Test --enable-leap-smear in one of the flock-build variants. + + flock-build@1.54 +3 -15 + Build with leap smearing code active in the -noopenssl variant. + Remove references to Dr. Mills' backroom hosts, update udel hosts. + + ntpd/ntp_timer.c@1.102 +3 -2 + Fix mismatched braces breaking --enable-leap-smear builds (my mistake). + +ChangeSet@1.4045, 2024-04-04 21:49:45+00:00, davehart@fips-22-04.davehart.net + [Bug 3753] ntpd fails to start with FIPS-enabled OpenSSL 3. + + ChangeLog@1.2088 +1 -0 + [Bug 3753] ntpd fails to start with FIPS-enabled OpenSSL 3. + + include/Makefile.am@1.59 +1 -0 + add c99_snprintf.h to quiet [v]snprintf.h redefinition warnings. + + include/ntp.h@1.240 +8 -2 + Provide more digest size macros for unit tests. + + libntp/a_md5encrypt.c@1.59 +12 -15 + Do not terminate program on EVP_DigestInit() failure. + + libntp/authkeys.c@1.48 +3 -0 + Comment only + + libntp/ssl_init.c@1.34 +0 -3 + Move MD5_LENGTH macro to ntp.h + + ntpd/ntp_io.c@1.446 +1 -1 + Don't assume AF_UNSPEC is 0. + + sntp/crypto.c@1.43 +33 -39 + Use size_t rath4er than int/u_int. + Add digest buffer size arg to sntp's compute_mac(). + + sntp/crypto.h@1.16 +8 -7 + Use size_t and keyid_t rather than int/u_int. + + sntp/main.c@1.109 +10 -10 + Close broadcast sockets in sntp's kill_asyncio(). + + sntp/tests/crypto.c@1.20 +124 -63 + Switch unit test digest algorithm from MD5 to SHAKE128 so it works on FIPS OpenSSL. + + sntp/tests/packetHandling.c@1.8 +35 -15 + Switch unit test digest algorithm from MD5 to SHAKE128 so it works on FIPS OpenSSL. + + sntp/tests/packetProcessing.c@1.21 +112 -54 + Add SHAKE128 test, make MD5 test XFAIL to handle FIPS OpenSSL. + + sntp/tests/run-crypto.c@1.10 +10 -10 + generated + + sntp/tests/run-packetProcessing.c@1.16 +19 -17 + generated + + sntp/unity/unity_internals.h@1.8 +6 -4 + Make TEST_EXPECT_FAIL_MESSAGE() work. (Not in upstream) + + tests/libntp/a_md5encrypt.c@1.20 +76 -32 + Convert MAC unit tests to use SHA1 instead of MD5 for FIPS. + + tests/libntp/digests.c@1.3 +1 -1 + FIPS OpenSSL is expected to fail to initialize some digests. + + tests/libntp/run-a_md5encrypt.c@1.19 +5 -5 + generated + + tests/libntp/run-digests.c@1.4 +2 -2 + generated + + tests/libntp/run-ssl_init.c@1.12 +7 -7 + generated + + tests/libntp/ssl_init.c@1.12 +3 -7 + Remove redundant digest length identifiers + + util/lsf-times.c@1.1 +1 -0 + Stub needed by prior cset util/Makefile.am + + util/lsf-times.c@1.0 +0 -0 + +ChangeSet@1.4004.7.1, 2024-03-27 02:27:21-07:00, ntpreleng@ntp-bk2git.tal1.ntfo.org + authors.txt: + Add another email for Pearly + + BitKeeper/etc/authors.txt@1.4 +1 -0 + Add another email for Pearly + +ChangeSet@1.4044, 2024-03-04 13:16:37+00:00, davehart@tl.ntp.md + Build MD5 support even with OpenSSL to accomodate FIPS OpenSSL which lacks it. + Cache EVP_MD_CTX to avoid many alloc/frees around digest ops. + + include/ntp_md5.h@1.17 +13 -11 + Build MD5 support even with OpenSSL to accomodate FIPS OpenSSL which lacks it. + + include/ntp_stdlib.h@1.95 +4 -3 + Cache EVP_MD_CTX to avoid many alloc/frees around digest ops. + + libntp/a_md5encrypt.c@1.58 +33 -64 + Cache EVP_MD_CTX to avoid many alloc/frees around digest ops. + + libntp/ssl_init.c@1.33 +13 -9 + Cache EVP_MD_CTX to avoid many alloc/frees around digest ops. + + ntpd/ntp_control.c@1.243 +20 -31 + Use non-OpenSSL MD5 for mode 6 nonce generation. + + ntpd/ntp_crypto.c@1.196 +16 -41 + Cache EVP_MD_CTX to avoid many alloc/frees around digest ops. + + ntpd/ntp_proto.c@1.455 +3 -3 + Clean up debug output of timestamps. + + ports/winnt/include/msvc_ssl_autolib.h@1.4 +1 -1 + spelling + +ChangeSet@1.4043, 2024-02-23 09:09:57+00:00, hart@hart.chi1.ntfo.org + ntp_io.c: + clean up warnings about math with void * + + ntpd/ntp_io.c@1.445 +3 -2 + clean up warnings about math with void * + +ChangeSet@1.4042, 2024-02-23 08:49:49+00:00, davehart@fips-22-04.davehart.net + Remove deprecated configure --with-arlib option. + Remove configure support for ISC UNIX ca. 1998. + Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files + to NTP_LIBNTP. + Move ENABLE_CMAC to ntp_openssl.m4, enabling sntp/tests CMAC unit tests. + Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS. + Eliminate [v]snprintf redefinition warnings on macOS. + Fix clang 14 cast increases alignment warning on Linux. + Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests. + Use NTP_HARD_CPPFLAGS in libopts tearoff. + + BitKeeper/etc/ignore@1.99 +2 -0 + added sntp/libevent/build-aux/test-driver + + BitKeeper/etc/ignore@1.98 +1 -0 + added html/.datecheck + + ChangeLog@1.2087 +12 -1 + Remove deprecated configure --with-arlib option. + Remove configure support for ISC UNIX ca. 1998. + Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files + to NTP_LIBNTP. + Move ENABLE_CMAC to ntp_openssl.m4, enabling sntp/tests CMAC unit tests. + Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS. + Eliminate [v]snprintf redefinition warnings on macOS. + Fix clang 14 cast increases alignment warning on Linux. + Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests. + Use NTP_HARD_CPPFLAGS in libopts tearoff. + + configure.ac@1.635 +2 -30 + Remove deprecated configure --with-arlib option. + Remove support for ISC UNIX ca. 1998. + Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files + to NTP_LIBNTP. + Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests. + + include/c99_snprintf.h@1.1 +28 -0 + Eliminate [v]snprintf redefinition warnings on macOS. + + include/c99_snprintf.h@1.0 +0 -0 + + libntp/ntp_intres.c@1.103 +0 -6 + Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS. + + ntpd/ntp_io.c@1.444 +3 -5 + Eliminate clang 14 cast increases alignment warning re: nlmsghdr. + + sntp/configure.ac@1.93 +1 -2 + Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files + to NTP_LIBNTP. + + sntp/libopts/Makefile.am@1.32 +1 -3 + Remove unneeded libopts_la_CPPFLAGS which prevented NTP_HARD_CPPFLAGS from being used. + Eliminate [v]snprintf redefinition warnings on macOS. + + sntp/m4/ntp_libntp.m4@1.42 +6 -66 + Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files + to NTP_LIBNTP. + Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS. + Eliminate [v]snprintf redefinition warnings on macOS. + + sntp/m4/ntp_openssl.m4@1.37 +12 -1 + Move ENABLE_CMAC to ntp_openssl.m4, enabling sntp/tests CMAC unit tests. + Fix ntp_openssl.m4 manual libcrypto search by clearing _cv_ var. + + sntp/tests/crypto.c@1.19 +20 -20 + Improve test ignore messages. + + sntp/tests/packetProcessing.c@1.20 +1 -1 + Improve test ignore messages. + + sntp/tests/run-packetProcessing.c@1.15 +19 -19 + Should have been regenerated last March, oops. + +ChangeSet@1.4040.1.1, 2024-02-18 01:31:23-08:00, harlan@ntp-testbuild.tal1.ntfo.org + Makefile.am: + distribute lsf-times.c in util/Makefile.am + lsf-times.c: + new file + run-refnumtoa.c, run-bug-2803.c: + Check in regenerated files + + tests/bug-2803/run-bug-2803.c@1.12 +1 -1 + Check in regenerated files + + tests/libntp/run-refnumtoa.c@1.12 +2 -2 + Check in regenerated files + + util/Makefile.am@1.85 +1 -0 + distribute lsf-times.c in util/Makefile.am + + util/lsf-times.c@1.1 +220 -0 + BitKeeper file util/lsf-times.c + + util/lsf-times.c@1.0 +0 -0 + +ChangeSet@1.4040, 2024-02-01 02:22:21-06:00, stenn@stenn.chi1.ntfo.org + Fix another extra */ + + libparse/ieee754io.c@1.15 +1 -1 + Fix another extra */ + +ChangeSet@1.4039, 2024-01-31 21:43:41-08:00, harlan@ntp-testbuild.tal1.ntfo.org + Remove an extra */ from libparse/ieee754io.c + + ChangeLog@1.2085 +1 -0 + Remove an extra */ from libparse/ieee754io.c + + libparse/ieee754io.c@1.14 +1 -1 + Remove an extra */ from libparse/ieee754io.c + +ChangeSet@1.4038, 2024-01-31 21:00:01-08:00, harlan@ntp-testbuild.tal1.ntfo.org + Fix .datecheck location in Makefile.am + + ChangeLog@1.2084 +1 -0 + Fix .datecheck location in Makefile.am + + Makefile.am@1.140 +1 -1 + Fix .datecheck location in Makefile.am + +ChangeSet@1.4036, 2024-01-31 20:47:13+00:00, davehart@tl.ntp.md + #ifdef out unused put_ieee754() which triggers a warning and appears buggy. + Insert newlines in long error messages in ntp_openssl.m4, ntp_crypto_rand.m4. + + libparse/ieee754io.c@1.13 +21 -2 + #ifdef out unused put_ieee754() which triggers a warning and appears buggy. + + sntp/m4/ntp_crypto_rand.m4@1.5 +10 -9 + Insert newlines in long error message. + + sntp/m4/ntp_openssl.m4@1.36 +20 -13 + Insert newlines in long error messages. + +ChangeSet@1.4035, 2024-01-30 09:00:44+00:00, davehart@tl.ntp.md + Avoid running checkHtmlFileDates script repeatedly when no html/*.html + files have changed. + Correct comment, clarify configure --help text re: --with-autokey. + Display KoD refid as text in recently added message. + Correct OpenSSL usage in Autokey code to avoid warnings about + discarding const qualifiers with OpenSSL 3. + Avoid clang warning "a function declaration without a prototype is + deprecated in all versions of C". + Abort configure if --enable-crypto-rand given & unavailable. + improve --help output for --enable-c99-snprintf. + Add configure --enable-verbose-ssl to trace SSL detection. + Silence warnings about dropping const qualifier by making a copy + of OpenSSL key data before modifying it in ntp-keygen. + Display KoD refid as text in recently added message. + Add build test coverage for --disable-saveconfig to flock-build script. + + ChangeLog@1.2082 +11 -2 + Display KoD refid as text in recently added message. + Correct OpenSSL usage in Autokey code to avoid warnings about + discarding const qualifiers with OpenSSL 3. + Avoid running checkHtmlFileDates script repeatedly when no html/*.html + + files have changed. + Add configure --enable-verbose-ssl to trace SSL detection. + Add build test coverage for --disable-saveconfig to flock-build script. + + Makefile.am@1.139 +1 -1 + Avoid running checkHtmlFileDates script repeatedly when no html/*.html + files have changed. + + configure.ac@1.634 +2 -2 + Correct comment, clarify configure --help text re: --with-autokey. + + flock-build@1.53 +2 -2 + Add build test coverage for --disable-saveconfig to flock-build script. + + libntp/numtoa.c@1.11 +37 -30 + Display KoD refid as text in recently added message. + + ntpd/ntp_crypto.c@1.193.1.2 +44 -28 + Correct OpenSSL usage in Autokey code to avoid warnings about + discarding const qualifiers with OpenSSL 3. + + ntpd/ntp_io.c@1.443 +1 -1 + Avoid clang warning "a function declaration without a prototype is + deprecated in all versions of C" + + ntpd/ntp_proto.c@1.454 +1 -1 + Display KoD refid as text in recently added message. + + ntpd/ntp_scanner.c@1.54 +3 -3 + Avoid clang warning "a function declaration without a prototype is + deprecated in all versions of C" + + ntpd/refclock_arc.c@1.35 +8 -5 + Quiet unused-but-set warning when building non-debug. + + scripts/build/checkHtmlFileDates@1.3 +18 -2 + Avoid running checkHtmlFileDates script repeatedly when no html/*.html + files have changed. + + sntp/m4/ntp_crypto_rand.m4@1.4 +29 -7 + Abort configure if --enable-crypto-rand given & unavailable. + + sntp/m4/ntp_libntp.m4@1.41 +4 -1 + improve --help output for --enable-c99-snprintf. + + sntp/m4/ntp_openssl.m4@1.35 +24 -11 + Add configure --enable-verbose-ssl to trace SSL detection. + + tests/libntp/calendar.c@1.19 +3 -3 + Avoid clang warning "a function declaration without a prototype is + deprecated in all versions of C" + + tests/libntp/clocktime.c@1.10 +2 -2 + Avoid clang warning "a function declaration without a prototype is + deprecated in all versions of C" + + tests/libntp/refnumtoa.c@1.8 +24 -26 + Display KoD refid as text in recently added message. + + util/ntp-keygen.c@1.113 +35 -20 + Silence warnings about dropping const qualifier by making a copy + of OpenSSL key data before modifying it. + +ChangeSet@1.4034, 2024-01-27 00:22:53+00:00, davehart@tl.ntp.md + [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe. + Suppress OpenSSL 3 deprecation warning clutter. + Fix problem with statisics files not being generated (broken after 4.2.8p17) + Remove unneeded 200ms wait during NT service shutdown. + Do not compile unneded bsd_strerror.c on Windows. + Reduce HAVE_IO_COMPLETION_PORT #ifdef clutter by moving calls + to io_completion_port_remove_socket into + close_and_delete_fd_from_list(). + Silence warnings building on macOS about incompatible types + for timeval.tv_usec. + Move massive config parser debug output from debug level 5 to 9. + Move yylex() debug output from level 4 to level 10. + Change overallocated 1k static lexeme buffer to 128 bytes. + + ChangeLog@1.2081 +3 -0 + [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe. + Suppress OpenSSL 3 deprecation warning clutter. + + include/ntpd.h@1.213 +2 -1 + Add eptoa() (endpoint to ascii) alternative name for latoa() + (local address to ascii). + + libntp/lib/isc/win32/strerror.c@1.18 +21 -14 + [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe. + + libntp/work_thread.c@1.29 +1 -1 + correct the correction + + ntpd/ntp_config.c@1.388 +9 -10 + Fix problem with statisics files not being generated (broken since 4.2.8p17) + Move massive config parser debug output from debug level 5 to 9. + Avoid "may be used uninitialized" warning re: match_type & action. + + ntpd/ntp_io.c@1.442 +30 -33 + Reduce HAVE_IO_COMPLETION_PORT #ifdef clutter by moving calls + to io_completion_port_remove_socket into + close_and_delete_fd_from_list(). + + ntpd/ntp_peer.c@1.170 +36 -14 + Use eptoa() iinstead of equivalent latoa() with endpt * + + ntpd/ntp_scanner.c@1.53 +10 -6 + Move yylex() debug output from level 4 to level 10. + Change overallocated 1k static lexeme buffer to 128 bytes. + + ports/winnt/include/ntp_iocpltypes.h@1.6 +1 -1 + comment only + + ports/winnt/ntpd/ntservice.c@1.35 +1 -3 + Do not shut down IO thread until after peers are removed to prevent + assertion unpeering a serial refclock. + Remove unneeded 200ms wait during service shutdown. + + ports/winnt/vs2015/libntp/libntp.vcxproj@1.12 +0 -1 + Do not compile unneded bsd_strerror.c on Windows + + ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.12 +0 -3 + Do not compile unneded bsd_strerror.c on Windows + + sntp/m4/ntp_openssl.m4@1.34 +9 -1 + Suppress OpenSSL 3 deprecation warning clutter. + Add missing -I in search for evp.h. + + tests/bug-2803/bug-2803.c@1.11 +4 -5 + Silence warnings building on macOS about incompatible types + for timeval.tv_usec. + + tests/libntp/timevalops.c@1.16 +3 -3 + Suppress OpenSSL 3 deprecation warning clutter. + +ChangeSet@1.4028.2.1, 2024-01-22 06:54:06+00:00, davehart@tl.ntp.md + [Bug 3901] LIB_GETBUF isn't thread-safe. + [Bug 3900] fast_xmit() selects wrong local addr responding to mcast on + Windows. + [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient creates + duplicate associations. + Remove useless pointer to Windows Help from system error messages. + Avoid newlines within Windows error messages. + Ensure unique association IDs if wrapped. + Write frequency file to 6 digits after decimal. + Unpeer on shutdown as long done on POSIX systems. + + Simplify calc_addr_distance(). + Clamp min/maxpoll in edge cases in newpeer(). + Quiet local addr change logginig when unpeering. + Correct missing arg for %s printf specifier in + send_blocking_resp_internal(). + + ChangeLog@1.2077.2.1 +13 -0 + [Bug 3901] LIB_GETBUF isn't thread-safe. + [Bug 3900] fast_xmit() selects wrong local addr responding to mcast on + Windows. + [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient creates + duplicate associations. + Remove useless pointer to Windows Help from system error messages. + Avoid newlines within Windows error messages. + Ensure unique association IDs if wrapped. + Simplify calc_addr_distance(). + Clamp min/maxpoll in edge cases in newpeer(). + Quiet local addr change logginig when unpeering. + Correct missing arg for %s printf specifier in + send_blocking_resp_internal(). + + include/lib_strbuf.h@1.13 +10 -15 + Minimize chances of LIB_STRBUF threading problems (more to come). + --- + [Bug 3901] LIB_GETBUF isn't thread-safe. + + include/ntp.h@1.236.1.3 +5 -0 + Quiet local addr change logginig when unpeering. + + libntp/lib/isc/win32/strerror.c@1.17 +30 -3 + Remove useless pointer to Windows Help from system error messages. + Avoid newlines within Windows error messages. + + libntp/lib_strbuf.c@1.13 +39 -15 + [Bug 3901] LIB_GETBUF isn't thread-safe. + + libntp/work_thread.c@1.28 +6 -2 + Correct missing arg for %s printf specifier in send_blocking_resp_internal. + + ntpd/ntp_io.c@1.438.1.3 +47 -50 + Simplify calc_addr_distance(). + + ntpd/ntp_peer.c@1.169 +97 -71 + [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient + creates duplicate associations. + Ensure unique association IDs even if we wrap 16 bits. + Never change interface for a link-local remote addreess. + Clamp min/maxpoll in edge cases in newpeer(). + Quiet local addr change logginig when unpeering. + + ntpd/ntp_proto.c@1.450.1.3 +20 -7 + [Bug 3900] fast_xmit() selects wrong local addr responding + to mcast on Windows. + --- + whoops + + ntpd/ntp_util.c@1.125.1.1 +5 -7 + Write frequency file to 6 digits after decimal. + + ntpq/ntpq-subs.c@1.135.1.1 +1 -1 + Remove no-op cast. + + ports/winnt/ntpd/ntservice.c@1.34 +1 -0 + Unpeer on shutdown as long done on POSIX systems. + +ChangeSet@1.4028.1.1, 2024-01-07 00:46:19-08:00, harlan@ntp-testbuild.tal1.ntfo.org + Makefile.am: + Added util/lsf-times + Many files: + Update copyright year to 2024 + + ChangeLog@1.2077.1.1 +2 -0 + Update copyright year to 2024 + + html/copyright.html@1.74 +2 -2 + Update copyright year to 2024 + + ntpd/invoke-ntp.conf.texi@1.228 +1 -1 + Update copyright year to 2024 + + ntpd/invoke-ntp.keys.texi@1.211 +1 -1 + Update copyright year to 2024 + + ntpd/invoke-ntpd.texi@1.525 +1 -1 + Update copyright year to 2024 + + ntpd/ntp.conf.5man@1.262 +3 -3 + Update copyright year to 2024 + + ntpd/ntp.conf.5mdoc@1.262 +3 -3 + Update copyright year to 2024 + + ntpd/ntp.conf.html@1.210 +817 -765 + Update copyright year to 2024 + + ntpd/ntp.conf.man.in@1.262 +3 -3 + Update copyright year to 2024 + + ntpd/ntp.conf.mdoc.in@1.262 +3 -3 + Update copyright year to 2024 + + ntpd/ntp.keys.5man@1.245 +3 -3 + Update copyright year to 2024 + + ntpd/ntp.keys.5mdoc@1.245 +4 -4 + Update copyright year to 2024 + + ntpd/ntp.keys.html@1.205 +97 -105 + Update copyright year to 2024 + + ntpd/ntp.keys.man.in@1.245 +3 -3 + Update copyright year to 2024 + + ntpd/ntp.keys.mdoc.in@1.245 +4 -4 + Update copyright year to 2024 + + ntpd/ntpd-opts.c@1.550 +4 -4 + Update copyright year to 2024 + + ntpd/ntpd-opts.h@1.549 +2 -2 + Update copyright year to 2024 + + ntpd/ntpd.1ntpdman@1.354 +3 -3 + Update copyright year to 2024 + + ntpd/ntpd.1ntpdmdoc@1.354 +3 -3 + Update copyright year to 2024 + + ntpd/ntpd.html@1.199 +427 -398 + Update copyright year to 2024 + + ntpd/ntpd.man.in@1.354 +3 -3 + Update copyright year to 2024 + + ntpd/ntpd.mdoc.in@1.354 +3 -3 + Update copyright year to 2024 + + ntpdc/invoke-ntpdc.texi@1.524 +1 -1 + Update copyright year to 2024 + + ntpdc/ntpdc-opts.c@1.545 +4 -4 + Update copyright year to 2024 + + ntpdc/ntpdc-opts.h@1.544 +2 -2 + Update copyright year to 2024 + + ntpdc/ntpdc.1ntpdcman@1.355 +3 -3 + Update copyright year to 2024 + + ntpdc/ntpdc.1ntpdcmdoc@1.355 +3 -3 + Update copyright year to 2024 + + ntpdc/ntpdc.html@1.369 +215 -209 + Update copyright year to 2024 + + ntpdc/ntpdc.man.in@1.355 +3 -3 + Update copyright year to 2024 + + ntpdc/ntpdc.mdoc.in@1.355 +3 -3 + Update copyright year to 2024 + + ntpq/invoke-ntpq.texi@1.534 +1 -1 + Update copyright year to 2024 + + ntpq/ntpq-opts.c@1.554 +4 -4 + Update copyright year to 2024 + + ntpq/ntpq-opts.h@1.552 +2 -2 + Update copyright year to 2024 + + ntpq/ntpq.1ntpqman@1.362 +3 -3 + Update copyright year to 2024 + + ntpq/ntpq.1ntpqmdoc@1.362 +3 -3 + Update copyright year to 2024 + + ntpq/ntpq.html@1.199 +813 -815 + Update copyright year to 2024 + + ntpq/ntpq.man.in@1.362 +3 -3 + Update copyright year to 2024 + + ntpq/ntpq.mdoc.in@1.362 +3 -3 + Update copyright year to 2024 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.524 +2 -2 + Update copyright year to 2024 + + ntpsnmpd/ntpsnmpd-opts.c@1.545 +4 -4 + Update copyright year to 2024 + + ntpsnmpd/ntpsnmpd-opts.h@1.544 +2 -2 + Update copyright year to 2024 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.353 +3 -3 + Update copyright year to 2024 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.353 +3 -3 + Update copyright year to 2024 + + ntpsnmpd/ntpsnmpd.html@1.191 +39 -52 + Update copyright year to 2024 + + ntpsnmpd/ntpsnmpd.man.in@1.353 +3 -3 + Update copyright year to 2024 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.353 +3 -3 + Update copyright year to 2024 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.114 +2 -2 + Update copyright year to 2024 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.116 +2 -2 + Update copyright year to 2024 + + scripts/calc_tickadj/calc_tickadj.html@1.115 +50 -29 + Update copyright year to 2024 + + scripts/calc_tickadj/calc_tickadj.man.in@1.113 +2 -2 + Update copyright year to 2024 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.116 +2 -2 + Update copyright year to 2024 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.118 +1 -1 + Update copyright year to 2024 + + scripts/invoke-plot_summary.texi@1.136 +1 -1 + Update copyright year to 2024 + + scripts/invoke-summary.texi@1.135 +1 -1 + Update copyright year to 2024 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.347 +1 -1 + Update copyright year to 2024 + + scripts/ntp-wait/ntp-wait-opts@1.83 +1 -1 + Update copyright year to 2024 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.342 +2 -2 + Update copyright year to 2024 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.344 +2 -2 + Update copyright year to 2024 + + scripts/ntp-wait/ntp-wait.html@1.363 +93 -109 + Update copyright year to 2024 + + scripts/ntp-wait/ntp-wait.man.in@1.342 +2 -2 + Update copyright year to 2024 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.344 +2 -2 + Update copyright year to 2024 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.133 +1 -1 + Update copyright year to 2024 + + scripts/ntpsweep/ntpsweep-opts@1.86 +1 -1 + Update copyright year to 2024 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.121 +2 -2 + Update copyright year to 2024 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.121 +2 -2 + Update copyright year to 2024 + + scripts/ntpsweep/ntpsweep.html@1.135 +63 -37 + Update copyright year to 2024 + + scripts/ntpsweep/ntpsweep.man.in@1.121 +2 -2 + Update copyright year to 2024 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.122 +2 -2 + Update copyright year to 2024 + + scripts/ntptrace/invoke-ntptrace.texi@1.136 +1 -1 + Update copyright year to 2024 + + scripts/ntptrace/ntptrace-opts@1.86 +1 -1 + Update copyright year to 2024 + + scripts/ntptrace/ntptrace.1ntptraceman@1.121 +2 -2 + Update copyright year to 2024 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.123 +2 -2 + Update copyright year to 2024 + + scripts/ntptrace/ntptrace.html@1.136 +81 -96 + Update copyright year to 2024 + + scripts/ntptrace/ntptrace.man.in@1.121 +2 -2 + Update copyright year to 2024 + + scripts/ntptrace/ntptrace.mdoc.in@1.124 +2 -2 + Update copyright year to 2024 + + scripts/plot_summary-opts@1.87 +1 -1 + Update copyright year to 2024 + + scripts/plot_summary.1plot_summaryman@1.134 +2 -2 + Update copyright year to 2024 + + scripts/plot_summary.1plot_summarymdoc@1.134 +2 -2 + Update copyright year to 2024 + + scripts/plot_summary.html@1.138 +71 -44 + Update copyright year to 2024 + + scripts/plot_summary.man.in@1.134 +2 -2 + Update copyright year to 2024 + + scripts/plot_summary.mdoc.in@1.134 +2 -2 + Update copyright year to 2024 + + scripts/summary-opts@1.86 +1 -1 + Update copyright year to 2024 + + scripts/summary.1summaryman@1.133 +2 -2 + Update copyright year to 2024 + + scripts/summary.1summarymdoc@1.133 +2 -2 + Update copyright year to 2024 + + scripts/summary.html@1.137 +64 -39 + Update copyright year to 2024 + + scripts/summary.man.in@1.133 +2 -2 + Update copyright year to 2024 + + scripts/summary.mdoc.in@1.133 +2 -2 + Update copyright year to 2024 + + scripts/update-leap/invoke-update-leap.texi@1.34 +1 -1 + Update copyright year to 2024 + + scripts/update-leap/update-leap-opts@1.36 +1 -1 + Update copyright year to 2024 + + scripts/update-leap/update-leap.1update-leapman@1.34 +2 -2 + Update copyright year to 2024 + + scripts/update-leap/update-leap.1update-leapmdoc@1.35 +2 -2 + Update copyright year to 2024 + + scripts/update-leap/update-leap.html@1.34 +79 -47 + Update copyright year to 2024 + + scripts/update-leap/update-leap.man.in@1.34 +2 -2 + Update copyright year to 2024 + + scripts/update-leap/update-leap.mdoc.in@1.35 +2 -2 + Update copyright year to 2024 + + sntp/include/copyright.def@1.32 +1 -1 + Update copyright year to 2024 + + sntp/invoke-sntp.texi@1.524 +1 -1 + Update copyright year to 2024 + + sntp/sntp-opts.c@1.546 +4 -4 + Update copyright year to 2024 + + sntp/sntp-opts.h@1.544 +2 -2 + Update copyright year to 2024 + + sntp/sntp.1sntpman@1.359 +3 -3 + Update copyright year to 2024 + + sntp/sntp.1sntpmdoc@1.359 +3 -3 + Update copyright year to 2024 + + sntp/sntp.html@1.540 +267 -258 + Update copyright year to 2024 + + sntp/sntp.man.in@1.359 +3 -3 + Update copyright year to 2024 + + sntp/sntp.mdoc.in@1.359 +3 -3 + Update copyright year to 2024 + + util/Makefile.am@1.84 +2 -1 + Added util/lsf-times + + util/invoke-ntp-keygen.texi@1.527 +1 -1 + Update copyright year to 2024 + + util/ntp-keygen-opts.c@1.548 +4 -4 + Update copyright year to 2024 + + util/ntp-keygen-opts.h@1.546 +2 -2 + Update copyright year to 2024 + + util/ntp-keygen.1ntp-keygenman@1.355 +3 -3 + Update copyright year to 2024 + + util/ntp-keygen.1ntp-keygenmdoc@1.355 +3 -3 + Update copyright year to 2024 + + util/ntp-keygen.html@1.200 +652 -676 + Update copyright year to 2024 + + util/ntp-keygen.man.in@1.355 +3 -3 + Update copyright year to 2024 + + util/ntp-keygen.mdoc.in@1.355 +3 -3 + Update copyright year to 2024 + +ChangeSet@1.4032, 2024-01-05 08:09:43+00:00, davehart@tl.ntp.md + Fix build failure with forking worker. + + ntpd/ntpd.c@1.190.1.4 +1 -1 + Fix simulator build. + +ChangeSet@1.4029.1.1, 2024-01-04 10:33:34+00:00, davehart@tl.ntp.md + Further changes to ensure ntp_openssl.m4 does the right thing on systems + where no extra flags are needed to use OpenSSL. + Do not disable periodic network interface scans if we are abot + to get notifications from Windows, as some systems are observed + to get those notifications very late. + Update NEWS to note change to require --without-crypto or error out of configure. + + NEWS@1.220 +11 -0 + Note change to require --without-crypto or error out of configure. + + configure.ac@1.633 +1 -1 + Force config.cache flush + + ports/winnt/ntpd/ntp_iocompletionport.c@1.87 +2 -1 + Do not disable periodic network interface scans if we are able + to get notifications from Windows, as some systems are observed + to get those notifications very late. + + sntp/configure.ac@1.92 +1 -1 + Force config.cache flush + + sntp/m4/ntp_openssl.m4@1.33 +215 -137 + Further changes to ensure ntp_openssl.m4 does the right thing on systems + where no extra flags are needed to use OpenSSL. + Avoid silent downgrade to crypto-free build, error unless --without-crypto. + +ChangeSet@1.4026.2.1, 2023-10-30 04:31:05+00:00, davehart@tl.ntp.md + [Bug 3847] SSL detection in configure should run-test if runpath is needed. + Use @configure_input@ in various *.in files to include a comment that + the file is generated from another pointing to the *.in. + Correct underquoting, indents in ntp_facilitynames.m4. + Clean up a few warnings seen building with older gcc. + Fix build on older FreeBSD lacking sys/procctl.h. + Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix + that makes it unnecessary, re-enabling ASLR stack gap. + + ChangeLog@1.2075.2.1 +9 -0 + [Bug 3847] SSL detection in configure should run-test if runpath is needed. + Use @configure_input@ in various *.in files to include a comment that + the file is generated from another pointing to the *.in. + Correct underquoting, indents in ntp_facilitynames.m4. + Clean up a few warnings seen building with older gcc. + Fix build on older FreeBSD lacking sys/procctl.h. + Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix + that makes it unnecessary, re-enabling ASLR stack gap. + + check-libntp.mf@1.4 +4 -1 + Skip libntp submakes with --disable-dependency-tracking to save time + for one-off builds. + + configure.ac@1.630.1.1 +7 -10 + Use AC_MSG_FAILURE for internal error, which refers user to config.log. + Bump configure cache version with ntp_openssl.m4 changes, s/b unneeded. + Remove unneded AC_SUBST of CFLAGS & LDFLAGS. + Fix build on older FreeBSD lacking sys/procctl.h. + + libntp/ntp_realpath.c@1.3 +22 -21 + Remove warning for shadowing 'symlink'. + Enforce NTP_MAXSYMLINKS correctly. + + libntp/timexsup.c@1.4 +18 -4 + Fix build on FreeBSD 7 and other ancient systems by following the + pattern used elsewhere in our source for including time.h and timex.h. + + libparse/Makefile.am@1.36 +5 -10 + Use silent rules, $(SED) from Autoconf. + + ntpd/complete.conf.in@1.38.1.1 +11 -11 + Use RFC 5737 IPv4 documentation prefixes, more exemplary pool hostnames, + remove reference to long-gone freenet6.net. + + ntpd/ntp_config.c@1.385.1.1 +20 -16 + Clean up warning for shadowing 'poll' by renaming attrtopsl() arg + from poll to log2_poll. + + ntpd/ntp_util.c@1.124.1.1 +2 -2 + Uninit FILE *fp, missing %s arg. + Add missing arg to statsdir too long msyslog(). + + ntpd/ntpd.c@1.190.2.1 +28 -26 + Remove warning about shadowing "pipe" in detach_from_terminal(). + Fix build on older FreeBSD lacking sys/procctl.h. + Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix + that makes it unnecessary, re-enabling ASLR stack gap. + + ntpdc/nl.pl.in@1.10 +1 -0 + Add @configure_input@ comment + + ntpq/ntpq-subs.c@1.136 +2 -2 + Correct comment, indent. + + ntpsnmpd/Makefile.am@1.46 +1 -1 + Be sure the OpenSSL includes we're using come before any we get + from SNMP configuration. + + scripts/build/genAuthors.in@1.3 +1 -0 + Add @configure_input@ comment + + scripts/build/mkver.in@1.17 +2 -0 + Add @configure_input@ comment + + scripts/calc_tickadj/calc_tickadj.in@1.5 +1 -0 + Add @configure_input@ comment + + scripts/ntp-wait/ntp-wait.in@1.13 +1 -0 + Add @configure_input@ comment + + scripts/ntpsweep/ntpsweep.in@1.10 +1 -0 + Add @configure_input@ comment + + scripts/ntptrace/ntptrace.in@1.13 +1 -0 + Add @configure_input@ comment + + scripts/ntpver.in@1.4 +2 -1 + Add @configure_input@ comment. + Use equivalent "version" system variable instead of "daemon_version" + + scripts/plot_summary.in@1.4 +1 -0 + Add @configure_input@ comment + + scripts/summary.in@1.4 +1 -0 + Add @configure_input@ comment + + scripts/update-leap/update-leap.in@1.7 +1 -0 + Add @configure_input@ comment + + sntp/Makefile.am@1.95 +1 -2 + Fix syntax error "; unexpected" when --enable-local-libevent + is needed for "make dist" + + sntp/check-libntp.mf@1.7 +5 -1 + Skip libntp submakes with --disable-dependency-tracking to save time + for one-off builds. + + sntp/configure.ac@1.91 +1 -1 + Bump configure cache version, s/b unneeded + + sntp/libevent/kqueue.c@1.9 +1 -1 + Fix libevent build on older FreeBSD lacking ENOTCAPABLE. + + sntp/m4/ntp_facilitynames.m4@1.2 +20 -13 + Correct underquoting, indents. + No need to check for cross-compiling when we're not running the result. + + sntp/m4/ntp_libntp.m4@1.40 +9 -3 + Skip libntp submakes with --disable-dependency-tracking to save time + for one-off builds. + Require AC_PROG_SED, we get it already but document use for $SED/$(SED) + + sntp/m4/ntp_openssl.m4@1.32 +323 -228 + [Bug 3847] SSL detection in configure should run-test if runpath is needed. + + sntp/tests/fileHandlingTest.h.in@1.16 +7 -1 + Add @configure_input@ comment + +ChangeSet@1.4026.1.1, 2023-09-30 05:35:01+00:00, davehart@tl.ntp.md + [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails. + Reported by Hans Mayer. Moved NONEMPTY_TRANSLATION_UNIT + declaration from ntp_types.h to config.h. + Use NONEMPTY_COMPILATION_UNIT in more conditionally-compiled files. + + ChangeLog@1.2075.1.1 +4 -0 + [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails. + Reported by Hans Mayer. Moved NONEMPTY_TRANSLATION_UNIT + declaration from ntp_types.h to config.h. + + configure.ac@1.631 +12 -0 + Move NONEMPTY_TRANSLATION_UNIT declaration from ntp_types.h to config.h. + + include/ntp_types.h@1.40 +0 -10 + Move NONEMPTY_TRANSLATION_UNIT declaration from ntp_types.h to config.h. + + libntp/adjtime.c@1.9 +1 -1 + Lose unused global + + libntp/audio.c@1.39 +1 -1 + Lose unused global + + libntp/bsd_strerror.c@1.7 +1 -1 + Lose unused global + + libntp/snprintf.c@1.14 +1 -1 + Lose unused global + + libparse/clk_computime.c@1.14 +1 -1 + Lose unused global + + libparse/clk_dcf7000.c@1.14 +1 -1 + Lose unused global + + libparse/clk_meinberg.c@1.17 +1 -1 + Lose unused global + + libparse/clk_rawdcf.c@1.25 +1 -1 + Lose unused global + + libparse/clk_rcc8000.c@1.13 +1 -1 + Lose unused global + + libparse/clk_schmid.c@1.16 +1 -1 + Lose unused global + + libparse/clk_sel240x.c@1.5 +1 -1 + Lose unused global + + libparse/clk_trimtaip.c@1.14 +1 -1 + Lose unused global + + libparse/clk_trimtsip.c@1.16 +1 -1 + Lose unused global + + libparse/clk_varitext.c@1.13 +1 -1 + Lose unused global + + libparse/parse.c@1.22 +1 -1 + Lose unused global + + libparse/parse_conf.c@1.12 +1 -1 + Lose unused global + + ntpd/ntp_crypto.c@1.193.1.1 +1 -1 + Lose unused global + + ntpd/refclock_acts.c@1.57 +1 -1 + Lose unused global + + ntpd/refclock_arbiter.c@1.23 +1 -1 + Lose unused global + + ntpd/refclock_as2201.c@1.19 +1 -1 + Lose unused global + + ntpd/refclock_atom.c@1.63 +1 -1 + Lose unused global + + ntpd/refclock_bancomm.c@1.18 +1 -1 + Lose unused global + + ntpd/refclock_chronolog.c@1.14 +1 -1 + Lose unused global + + ntpd/refclock_conf.c@1.36 +1 -1 + Lose unused global + + ntpd/refclock_dumbclock.c@1.21 +1 -1 + Lose unused global + + ntpd/refclock_fg.c@1.18 +1 -1 + Lose unused global + + ntpd/refclock_gpsvme.c@1.11 +1 -1 + Lose unused global + + ntpd/refclock_heath.c@1.22 +1 -1 + Lose unused global + + ntpd/refclock_hopfpci.c@1.15 +1 -1 + Lose unused global + + ntpd/refclock_hopfser.c@1.20 +1 -1 + Lose unused global + + ntpd/refclock_hpgps.c@1.19 +1 -1 + Lose unused global + + ntpd/refclock_irig.c@1.38 +1 -1 + Lose unused global + + ntpd/refclock_jjy.c@1.39 +1 -1 + Lose unused global + + ntpd/refclock_jupiter.c@1.36 +1 -1 + Lose unused global + + ntpd/refclock_local.c@1.23 +1 -1 + Lose unused global + + ntpd/refclock_mx4200.c@1.33 +1 -1 + Lose unused global + + ntpd/refclock_neoclock4x.c@1.25 +1 -1 + Lose unused global + + ntpd/refclock_oncore.c@1.109 +1 -1 + Lose unused global + + ntpd/refclock_palisade.c@1.52 +1 -1 + Lose unused global + + ntpd/refclock_pcf.c@1.14 +1 -1 + Lose unused global + + ntpd/refclock_pst.c@1.15 +1 -1 + Lose unused global + + ntpd/refclock_ripencc.c@1.20 +1 -1 + Lose unused global + + ntpd/refclock_tpro.c@1.15 +1 -1 + Lose unused global + + ntpd/refclock_true.c@1.29 +1 -1 + Lose unused global + + ntpd/refclock_tsyncpci.c@1.11 +1 -1 + Lose unused global + + ntpd/refclock_tt560.c@1.5 +1 -1 + Lose unused global + + ntpd/refclock_ulink.c@1.21 +1 -1 + Lose unused global + + ntpd/refclock_wwv.c@1.81 +1 -1 + Lose unused global + + ntpd/refclock_wwvb.c@1.37 +1 -1 + Lose unused global + + ntpd/refclock_zyfer.c@1.13 +1 -1 + Lose unused global + + ntpsnmpd/netsnmp_daemonize.c@1.7 +1 -1 + Lose unused global + + ports/winnt/include/config.h@1.121 +10 -0 + Move NONEMPTY_TRANSLATION_UNIT declaration from ntp_types.h to config.h. + + ports/winnt/vs2015/libntp/libntp.vcxproj@1.11 +1 -0 + Add bsd_strerror.c ref + + ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.11 +3 -0 + Add bsd_strerror.c ref + + ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.12 +2 -1 + Add clk_sel240x.c under Parse Lib + + ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.9 +5 -7 + Add clk_sel240x.c under Parse Lib + +ChangeSet@1.4027, 2023-09-30 03:53:06+00:00, davehart@tl.ntp.md + [Bug 3872] Ignore restrict mask for hostname. + [Bug 3868] Cannot restrict a pool peer. + [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict. + Correct handling of not-found or unreadable or corrupt driftfile + to match comments by starting protocol engine in FREQ mode. + Add missing printf-style arg in ntp_util.c. + Update ntp.conf documentation to add "delrestrict" and correct + information about KoD rate limiting. + + ChangeLog@1.2076 +6 -0 + [Bug 3872] Ignore restrict mask for hostname. + [Bug 3868] Cannot restrict a pool peer. + [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict. + Update ntp.conf documentation to add "delrestrict" and correct + information about KoD rate limiting. + + include/ntp.h@1.236.1.2 +6 -7 + Rearrange restrict_u members for better packing. + Change restrict_u.expire from u_long to u_int32. 136 years is plenty of range. + Lose RES_FLAGS as the single place it was used has gone away. + + include/ntp_config.h@1.92 +9 -4 + [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict. + Expand restrict_node in syntax tree to allow delrestrict in ntp.conf + and preserve column along with line for error reporting. + + include/ntpd.h@1.212 +6 -5 + Indicate success with hack_restrict() return value. + + include/vint64ops.h@1.4 +1 -1 + Eliminate strtouv64() const warning mess by following strtol() model. + + libntp/vint64ops.c@1.4 +11 -10 + Eliminate strtouv64() const warning mess by following strtol() model. + + ntpd/complete.conf.in@1.39 +16 -11 + Add delrestrict lines interspersed with restrict lines. + Remove "ippeerlimit -1" entries as that is the default and saveconfig now omits it. + Remove all-ones masks as saveconfig now omits them. + Live up to the complete.conf name by referencing all the restrict bits. + Use doc-reserved IP prefixes. + + ntpd/invoke-ntp.conf.texi@1.227 +40 -25 + Autogen + + ntpd/keyword-gen-utd@1.37 +1 -1 + keyword-gen.c output + + ntpd/keyword-gen.c@1.45 +1 -0 + Add "delrestrict" + + ntpd/ntp.conf.5man@1.261 +42 -26 + Autogen + + ntpd/ntp.conf.5mdoc@1.261 +45 -26 + Autogen + + ntpd/ntp.conf.def@1.38 +43 -24 + Update ntp.conf doocumentation to reflect the addition of "delrestrict", + change references to "dotted-quad" addresses to "numeric" to generalize + for IPv6 as well, and correct the information about KoD rate limiting. + + ntpd/ntp.conf.html@1.209 +40 -24 + Autogen + + ntpd/ntp.conf.man.in@1.261 +42 -26 + Autogen + + ntpd/ntp.conf.mdoc.in@1.261 +45 -26 + Autogen + + ntpd/ntp_config.c@1.386 +151 -77 + omit "ipperlimit -1" which is default from restrict saveconfig. + Provide column in restrict error messages. + Report hack_restrict() failures. + Ignore restriction mask when address comes from hostname. + normal_dtoa(): don't use strlcpy() for overlapping buffers, undefined behavior. + + ntpd/ntp_io.c@1.438.1.2 +20 -5 + Make local address deletion message match addition message. + Report hack_restrict() failures. + + ntpd/ntp_keyword.h@1.41 +1044 -1034 + keyword-gen.c output + + ntpd/ntp_leapsec.c@1.27 +1 -1 + Correct misleading indent + + ntpd/ntp_monitor.c@1.47 +11 -10 + Use braces consistently, correct KoD rate-limiting comment. + + ntpd/ntp_parser.c@1.121 +1593 -1546 + bison ntp_parser.y + + ntpd/ntp_parser.h@1.82 +371 -369 + bison ntp_parser.y + + ntpd/ntp_parser.y@1.109 +50 -21 + Add "delrestrict" support. + Reduce code duplication by factoring out restrict mask parsing. + Correct out of bounds ippeerlimit line/col reporting. + + ntpd/ntp_peer.c@1.168 +2 -2 + Use TRUE/FALSE for restrict_source() remove argument. + + ntpd/ntp_proto.c@1.450.1.2 +6 -12 + Always add restrict source entry before soliciting pool server. + + ntpd/ntp_request.c@1.134 +12 -3 + report hack_restrict() failures. + + ntpd/ntp_restrict.c@1.50 +185 -143 + Sort RESM_SOURCE entries after others so static entries have precedence, + allowing runtime-added pool IP restrictions to be effective (Bug 3868]. + Check for failure of hack_restrict() operations. + #ifdef DEBUG dump_restricts() code which was dead code in release builds. + Do not assume the first member of struct in_addr is s_addr. + + ntpd/ntp_util.c@1.125 +9 -8 + Correct handling of not-found or unreadable or corrupt driftfile + to match comments by starting protocol engine in FREQ mode. + Add missing printf-style arg. + + ntpd/ntpd.c@1.190.1.2 +2 -2 + Typo broke Linux build. + + tests/libntp/vi64ops.c@1.8 +6 -6 + Eliminate strtouv64() const warning mess by following strtol() model. + +ChangeSet@1.4026, 2023-09-05 20:40:34+00:00, davehart@tl.ntp.md + [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs. + Correct ntp.conf docs burst packet count from 8 to 6. + + ChangeLog@1.2075 +2 -0 + [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs. + + html/release.html@1.44 +1 -1 + typo + + ntpd/invoke-ntp.conf.texi@1.226 +6 -30 + Autogen + + ntpd/ntp.conf.5man@1.260 +7 -33 + Autogen + + ntpd/ntp.conf.5mdoc@1.260 +6 -31 + Autogen + + ntpd/ntp.conf.def@1.37 +4 -29 + Remove long-gone "calldelay" & "crypto sign" from docs. + Correct burst packet count from 8 to 6. + + ntpd/ntp.conf.html@1.208 +5 -31 + Autogen + + ntpd/ntp.conf.man.in@1.260 +7 -33 + Autogen + + ntpd/ntp.conf.mdoc.in@1.260 +6 -31 + Autogen + +ChangeSet@1.4020.3.1, 2023-08-28 19:23:24+00:00, davehart@tl.davehart.net + [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. + Update CommitLog build rule for bk 7.x repo format. + Provide ntpd thread names to debugger on Windows. + Remove dead code libntp/numtohost.c and its unit tests. + Remove class A, B, C IPv4 distinctions in netof(). + + BitKeeper/deleted/88/run-test-numtohost.c~5477248c1ca0a276@1.14 +0 -0 + Rename: tests/libntp/run-numtohost.c -> BitKeeper/deleted/88/run-test-numtohost.c~5477248c1ca0a276 + + BitKeeper/deleted/9d/numtohost.c~3e480692@1.7 +0 -0 + Rename: libntp/numtohost.c -> BitKeeper/deleted/9d/numtohost.c~3e480692 + + BitKeeper/deleted/d4/numtohost.c~11c5a6cbd0341da7@1.8 +0 -0 + Rename: tests/libntp/numtohost.c -> BitKeeper/deleted/d4/numtohost.c~11c5a6cbd0341da7 + + ChangeLog@1.2069.3.1 +4 -0 + [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. + Provide ntpd thread names to debugger on Windows. + Remove dead code libntp/numtohost.c and its unit tests. + Remove class A, B, C IPv4 distinctions in netof(). + + Makefile.am@1.138 +1 -1 + Update CommitLog build rule for bk 7.x repo format. + + include/ntp.h@1.236.1.1 +12 -9 + Remove unused restrict_u member. + Move/rename bitflag dumpers for interface and restriction flags, + build_iflags() -> iflags_str() + build_mflags() -> mflags_str() + build_rflags() -> rflags_str() + + include/ntp_net.h@1.12.1.1 +5 -0 + Add IS_LOOPBACK_ADDR() macro. + + include/ntp_psl.h@1.2 +7 -4 + Use u_int32 for psl entries to save a few bytes on 64-bit systems. + + include/ntp_stdlib.h@1.91.1.1 +2 -2 + Include lib_strbuf.h from ntp_stdlib.h, remove many #includes. + + include/ntpd.h@1.211 +51 -12 + Rename globals for network addr rescans while changing use a bit. + interface_interval -> endpt_scan_period + interface_timer -> endpt_scan_timer + disable_dynamic_updates -> scan_addrs_once & no_periodic_scan + Move/rename bitflag dumpers for interface and restriction flags, + build_iflags() -> iflags_str() + build_mflags() -> mflags_str() + build_rflags() -> rflags_str() + Make the bigflag dumpers #ifdef DEBUG + + libntp/Makefile.am@1.87 +0 -1 + Remove dead code libntp/numtohost.c + + libntp/clocktypes.c@1.22 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/dofptoa.c@1.11 +0 -2 + Remove #include now in ntp_stdlib.h + + libntp/dolfptoa.c@1.14 +0 -2 + Remove #include now in ntp_stdlib.h + + libntp/humandate.c@1.13 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/lib_strbuf.c@1.10.1.1 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/machines.c@1.26.1.1 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/modetoa.c@1.7 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/netof.c@1.10 +11 -13 + IPv4 class A, B, C distinctions are now meaningless. + + libntp/ntp_calendar.c@1.27 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/numtoa.c@1.8.1.1 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/prettydate.c@1.22 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/refnumtoa.c@1.13 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/socktoa.c@1.20 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/socktohost.c@1.17 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/statestr.c@1.32 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/systime.c@1.79 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/uglydate.c@1.6 +0 -1 + Remove #include now in ntp_stdlib.h + + libntp/work_thread.c@1.27 +6 -3 + Provide thread name to debugger. + Correct comment. + + libparse/ieee754io.c@1.12 +0 -2 + Remove #include now in ntp_stdlib.h + + ntpd/cmd_args.c@1.65 +7 -9 + interface_interval -> endpt_scan_period + + ntpd/keyword-gen.c@1.44 +0 -1 + Remove #include now in ntp_stdlib.h + + ntpd/ntp_config.c@1.385 +69 -339 + Don't trigger addr rescan from config_nic_rules() during + initialization or if we've dropped privileges. + Make some internal error checks DEBUG-only. + Rename bitflag to string functions: + build_iflags() -> iflags_str() + build_mflags() -> mflags_str() + build_rflags() -> rflags_str() + Move iflags_str() to ntp_io.c, the other two to ntp_restrict.c + Rename appendstr() -> append_flagstr() and move to ntp_util.c + Check for not enough space in append_flagstr(). + Remove 3k of static string buffers in favor of LIB_GETBUF(). + + ntpd/ntp_control.c@1.242 +0 -1 + Remove #include now in ntp_stdlib.h + + ntpd/ntp_io.c@1.438.1.1 +117 -82 + Rescan net addrs when notified by Windows of a change. + Remove redundant comment + Remove #ifdef around init_io_completion_port() call + Change default net addr scan interval 300->301 to shift the scans from minute synchrony. + Reduce code duplication re: link/site local address classification. + Move/rename bitflag dumpers for interface flags: + build_iflags() -> iflags_str() + + ntpd/ntp_leapsec.c@1.26 +31 -49 + Remove #includes in ntp_stdlib.h + + ntpd/ntp_parser.c@1.120 +396 -420 + generated from ntp_parser.y + + ntpd/ntp_parser.h@1.81 +8 -6 + generated from ntp_parser.y + + ntpd/ntp_parser.y@1.108 +6 -1 + Use NTP_MINPOLL/NTP_MAXPOLL instead of hard-coding. + + ntpd/ntp_peer.c@1.167 +6 -4 + Do not log endpt changes for multicast addresses, they're + meaningless as we send from a list of endpoints (addresses). + + ntpd/ntp_proto.c@1.449.1.1 +57 -61 + Debug output improvements. + Display offset, delay, jitter to 9 decimal places in debug output. + Use mprintf_event() in a few places rather than snprintf + report_event. + Move/rename bitflag dumpers for interface and restriction flags, + build_iflags() -> iflags_str() + build_mflags() -> mflags_str() + build_rflags() -> rflags_str() + Use "0x%x" instead of "%#010x" displaying l_fp seconds as the + latter doesnn't work with Microsoft C. + + ntpd/ntp_restrict.c@1.49 +264 -157 + inline inc_/dec_res_limited() + Make some unlikely assertions DEBUG-only. + Remove voluminous debug output from match_restrict4_addr(). + Rename roptoa() -> resoop_str(). + Display flag bit names in hack_restrict() debug output. + Move/rename bitflag dumpers for restriction rflags, mflags. + build_mflags() -> mflags_str() + build_rflags() -> rflags_str() + The two above were moved from ntp_config.c and modified to use LIB_STRBUF(). + + ntpd/ntp_timer.c@1.99.1.1 +35 -36 + Rescan interfaces when notified by Windows of a change. + Remove interface_timer and interface_interval variables implementing + network interface periodic scans. + Replace those variables with endpt_scan_timer and endpt_scan_period + which are implemented slightly differently to enable on-change scans + on Windows with periodic re-scans suppressed. + Split disable_dynamic_updates into two variables: + no_periodic_scans + scan_addrs_once + + ntpd/ntp_util.c@1.124 +127 -107 + Remove #include now in ntp_stdlib.h + + ntpd/ntpd.c@1.190.1.1 +10 -18 + Split disable_dynamic_updates into two variables: + no_periodic_scans + scan_addrs_once + Remove interface_timer and interface_interval variables implementing + network interface periodic scans. + Replace those variables with endpt_scan_timer and endpt_scan_period + which are implemented slightly differently to enable on-change scans + on Windows with periodic re-scans suppressed. + + ntpd/refclock_nmea.c@1.85 +2 -0 + Eliminate unused func field_length() warning. + + ntpq/ntpq.c@1.199 +0 -4 + Remove #includes in ntpq.h + + ntpq/ntpq.h@1.34 +0 -1 + Remove #include now in ntp_stdlib.h + + ports/winnt/include/clockstuff.h@1.14 +6 -0 + Provide thread names to debugger. + + ports/winnt/include/config.h@1.120 +17 -13 + Update list of known _MSC_VER values + + ports/winnt/include/ntp_iocompletionport.h@1.24 +30 -5 + Use NotifyIpInterfaceChange on Windows Vista and newer. + + ports/winnt/include/ntservice.h@1.7 +0 -1 + Remove dead function declaration. + + ports/winnt/include/win32_io.h@1.3 +2 -2 + whitespace + + ports/winnt/instsrv/instsrv.c@1.13 +1 -1 + Correct app name + + ports/winnt/libntp/getclock.c@1.6 +7 -0 + Provide thread names to debugger. + + ports/winnt/libntp/syslog.c@1.12 +0 -56 + Remove long-dead code. + + ports/winnt/libntp/win32_io.c@1.4 +13 -9 + Bail out of InitSockets() when called more than once. + + ports/winnt/ntpd/hopf_PCI_io.c@1.10 +11 -28 + ntpd has never been able to run on Win32s (Win 3.1), remove check. + + ports/winnt/ntpd/nt_clockstuff.c@1.68 +18 -44 + Provide thread names to debugger. + Update my email address. + Remove code for unsupported pre-VS 2008 compiler. + Use Windows version number already discovered by libisc. + + ports/winnt/ntpd/nt_ppsimpl.c@1.7 +0 -1 + Remove #include now in ntp_stdlib.h + + ports/winnt/ntpd/ntp_iocompletionport.c@1.86 +125 -68 + Rescan net addrs when notified by Windows of a change. + Provide thread names to debugger. + Use Windows version number already discovered by libisc. + + ports/winnt/ntpd/ntservice.c@1.33 +10 -13 + Return immediately from service control handler when asked + to stop rather than sleeping for 100ms after signaling + the main thread to exit(). + + ports/winnt/vs2005/libntp.vcproj@1.31 +0 -4 + Remove dead code libntp/numtohost.c + + ports/winnt/vs2008/libntp/libntp.vcproj@1.62 +0 -4 + Remove dead code libntp/numtohost.c + + ports/winnt/vs2013/libntp/libntp.vcxproj@1.18 +0 -1 + Remove dead code libntp/numtohost.c + + ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.16 +0 -3 + Remove dead code libntp/numtohost.c + + ports/winnt/vs2015/libntp/libntp.vcxproj@1.10 +0 -1 + Remove dead code libntp/numtohost.c + + ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.10 +0 -3 + Remove dead code libntp/numtohost.c + + sntp/tests/crypto.c@1.16.1.1 +0 -6 + Remove unused locals in test_VerifyCMAC() + + sntp/utilities.h@1.12 +0 -1 + Remove #include now in ntp_stdlib.h + + tests/libntp/Makefile.am@1.105 +0 -12 + Remove tests for dead code libntp/numtohost.c + + tests/libntp/caljulian.c@1.16 +0 -1 + Remove #include now in ntp_stdlib.h + + tests/libntp/netof.c@1.11 +0 -33 + IPv4 class A, B, C distinctions are now meaningless. + + tests/libntp/run-caljulian.c@1.17 +4 -5 + generated + + tests/libntp/run-netof.c@1.11 +2 -6 + generated + + tests/ntpd/leapsec.c@1.6 +0 -1 + Remove #include now in ntp_stdlib.h + + tests/ntpd/run-leapsec.c@1.10 +33 -34 + generated + +ChangeSet@1.4023.2.1, 2023-08-24 14:06:05+00:00, davehart@tl.davehart.net + [Bug 3753] ntpd won't start with FIPS-enabled OpenSSL 3.x. + + ChangeLog@1.2072.2.1 +1 -0 + [Bug 3753] ntpd won't start with FIPS-enabled OpenSSL 3.x. + + include/ntp_md5.h@1.16 +3 -2 + Reduce use of magic numbers + + include/ntp_stdlib.h@1.93 +5 -3 + add arg names to func declarations + + libntp/a_md5encrypt.c@1.55.1.1 +79 -60 + [Bug 3753] ntpd won't start with FIPS-enabled OpenSSL 3.x. + + libntp/ssl_init.c@1.32 +21 -29 + Reduce code duplication. + + ntpd/ntp_crypto.c@1.194 +0 -1 + move ssl_check_version from autokey-specific code to ntpdmain() + + ntpd/ntpd.c@1.191 +5 -2 + Move ssl_check_version from autokey-specific code to ntpdmain(). + Put debug behavior msyslog on a single log line. + +ChangeSet@1.4023.1.1, 2023-08-23 10:58:43+00:00, davehart@tl.davehart.net + [Bug 3864] ntpd IPv6 refid different for big-endian and little-endian. + + ChangeLog@1.2072.1.1 +2 -0 + [Bug 3864] ntpd IPv6 refid different for big-endian and little-endian. + + include/ntp.h@1.237 +9 -0 + Track old-style IPv6 refid on big-endian systems + + libntp/a_md5encrypt.c@1.56 +14 -2 + [Bug 3864] Ensure refid calculation is endian-independent. + + ntpd/ntp_io.c@1.439 +5 -0 + Track old-style IPv6 refid on big-endian systems + + ntpd/ntp_proto.c@1.451 +26 -4 + Check both old- and new-style IPv6 refids on big-endian systems. + + tests/libntp/a_md5encrypt.c@1.19 +9 -18 + Enable IPv6 refid unit test that failed due to bug 3864. + +ChangeSet@1.4020.2.1, 2023-08-23 03:34:00+00:00, davehart@tl.davehart.net + [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid. + + ChangeLog@1.2069.2.1 +2 -0 + [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid. + + include/ntp_net.h@1.13 +6 -0 + LOOPBACKADR_N in network order + + libntp/numtoa.c@1.9 +15 -7 + Replace unprintable characters with ? instead of space. + Do not treat orphan refid 127.0.0.1 as text. + + ntpd/ntp_timer.c@1.100 +133 -127 + Change orphan mode s1 refid from LOOP to ORPH. + Clean up indents in leap second handling code. + +ChangeSet@1.4020.1.1, 2023-08-02 19:07:28+00:00, davehart@tl.davehart.net + [Bug 3856] Enable Edit & Continue debugging with Visual Studio. + + ChangeLog@1.2069.1.1 +2 -0 + [Bug 3856] Enable Edit & Continue debugging with Visual Studio. + + ports/winnt/vs2015/debug-x64.props@1.6 +10 -0 + Enable Edit & Continue debugging + + ports/winnt/vs2015/debug.props@1.6 +11 -0 + Enable Edit & Continue debugging + +ChangeSet@1.4022, 2023-07-31 12:41:01+00:00, davehart@tl.davehart.net + [Bug 3853] Clean up warnings with modern compilers. + partial, more to come. + + ChangeLog@1.2071 +1 -0 + [Bug 3853] Clean up warnings with modern compilers. + partial, more to come. + + include/lib_strbuf.h@1.12 +16 -11 + Keep a pointer to each LIB_GETBUF buffer to avoid -Wrestrict warnings. + + include/ntp_stdlib.h@1.92 +1 -0 + Keep a pointer to each LIB_GETBUF buffer to avoid -Wrestrict warnings. + + include/ntp_tty.h@1.7 +5 -0 + Silence unused function warning. + Prepare for reuse of symBaud2numBaud() in Win32 code which has similar. + + libntp/lib_strbuf.c@1.11 +13 -7 + Keep a pointer to each LIB_GETBUF buffer to avoid -Wrestrict warnings. + + libntp/machines.c@1.27 +57 -3 + Prepare for reuse of symBaud2numBaud() in Win32 code which has similar. + + ntpd/ntp_proto.c@1.450 +1 -1 + Whitespace + + ntpd/ntp_refclock.c@1.131 +7 -51 + Silence unused function warning. + Prepare for reuse of symBaud2numBaud() in Win32 code which has similar. + + sntp/tests/crypto.c@1.17 +0 -6 + Unused locals. + + tests/libntp/a_md5encrypt.c@1.18 +3 -2 + Initialized but unused warning. + +ChangeSet@1.4021, 2023-07-31 09:31:00+00:00, davehart@tl.davehart.net + [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as + intended. + + ChangeLog@1.2070 +2 -0 + [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as + intended. + + check-libntp.mf@1.3 +2 -5 + Check libntp for updated sources every make invocation. + + check-libntpd.mf@1.3 +2 -11 + Check libntpd.a for updated sources every make invocation. + + check-libunity.mf@1.3 +2 -2 + Ensure libunity is built before dependents, but don't check for updated sources. + + check-scm-rev.mf@1.2 +2 -4 + Use .PHONY so things work even if someone makes a FRC.scm-rev file. + + sntp/check-libntp.mf@1.6 +2 -6 + Check libntp for updated sources every make invocation. + + sntp/check-libsntp.mf@1.3 +2 -6 + Check libsntp for updated sources every make invocation. + + sntp/check-libunity.mf@1.3 +1 -2 + Ensure libunity is built before dependents, but don't check for updated sources. + +ChangeSet@1.4016.2.2, 2023-07-30 22:14:18+00:00, davehart@tl.davehart.net + [Bug 3842] Windows ntpd ppsapi DLL load failure crashes. + + ChangeLog@1.2065.2.2 +1 -0 + [Bug 3842] Windows ntpd ppsapi DLL load failure crashes. + + ports/winnt/ntpd/nt_ppsimpl.c@1.6 +1 -1 + Avoid freeing garbage pointer during PPSAPI load failure cleanup. + +ChangeSet@1.4016.2.1, 2023-07-30 19:49:30+00:00, davehart@tl.davehart.net + [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid. + + ChangeLog@1.2065.2.1 +2 -0 + [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid. + + ntpq/ntpq-subs.c@1.135 +22 -13 + Limit apeers refid column to 8 characters, fix small leak. + +ChangeSet@1.4016.1.2, 2023-07-29 21:54:29+00:00, davehart@tl.davehart.net + [Bug 3851] Drop pool server when no local address can reach it. + + ChangeLog@1.2065.1.2 +3 -1 + [Bug 3851] Drop pool server when no local address can reach it. + + include/ntp.h@1.236 +3 -3 + Get rid of unused MDF_UCLNT, introduce MDF_PCLNT + + include/ntpd.h@1.210 +2 -1 + nit + + ntpd/ntp_io.c@1.438 +34 -22 + move linklocal test to is_linklocal() helper + + ntpd/ntp_proto.c@1.446.1.2 +18 -4 + [Bug 3851] Drop pool server when no local address can reach it. + +ChangeSet@1.4016.1.1, 2023-07-20 16:52:18+00:00, davehart@tl.davehart.net + [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access. + + ChangeLog@1.2065.1.1 +2 -0 + [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access. + + include/ntpd.h@1.209 +3 -1 + Track if any non-linklocal addreses are available. + + ntpd/ntp_io.c@1.437 +35 -4 + Track if any non-linklocal addreses are available for v4 and v6. + + ntpd/ntp_proto.c@1.446.1.1 +17 -1 + [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access. + +ChangeSet@1.4017, 2023-07-18 19:17:19+00:00, davehart@tl.davehart.net + [Bug 3849] ntpd --wait-sync times out. + + ChangeLog@1.2066 +3 -2 + [Bug 3849] ntpd --wait-sync times out. + + libntp/msyslog.c@1.58 +3 -3 + Reduce code duplication + + ntpd/ntp_loopfilter.c@1.198 +16 -0 + Signal first sync from rstclock() + + ntpd/ntp_proto.c@1.447 +2 -16 + Signal first sync from rstclock(). + Remove redundant fabs() call. + + ntpd/ntpd.c@1.190 +12 -15 + [Bug 3849] ntpd --wait-sync times out. + Remove some useless DPRINTF() calls as -d/-D disables forking and + these calls are in the forking codepath. + + ntpsnmpd/Makefile.am@1.45 +3 -3 + Rearrange library order to put $(SNMP_LIBS) last, avoiding problems + when they reference older OpenSSL libraries. + Use ntpsnmpd_LDADD rather than LDADD to leave the latter to the + choices of the end-user. + +ChangeSet@1.4016, 2023-07-15 00:45:44-07:00, harlan@ntp-testbuild.tal1.ntfo.org + configure libevent check intersperses output with answer. + + ChangeLog@1.2065 +1 -0 + configure libevent check intersperses output with answer. + + sntp/m4/ntp_libevent.m4@1.22 +2 -1 + configure libevent check intersperses output with answer. + +ChangeSet@1.4014, 2023-07-14 22:43:54-07:00, harlan@ntp-testbuild.tal1.ntfo.org + clean up ChangeLog listing order + + ChangeLog@1.2063 +12 -11 + clean up ChangeLog listing order + +ChangeSet@1.4013, 2023-07-14 22:23:53-07:00, harlan@ntp-testbuild.tal1.ntfo.org + html/clockopt.html cleanup + + ChangeLog@1.2062 +1 -0 + html/clockopt.html cleanup + + html/clockopt.html@1.30 +6 -3 + html/clockopt.html cleanup + +ChangeSet@1.4004.6.1, 2023-07-14 21:33:19+00:00, davehart@tl.davehart.net + [Bug 3846] Use -Wno-format-truncation by default. + + ChangeLog@1.2053.6.1 +3 -0 + [Bug 3846] Use -Wno-format-truncation by default. + + sntp/m4/ntp_compiler.m4@1.8.1.1 +38 -22 + [Bug 3846] Use -Wno-format-truncation by default. + +ChangeSet@1.4004.1.2, 2023-06-28 00:04:04+00:00, davehart@tl.davehart.net + fix release build + + libntp/authreadkeys.c@1.38 +1 -1 + fix non-DEBUG build + +ChangeSet@1.4004.5.1, 2023-06-25 23:18:48+00:00, davehart@tl.davehart.net + Remove -Wformat-security when removing -Wformat to avoid gcc 12 error. + + ChangeLog@1.2053.5.1 +5 -0 + [Bug 3841] 4.2.8p17 build break w/ gcc 12 -Wformat-security without -Wformat + + configure.ac@1.630 +1 -1 + bump cache version for ntp_compiler.m4 change + + sntp/configure.ac@1.90 +1 -1 + bump cache version for ntp_compiler.m4 change + + sntp/m4/ntp_compiler.m4@1.9 +3 -8 + Remove -Wformat-security when removing -Wformat to avoid gcc 12 error. + +ChangeSet@1.4004.4.1, 2023-06-20 18:41:45+00:00, davehart@tl.davehart.net + [Bug 3837] NULL pointer deref crash when ntpd deletes last interface. + Correct UNLINK_EXPR_SLIST() when the list is empty. + + ChangeLog@1.2053.4.1 +5 -0 + [Bug 3837] NULL pointer deref crash when ntpd deletes last interface. + + include/ntp_lists.h@1.17 +3 -1 + Correct UNLINK_EXPR_SLIST() when the list is empty. + +ChangeSet@1.4004.3.1, 2023-06-16 05:13:03+00:00, davehart@tl.davehart.net + Bug 3835 - NTP_HARD_*FLAGS not used by libevent tearoff. + + cvo.sh: + Fix on newer Linux with /etc/os-release + ntp_libevent.m4: + Newer libevent supports LIBEVENT_*FLAGS. + Disable building samples for the bundled libevent. + configure.ac: + One piece missing in LIBEVENT_*FLAGS support + + ChangeLog@1.2053.3.1 +3 -0 + Bug 3835 - NTP_HARD_*FLAGS not used by libevent tearoff. + + sntp/libevent/configure.ac@1.20 +5 -0 + One piece missing in LIBEVENT_*FLAGS support + + sntp/m4/ntp_libevent.m4@1.21 +4 -3 + Newer libevent supports LIBEVENT_*FLAGS. + Disable building samples for the bundled libevent. + + sntp/scripts/cvo.sh@1.9 +7 -1 + Fix on newer Linux with /etc/os-release + +ChangeSet@1.4004.2.1, 2023-06-11 14:09:22+00:00, davehart@tl.davehart.net + [Bug 3831] pollskewlist zeroed on runtime configuration. + + ChangeLog@1.2053.2.1 +3 -0 + [Bug 3831] pollskewlist zeroed on runtime configuration. + + ntpd/ntp_config.c@1.384 +22 -29 + [Bug 3831] pollskewlist zeroed on runtime configuration. + Replace magic numbers 3 & 17 with NTP_MINPOLL and NTP_MAXPOLL. + +ChangeSet@1.4004.1.1, 2023-06-09 19:11:34+00:00, davehart@tl.davehart.net + Add DSA, DSA-SHA, and SHA to tests/libntp/digests.c regression test. + + ChangeLog@1.2053.1.1 +3 -0 + Add DSA, DSA-SHA, and SHA to tests/libntp/digests.c + + libntp/authkeys.c@1.47 +1 -0 + Whitespace + + libntp/authreadkeys.c@1.37 +7 -5 + Provide the keytype when unable to use one loading ntp.keys + #ifdef DEBUG a "never happen" bit of code checking an internal errno. + + libntp/ssl_init.c@1.31 +1 -6 + Use MAX_MDG_LEN, remove leftover debugging code. + + ntpq/ntpq.c@1.198 +8 -13 + Remove unneeded code. keytype_from_text upcases its input. + + tests/libntp/data/ntp.keys@1.3 +12 -11 + Add DSA, DSA-SHA, and SHA keys. + + tests/libntp/digests.c@1.2 +120 -3 + Add DSA, DSA-SHA, and SHA digest algorithms. + + tests/libntp/run-digests.c@1.3 +6 -0 + Add DSA, DSA-SHA, and SHA digest algorithms. + +ChangeSet@1.4007, 2023-06-07 18:36:14+02:00, burnicki@burnicki.chi1.ntfo.org + [Bug 3828] BK should ignore a git repo in the same directory. + + BitKeeper/etc/ignore@1.97 +1 -0 + [Bug 3828] BK should ignore a git repo in the same directory. + + ChangeLog@1.2056 +2 -0 + [Bug 3828] BK should ignore a git repo in the same directory. + +ChangeSet@1.4006, 2023-06-07 18:25:37+02:00, burnicki@burnicki.chi1.ntfo.org + [Bug 3827] Fix build in case CLOCK_HOPF6021 or CLOCK_WHARTON_400A is disabled. + + ChangeLog@1.2055 +2 -0 + [Bug 3827] Fix build in case CLOCK_HOPF6021 or CLOCK_WHARTON_400A is disabled. + + libparse/clk_hopf6021.c@1.15 +2 -0 + [Bug 3827] Fix build in case CLOCK_HOPF6021 is disabled. + + libparse/clk_wharton.c@1.14 +2 -0 + [Bug 3827] Fix build in case CLOCK_WHARTON_400A is disabled. + +ChangeSet@1.4005, 2023-06-07 18:21:52+02:00, burnicki@burnicki.chi1.ntfo.org + [Bug 3825] Don't touch HTML files unless building inside a BK repo. + + ChangeLog@1.2054 +3 -0 + [Bug 3825] Don't touch HTML files unless building inside a BK repo. + + scripts/build/checkHtmlFileDates@1.2 +3 -1 + [Bug 3825] Don't touch HTML files unless building inside a BK repo. + ChangeSet@1.4004, 2023-06-06 04:40:27-07:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P17 TAG: NTP_4_2_8P17 diff --git a/contrib/ntp/Makefile.am b/contrib/ntp/Makefile.am index 72c35cb0e45d..2d5e6183261f 100644 --- a/contrib/ntp/Makefile.am +++ b/contrib/ntp/Makefile.am @@ -66,7 +66,7 @@ DISTCLEANFILES = .gcc-warning BUILT_SOURCES = \ .gcc-warning \ libtool \ - html/.datecheck \ + $(srcdir)/html/.datecheck \ $(srcdir)/COPYRIGHT \ $(srcdir)/.checkChangeLog \ $(NULL) @@ -83,7 +83,7 @@ BUILT_SOURCES = \ @sleep 1 @touch $@ -html/.datecheck: FRC.html +$(srcdir)/html/.datecheck: $(srcdir)/html/*.html cd $(srcdir)/html && \ ../scripts/build/checkHtmlFileDates @@ -128,7 +128,7 @@ uninstall-local: CommitLog: FRC.CommitLog cd $(srcdir) \ && $(PATH_TEST) -e CommitLog \ - -a SCCS/s.ChangeSet -ot CommitLog \ + -a .bk/SCCS/ChangeSet,s -ot CommitLog \ || scripts/build/genCommitLog # HMS: The following seems to be a work-in-progress... diff --git a/contrib/ntp/Makefile.in b/contrib/ntp/Makefile.in index 4307d8bebee9..fe562884111e 100644 --- a/contrib/ntp/Makefile.in +++ b/contrib/ntp/Makefile.in @@ -420,6 +420,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -583,7 +584,7 @@ DISTCLEANFILES = .gcc-warning BUILT_SOURCES = \ .gcc-warning \ libtool \ - html/.datecheck \ + $(srcdir)/html/.datecheck \ $(srcdir)/COPYRIGHT \ $(srcdir)/.checkChangeLog \ $(NULL) @@ -1105,7 +1106,7 @@ uninstall-am: uninstall-local @sleep 1 @touch $@ -html/.datecheck: FRC.html +$(srcdir)/html/.datecheck: $(srcdir)/html/*.html cd $(srcdir)/html && \ ../scripts/build/checkHtmlFileDates @@ -1150,7 +1151,7 @@ uninstall-local: CommitLog: FRC.CommitLog cd $(srcdir) \ && $(PATH_TEST) -e CommitLog \ - -a SCCS/s.ChangeSet -ot CommitLog \ + -a .bk/SCCS/ChangeSet,s -ot CommitLog \ || scripts/build/genCommitLog .buildcvo: diff --git a/contrib/ntp/NEWS b/contrib/ntp/NEWS index 432c3d324575..da174c84e0d7 100644 --- a/contrib/ntp/NEWS +++ b/contrib/ntp/NEWS @@ -1,4 +1,3906 @@ --- +NTP 4.2.8p18 (Harlan Stenn , 2024 May 24) + +Focus: Bug fixes + +Severity: Recommended + +This release: + +- changes crypto (OpenSSL or compatible) detection and default build behavior. + Previously, crypto was supported if available unless the --without-crypto + option was given to configure. With this release, the prior behavior of + falling back to a crypto-free build if usable libcrypto was not found has + changed to instead cause configure to fail with an error. + The --without-crypto option must be explicitly provided if you want a build + that does not use libcrypto functionality. +- Fixes 40 bugs +- Includes 40 other improvements + +Details below: + +* [Bug 3918] Tweak openssl header/library handling. +* [Bug 3914] Spurious "Unexpected origin timestamp" logged after time + stepped. +* [Bug 3913] Avoid duplicate IPv6 link-local manycast associations. + +* [Bug 3912] Avoid rare math errors in ntptrace. +* [Bug 3910] Memory leak using openssl-3 +* [Bug 3909] Do not select multicast local address for unicast peer. + +* [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe. + +* [Bug 3901] LIB_GETBUF isn't thread-safe. +* [Bug 3900] fast_xmit() selects wrong local addr responding to mcast on + Windows. +* [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient creates + duplicate associations. +* [Bug 3872] Ignore restrict mask for hostname. +* [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails. + Reported by Hans Mayer. Moved NONEMPTY_TRANSLATION_UNIT + declaration from ntp_types.h to config.h. +* [Bug 3870] Server drops client packets with ppoll < 4. +* [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs. + Reported by PoolMUC@web.de. +* [Bug 3868] Cannot restrict a pool peer. Thanks to + Edward McGuire for tracking down the deficiency. +* [Bug 3864] ntpd IPv6 refid different for big-endian and little-endian. + +* [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. +* [Bug 3856] Enable Edit & Continue debugging with Visual Studio. + +* [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict. +* [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid. + +* [Bug 3853] Clean up warnings with modern compilers. +* [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as + intended. +* [Bug 3851] Drop pool server when no local address can reach it. + +* [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid. + +* [Bug 3849] ntpd --wait-sync times out. +* [Bug 3847] SSL detection in configure should run-test if runpath is needed. + +* [Bug 3846] Use -Wno-format-truncation by default. +* [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access. + +* [Bug 3842] Windows ntpd PPSAPI DLL load failure crashes. +* [Bug 3841] 4.2.8p17 build break w/ gcc 12 -Wformat-security without -Wformat + Need to remove --Wformat-security when removing -Wformat to + silence numerous libopts warnings. +* [Bug 3837] NULL pointer deref crash when ntpd deletes last interface. + Reported by renmingshuai. Correct UNLINK_EXPR_SLIST() when the + list is empty. +* [Bug 3835] NTP_HARD_*FLAGS not used by libevent tearoff. +* [Bug 3831] pollskewlist zeroed on runtime configuration. +* [Bug 3830] configure libevent check intersperses output with answer. +* [Bug 3828] BK should ignore a git repo in the same directory. + +* [Bug 3827] Fix build in case CLOCK_HOPF6021 or CLOCK_WHARTON_400A + is disabled. +* [Bug 3825] Don't touch HTML files unless building inside a BK repo. + Fix the script checkHtmlFileDates. +* [Bug 3756] Improve OpenSSL library/header detection. +* [Bug 3753] ntpd fails to start with FIPS-enabled OpenSSL 3. +* [Bug 2734] TEST3 prevents initial interleave sync. Fix from +* Log failures to allocate receive buffers. +* Remove extraneous */ from libparse/ieee754io.c +* Fix .datecheck target line in Makefile.am. +* Update the copyright year. +* Update ntp.conf documentation to add "delrestrict" and correct information + about KoD rate limiting. +* html/clockopt.html cleanup. +* util/lsf-times - added. +* Add DSA, DSA-SHA, and SHA to tests/libntp/digests.c. +* Provide ntpd thread names to debugger on Windows. +* Remove dead code libntp/numtohost.c and its unit tests. +* Remove class A, B, C IPv4 distinctions in netof(). +* Use @configure_input@ in various *.in files to include a comment that + the file is generated from another pointing to the *.in. +* Correct underquoting, indents in ntp_facilitynames.m4. +* Clean up a few warnings seen building with older gcc. +* Fix build on older FreeBSD lacking sys/procctl.h. +* Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix + that makes it unnecessary, re-enabling ASLR stack gap. +* Use NONEMPTY_COMPILATION_UNIT in more conditionally-compiled files. +* Remove useless pointer to Windows Help from system error messages. +* Avoid newlines within Windows error messages. +* Ensure unique association IDs if wrapped. +* Simplify calc_addr_distance(). +* Clamp min/maxpoll in edge cases in newpeer(). +* Quiet local addr change logging when unpeering. +* Correct missing arg for %s printf specifier in + send_blocking_resp_internal(). +* Suppress OpenSSL 3 deprecation warning clutter. +* Correct OpenSSL usage in Autokey code to avoid warnings about + discarding const qualifiers with OpenSSL 3. +* Display KoD refid as text in recently added message. +* Avoid running checkHtmlFileDates script repeatedly when no html/*.html + files have changed. +* Abort configure if --enable-crypto-rand given & unavailable. +* Add configure --enable-verbose-ssl to trace SSL detection. +* Add build test coverage for --disable-saveconfig to flock-build script. + +* Remove deprecated configure --with-arlib option. +* Remove configure support for ISC UNIX ca. 1998. +* Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files + to NTP_LIBNTP. +* Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS. +* Eliminate [v]snprintf redefinition warnings on macOS. +* Fix clang 14 cast increases alignment warning on Linux. +* Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests. + +* Use NTP_HARD_CPPFLAGS in libopts tearoff. +* wire in --enable-build-framework-help + +--- +NTP 4.2.8p17 (Harlan Stenn , 2023 Jun 06) + +Focus: Bug fixes + +Severity: HIGH (for people running 4.2.8p16) + +This release: + +- fixes 3 bugs, including a regression +- adds new unit tests + +Details below: + +* [Bug 3824] Spurious "ntpd: daemon failed to notify parent!" logged at + event_sync. Reported by Edward McGuire. +* [Bug 3822] ntpd significantly delays first poll of servers specified by name. + Miroslav Lichvar identified regression in 4.2.8p16. +* [Bug 3821] 4.2.8p16 misreads hex authentication keys, won't interop with + 4.2.8p15 or earlier. Reported by Matt Nordhoff, thanks to + Miroslav Lichvar and Matt for rapid testing and identifying the + problem. +* Add tests/libntp/digests.c to catch regressions reading keys file or with + symmetric authentication digest output. + +--- +NTP 4.2.8p16 (Harlan Stenn , 2023 May 30) + +Focus: Security, Bug fixes + +Severity: LOW + +This release: + +- fixes 4 vulnerabilities (3 LOW and 1 None severity), +- fixes 46 bugs +- includes 15 general improvements +- adds support for OpenSSL-3.0 + +Details below: + +* [Sec 3808] Assertion failure in ntpq on malformed RT-11 date +* [Sec 3807] praecis_parse() in the Palisade refclock driver has a + hypothetical input buffer overflow. Reported by ... stenn@ +* [Sec 3806] libntp/mstolfp.c needs bounds checking + - solved numerically instead of using string manipulation +* [Sec 3767] An OOB KoD RATE value triggers an assertion when debug is enabled. + +* [Bug 3819] Updated libopts/Makefile.am was missing NTP_HARD_* values. +* [Bug 3817] Bounds-check "tos floor" configuration. +* [Bug 3814] First poll delay of new or cleared associations miscalculated. + +* [Bug 3802] ntp-keygen -I default identity modulus bits too small for + OpenSSL 3. Reported by rmsh1216@163.com +* [Bug 3801] gpsdjson refclock gps_open() device name mishandled. +* [Bug 3800] libopts-42.1.17 does not compile with Microsoft C. +* [Bug 3799] Enable libopts noreturn compiler advice for MSC. +* [Bug 3797] Windows getaddrinfo w/AI_ADDRCONFIG fails for localhost when + disconnected, breaking ntpq and ntpdc. +* [Bug 3795] pollskewlist documentation uses | when it shouldn't. + - ntp.conf manual page and miscopt.html corrections. +* [Bug 3793] Wrong variable type passed to record_raw_stats(). + - Report and patch by Yuezhen LUAN . +* [Bug 3786] Timer starvation on high-load Windows ntpd. +* [Bug 3784] high-load ntpd on Windows deaf after enough ICMP TTL exceeded. + +* [Bug 3781] log "Unable to listen for broadcasts" for IPv4 +* [Bug 3774] mode 6 packets corrupted in rawstats file + - Reported by Edward McGuire, fix identified by . +* [Bug 3758] Provide a 'device' config statement for refclocks +* [Bug 3757] Improve handling of Linux-PPS in NTPD +* [Bug 3741] 4.2.8p15 can't build with glibc 2.34 +* [Bug 3725] Make copyright of clk_wharton.c compatible with Debian. + Philippe De Muyter +* [Bug 3724] ntp-keygen with openSSL 1.1.1 fails on Windows + - openssl applink needed again for openSSL-1.1.1 +* [Bug 3719] configure.ac checks for closefrom() and getdtablesize() missing. + Reported by Brian Utterback, broken in 2010 by +* [Bug 3699] Problems handling drift file and restoring previous drifts + - command line options override config statements where applicable + - make initial frequency settings idempotent and reversible + - make sure kernel PLL gets a recovered drift componsation +* [Bug 3695] Fix memory leak with ntpq on Windows Server 2019 +* [Bug 3694] NMEA refclock seems to unnecessarily require location in messages + - misleading title; essentially a request to ignore the receiver status. + Added a mode bit for this. +* [Bug 3693] Improvement of error handling key lengths + - original patch by Richard Schmidt, with mods & unit test fixes +* [Bug 3692] /dev/gpsN requirement prevents KPPS + - implement/wrap 'realpath()' to resolve symlinks in device names +* [Bug 3691] Buffer Overflow reading GPSD output + - original patch by matt + - increased max PDU size to 4k to avoid truncation +* [Bug 3690] newline in ntp clock variable (parse) + - patch by Frank Kardel +* [Bug 3689] Extension for MD5, SHA-1 and other keys + - ntp{q,dc} now use the same password processing as ntpd does in the key + file, so having a binary secret >= 11 bytes is possible for all keys. + (This is a different approach to the problem than suggested) +* [Bug 3688] GCC 10 build errors in testsuite +* [Bug 3687] ntp_crypto_rand RNG status not known + - patch by Gerry Garvey +* [Bug 3682] Fixes for warnings when compiled without OpenSSL + - original patch by Gerry Garvey +* [Bug 3677] additional peer events not decoded in associations listing + - original patch by Gerry Garvey +* [Bug 3676] compiler warnings (CMAC, interrupt_buf, typo, fallthrough) + - applied patches by Gerry Garvey +* [Bug 3675] ntpq ccmds[] stores pointer to non-persistent storage +* [Bug 3674] ntpq command 'execute only' using '~' prefix + - idea+patch by Gerry Garvey +* [Bug 3672] fix biased selection in median cut +* [Bug 3666] avoid unlimited receive buffer allocation + - follow-up: fix inverted sense in check, reset shortfall counter +* [Bug 3660] Revert 4.2.8p15 change to manycast. +* [Bug 3640] document "discard monitor" and fix the code. + - fixed bug identified by Edward McGuire +* [Bug 3626] (SNTP) UTC offset calculation needs dst flag + - applied patch by Gerry Garvey +* [Bug 3432] refclocks that 'write()' should check the result + - backport from -dev, plus some more work on warnings for unchecked results +* [Bug 3428] ntpd spinning consuming CPU on Linux router with full table. + Reported by Israel G. Lugo. +* [Bug 3103] libopts zsave_warn format string too few arguments +* [Bug 2990] multicastclient incorrectly causes bind to broadcast address. + Integrated patch from Brian Utterback. +* [Bug 2525] Turn on automake subdir-objects across the project. +* [Bug 2410] syslog an error message on panic exceeded. +* Use correct rounding in mstolfp(). perlinger/hart +* M_ADDF should use u_int32. +* Only define tv_fmt_libbuf() if we will use it. +* Use recv_buffer instead of the longer recv_space.X_recv_buffer. hart/stenn +* Make sure the value returned by refid_str() prints cleanly. +* If DEBUG is enabled, the startup banner now says that debug assertions + are in force and that ntpd will abort if any are violated. +* syslog valid incoming KoDs. +* Rename a poorly-named variable. +* Disable "embedded NUL in string" messages in libopts, when we can. +* Use https in the AC_INIT URLs in configure.ac. +* Implement NTP_FUNC_REALPATH. +* Lose a gmake construct in ntpd/Makefile.am. +* upgrade to: autogen-5.18.16 +* upgrade to: libopts-42.1.17 +* upgrade to: autoconf-2.71 +* upgrade to: automake-1.16.15 +* Upgrade to libevent-2.1.12-stable +* Support OpenSSL-3.0 + +--- +NTP 4.2.8p15 (Harlan Stenn , 2020 Jun 23) + +Focus: Security, Bug fixes + +Severity: MEDIUM + +This release fixes one vulnerability: Associations that use CMAC +authentication between ntpd from versions 4.2.8p11/4.3.97 and +4.2.8p14/4.3.100 will leak a small amount of memory for each packet. +Eventually, ntpd will run out of memory and abort. + +It also fixes 13 other bugs. + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merger between 3592 and 3596 + - Thanks to Sylar Tao +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- +NTP 4.2.8p14 (Harlan Stenn , 2020 Mar 03) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +This release fixes three vulnerabilities: a bug that causes causes an ntpd +instance that is explicitly configured to override the default and allow +ntpdc (mode 7) connections to be made to a server to read some uninitialized +memory; fixes the case where an unmonitored ntpd using an unauthenticated +association to its servers may be susceptible to a forged packet DoS attack; +and fixes an attack against a client instance that uses a single +unauthenticated time source. It also fixes 46 other bugs and addresses +4 other issues. + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. + +--- +NTP 4.2.8p13 (Harlan Stenn , 2019 Mar 07) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +This release fixes a bug that allows an attacker with access to an +explicitly trusted source to send a crafted malicious mode 6 (ntpq) +packet that can trigger a NULL pointer dereference, crashing ntpd. +It also provides 17 other bugfixes and 1 other improvement: + +* [Sec 3565] Crafted null dereference attack in authenticated + mode 6 packet + - reported by Magnus Stubman +* [Bug 3560] Fix build when HAVE_DROPROOT is not defined + - applied patch by Ian Lepore +* [Bug 3558] Crash and integer size bug + - isolate and fix linux/windows specific code issue +* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - provide better function for incremental string formatting +* [Bug 3555] Tidy up print alignment of debug output from ntpdate + - applied patch by Gerry Garvey +* [Bug 3554] config revoke stores incorrect value + - original finding by Gerry Garvey, additional cleanup needed +* [Bug 3549] Spurious initgroups() error message + - patch by Christous Zoulas +* [Bug 3548] Signature not verified on windows system + - finding by Chen Jiabin, plus another one by me +* [Bug 3541] patch to fix STA_NANO struct timex units + - applied patch by Maciej Szmigiero +* [Bug 3540] Cannot set minsane to 0 anymore + - applied patch by Andre Charbonneau +* [Bug 3539] work_fork build fails when droproot is not supported + - applied patch by Baruch Siach +* [Bug 3538] Build fails for no-MMU targets + - applied patch by Baruch Siach +* [Bug 3535] libparse won't handle GPS week rollover + - refactored handling of GPS era based on 'tos basedate' for + parse (TSIP) and JUPITER clocks +* [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) + - patch by Daniel J. Luke; this does not fix a potential linker + regression issue on MacOS. +* [Bug 3527 - Backward Incompatible] mode7 clockinfo fudgeval2 packet + anomaly , reported by GGarvey. + - --enable-bug3527-fix support by HStenn +* [Bug 3526] Incorrect poll interval in packet + - applied patch by Gerry Garvey +* [Bug 3471] Check for openssl/[ch]mac.h. + - added missing check, reported by Reinhard Max +* [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64 + - this is a variant of [bug 3558] and should be fixed with it +* Implement 'configure --disable-signalled-io' + +-- +NTP 4.2.8p12 (Harlan Stenn , 2018/14/09) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +This release fixes a "hole" in the noepeer capability introduced to ntpd +in ntp-4.2.8p11, and a buffer overflow in the openhost() function used by +ntpq and ntpdc. It also provides 26 other bugfixes, and 4 other improvements: + +* [Sec 3505] Buffer overflow in the openhost() call of ntpq and ntpdc. + +* [Sec 3012] Fix a hole in the new "noepeer" processing. + +* Bug Fixes: + [Bug 3521] Fix a logic bug in the INVALIDNAK checks. + [Bug 3509] Add support for running as non-root on FreeBSD, Darwin, + other TrustedBSD platforms + - applied patch by Ian Lepore + [Bug 3506] Service Control Manager interacts poorly with NTPD + - changed interaction with SCM to signal pending startup + [Bug 3486] Buffer overflow in ntpq/ntpq.c:tstflags() + - applied patch by Gerry Garvey + [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c + - applied patch by Gerry Garvey + [Bug 3484] ntpq response from ntpd is incorrect when REFID is null + - rework of ntpq 'nextvar()' key/value parsing + [Bug 3482] Fixes for compilation warnings (ntp_io.c & ntpq-subs.c) + - applied patch by Gerry Garvey (with mods) + [Bug 3480] Refclock sample filter not cleared on clock STEP + - applied patch by Gerry Garvey + [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq + - applied patch by Gerry Garvey (with mods) + [Bug 3476]ctl_putstr() sends empty unquoted string [...] + - applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though + [Bug 3475] modify prettydate() to suppress output of zero time + - applied patch by Gerry Garvey + [Bug 3474] Missing pmode in mode7 peer info response + - applied patch by Gerry Garvey + [Bug 3471] Check for openssl/[ch]mac.h. HStenn. + - add #define ENABLE_CMAC support in configure. HStenn. + [Bug 3470] ntpd4.2.8p11 fails to compile without OpenSSL + [Bug 3469] Incomplete string compare [...] in is_refclk_addr + - patch by Stephen Friedl + [Bug 3467] Potential memory fault in ntpq [...] + - fixed IO redirection and CTRL-C handling in ntq and ntpdc + [Bug 3465] Default TTL values cannot be used + [Bug 3461] refclock_shm.c: clear error status on clock recovery + - initial patch by Hal Murray; also fixed refclock_report() trouble + [Bug 3460] Fix typo in ntpq.texi, reported by Kenyon Ralph. + [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer + - According to Brooks Davis, there was only one location + [Bug 3449] ntpq - display "loop" instead of refid [...] + - applied patch by Gerry Garvey + [Bug 3445] Symmetric peer won't sync on startup + - applied patch by Gerry Garvey + [Bug 3442] Fixes for ntpdate as suggested by Gerry Garvey, + with modifications + New macro REFID_ISTEXT() which is also used in ntpd/ntp_control.c. + [Bug 3434] ntpd clears STA_UNSYNC on start + - applied patch by Miroslav Lichvar + [Bug 3426] ntpdate.html -t default is 2 seconds. Leonid Evdokimov. + [Bug 3121] Drop root privileges for the forked DNS worker + - integrated patch by Reinhard Max + [Bug 2821] minor build issues + - applied patches by Christos Zoulas, including real bug fixes + html/authopt.html: cleanup, from + ntpd/ntpd.c: DROPROOT cleanup. + Symmetric key range is 1-65535. Update docs. + +-- +NTP 4.2.8p11 (Harlan Stenn , 2018/02/27) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +This release fixes 2 low-/medium-, 1 informational/medum-, and 2 low-severity +vulnerabilities in ntpd, one medium-severity vulernability in ntpq, and +provides 65 other non-security fixes and improvements: + +* NTP Bug 3454: Unauthenticated packet can reset authenticated interleaved + association (LOW/MED) + Date Resolved: Stable (4.2.8p11) 27 Feb 2018 + References: Sec 3454 / CVE-2018-7185 / VU#961909 + Affects: ntp-4.2.6, up to but not including ntp-4.2.8p11. + CVSS2: MED 4.3 (AV:N/AC:M/Au:N/C:N/I:N/A:P) This could score between + 2.9 and 6.8. + CVSS3: LOW 3.1 CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L This could + score between 2.6 and 3.1 + Summary: + The NTP Protocol allows for both non-authenticated and + authenticated associations, in client/server, symmetric (peer), + and several broadcast modes. In addition to the basic NTP + operational modes, symmetric mode and broadcast servers can + support an interleaved mode of operation. In ntp-4.2.8p4 a bug + was inadvertently introduced into the protocol engine that + allows a non-authenticated zero-origin (reset) packet to reset + an authenticated interleaved peer association. If an attacker + can send a packet with a zero-origin timestamp and the source + IP address of the "other side" of an interleaved association, + the 'victim' ntpd will reset its association. The attacker must + continue sending these packets in order to maintain the + disruption of the association. In ntp-4.0.0 thru ntp-4.2.8p6, + interleave mode could be entered dynamically. As of ntp-4.2.8p7, + interleaved mode must be explicitly configured/enabled. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p11, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + If you are unable to upgrade to 4.2.8p11 or later and have + 'peer HOST xleave' lines in your ntp.conf file, remove the + 'xleave' option. + Have enough sources of time. + Properly monitor your ntpd instances. + If ntpd stops running, auto-restart it without -g . + Credit: + This weakness was discovered by Miroslav Lichvar of Red Hat. + +* NTP Bug 3453: Interleaved symmetric mode cannot recover from bad + state (LOW/MED) + Date Resolved: Stable (4.2.8p11) 27 Feb 2018 + References: Sec 3453 / CVE-2018-7184 / VU#961909 + Affects: ntpd in ntp-4.2.8p4, up to but not including ntp-4.2.8p11. + CVSS2: MED 4.3 (AV:N/AC:M/Au:N/C:P/I:N/A:N) + Could score between 2.9 and 6.8. + CVSS3: LOW 3.1 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L + Could score between 2.6 and 6.0. + Summary: + The fix for NtpBug2952 was incomplete, and while it fixed one + problem it created another. Specifically, it drops bad packets + before updating the "received" timestamp. This means a + third-party can inject a packet with a zero-origin timestamp, + meaning the sender wants to reset the association, and the + transmit timestamp in this bogus packet will be saved as the + most recent "received" timestamp. The real remote peer does + not know this value and this will disrupt the association until + the association resets. + Mitigation: + Implement BCP-38. + Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Use authentication with 'peer' mode. + Have enough sources of time. + Properly monitor your ntpd instances. + If ntpd stops running, auto-restart it without -g . + Credit: + This weakness was discovered by Miroslav Lichvar of Red Hat. + +* NTP Bug 3415: Provide a way to prevent authenticated symmetric passive + peering (LOW) + Date Resolved: Stable (4.2.8p11) 27 Feb 2018 + References: Sec 3415 / CVE-2018-7170 / VU#961909 + Sec 3012 / CVE-2016-1549 / VU#718152 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92. Resolved in 4.2.8p11. + CVSS2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N) + CVSS3: LOW 3.1 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N + Summary: + ntpd can be vulnerable to Sybil attacks. If a system is set up to + use a trustedkey and if one is not using the feature introduced in + ntp-4.2.8p6 allowing an optional 4th field in the ntp.keys file to + specify which IPs can serve time, a malicious authenticated peer + -- i.e. one where the attacker knows the private symmetric key -- + can create arbitrarily-many ephemeral associations in order to win + the clock selection of ntpd and modify a victim's clock. Three + additional protections are offered in ntp-4.2.8p11. One is the + new 'noepeer' directive, which disables symmetric passive + ephemeral peering. Another is the new 'ippeerlimit' directive, + which limits the number of peers that can be created from an IP. + The third extends the functionality of the 4th field in the + ntp.keys file to include specifying a subnet range. + Mitigation: + Implement BCP-38. + Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Use the 'noepeer' directive to prohibit symmetric passive + ephemeral associations. + Use the 'ippeerlimit' directive to limit the number of peers + that can be created from an IP. + Use the 4th argument in the ntp.keys file to limit the IPs and + subnets that can be time servers. + Have enough sources of time. + Properly monitor your ntpd instances. + If ntpd stops running, auto-restart it without -g . + Credit: + This weakness was reported as Bug 3012 by Matthew Van Gundy of + Cisco ASIG, and separately by Stefan Moser as Bug 3415. + +* ntpq Bug 3414: decodearr() can write beyond its 'buf' limits (Medium) + Date Resolved: 27 Feb 2018 + References: Sec 3414 / CVE-2018-7183 / VU#961909 + Affects: ntpq in ntp-4.2.8p6, up to but not including ntp-4.2.8p11. + CVSS2: MED 6.8 (AV:N/AC:M/Au:N/C:P/I:P/A:P) + CVSS3: MED 5.0 CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L + Summary: + ntpq is a monitoring and control program for ntpd. decodearr() + is an internal function of ntpq that is used to -- wait for it -- + decode an array in a response string when formatted data is being + displayed. This is a problem in affected versions of ntpq if a + maliciously-altered ntpd returns an array result that will trip this + bug, or if a bad actor is able to read an ntpq request on its way to + a remote ntpd server and forge and send a response before the remote + ntpd sends its response. It's potentially possible that the + malicious data could become injectable/executable code. + Mitigation: + Implement BCP-38. + Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Credit: + This weakness was discovered by Michael Macnair of Thales e-Security. + +* NTP Bug 3412: ctl_getitem(): buffer read overrun leads to undefined + behavior and information leak (Info/Medium) + Date Resolved: 27 Feb 2018 + References: Sec 3412 / CVE-2018-7182 / VU#961909 + Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p11. + CVSS2: INFO 0.0 - MED 5.0 (AV:N/AC:L/Au:N/C:P/I:N/A:N) 0.0 if C:N + CVSS3: NONE 0.0 - MED 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N + 0.0 if C:N + Summary: + ctl_getitem() is used by ntpd to process incoming mode 6 packets. + A malicious mode 6 packet can be sent to an ntpd instance, and + if the ntpd instance is from 4.2.8p6 thru 4.2.8p10, that will + cause ctl_getitem() to read past the end of its buffer. + Mitigation: + Implement BCP-38. + Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Have enough sources of time. + Properly monitor your ntpd instances. + If ntpd stops running, auto-restart it without -g . + Credit: + This weakness was discovered by Yihan Lian of Qihoo 360. + +* NTP Bug 3012: Sybil vulnerability: ephemeral association attack + Also see Bug 3415, above. + Date Mitigated: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + Date Resolved: Stable (4.2.8p11) 27 Feb 2018 + References: Sec 3012 / CVE-2016-1549 / VU#718152 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92. Resolved in 4.2.8p11. + CVSS2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N) + CVSS3: MED 5.3 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N + Summary: + ntpd can be vulnerable to Sybil attacks. If a system is set up + to use a trustedkey and if one is not using the feature + introduced in ntp-4.2.8p6 allowing an optional 4th field in the + ntp.keys file to specify which IPs can serve time, a malicious + authenticated peer -- i.e. one where the attacker knows the + private symmetric key -- can create arbitrarily-many ephemeral + associations in order to win the clock selection of ntpd and + modify a victim's clock. Two additional protections are + offered in ntp-4.2.8p11. One is the 'noepeer' directive, which + disables symmetric passive ephemeral peering. The other extends + the functionality of the 4th field in the ntp.keys file to + include specifying a subnet range. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p11, or later, from the NTP Project Download Page or + the NTP Public Services Project Download Page. + Use the 'noepeer' directive to prohibit symmetric passive + ephemeral associations. + Use the 'ippeerlimit' directive to limit the number of peer + associations from an IP. + Use the 4th argument in the ntp.keys file to limit the IPs + and subnets that can be time servers. + Properly monitor your ntpd instances. + Credit: + This weakness was discovered by Matthew Van Gundy of Cisco ASIG. + +* Bug fixes: + [Bug 3457] OpenSSL FIPS mode regression + [Bug 3455] ntpd doesn't use scope id when binding multicast + - applied patch by Sean Haugh + [Bug 3452] PARSE driver prints uninitialized memory. + [Bug 3450] Dubious error messages from plausibility checks in get_systime() + - removed error log caused by rounding/slew, ensured postcondition + [Bug 3447] AES-128-CMAC (fixes) + - refactoring the MAC code, too + [Bug 3441] Validate the assumption that AF_UNSPEC is 0. stenn@ntp.org + [Bug 3439] When running multiple commands / hosts in ntpq... + - applied patch by ggarvey + [Bug 3438] Negative values and values > 999 days in... + - applied patch by ggarvey (with minor mods) + [Bug 3437] ntpd tries to open socket with AF_UNSPEC domain + - applied patch (with mods) by Miroslav Lichvar + [Bug 3435] anchor NTP era alignment + [Bug 3433] sntp crashes when run with -a. + [Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2" + - fixed several issues with hash algos in ntpd, sntp, ntpq, + ntpdc and the test suites + [Bug 3424] Trimble Thunderbolt 1024 week millenium bug + - initial patch by Daniel Pouzzner + [Bug 3423] QNX adjtime() implementation error checking is + wrong + [Bug 3417] ntpq ifstats packet counters can be negative + made IFSTATS counter quantities unsigned + [Bug 3411] problem about SIGN(6) packet handling for ntp-4.2.8p10 + - raised receive buffer size to 1200 + [Bug 3408] refclock_jjy.c: Avoid a wrong report of the coverity static + analysis tool. + [Bug 3405] update-leap.in: general cleanup, HTTPS support. Paul McMath. + [Bug 3404] Fix openSSL DLL usage under Windows + - fix/drop assumptions on OpenSSL libs directory layout + [Bug 3399] NTP: linker error in 4.2.8p10 during Linux cross-compilation + - initial patch by timeflies@mail2tor.com + [Bug 3398] tests fail with core dump + - patch contributed by Alexander Bluhm + [Bug 3397] ctl_putstr() asserts that data fits in its buffer + rework of formatting & data transfer stuff in 'ntp_control.c' + avoids unecessary buffers and size limitations. + [Bug 3394] Leap second deletion does not work on ntpd clients + - fixed handling of dynamic deletion w/o leap file + [Bug 3391] ntpd segfaults on startup due to small warmup thread stack size + - increased mimimum stack size to 32kB + [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 + - reverted handling of PPS kernel consumer to 4.2.6 behavior + [Bug 3365] Updates driver40(-ja).html and miscopt.html + [Bug 3358] Spurious KoD log messages in .INIT. phase. HStenn. + [Bug 3016] wrong error position reported for bad ":config pool" + - fixed location counter & ntpq output + [Bug 2900] libntp build order problem. HStenn. + [Bug 2878] Tests are cluttering up syslog + [Bug 2737] Wrong phone number listed for USNO. ntp-bugs@bodosom.net, + perlinger@ntp.org + [Bug 2557] Fix Thunderbolt init. ntp-bugs@bodosom.net, perlinger@ntp. + [Bug 948] Trustedkey config directive leaks memory. + Use strlcpy() to copy strings, not memcpy(). HStenn. + Typos. HStenn. + test_ntp_scanner_LDADD needs ntpd/ntp_io.o. HStenn. + refclock_jjy.c: Add missing "%s" to an msyslog() call. HStenn. + Build ntpq and libntpq.a with NTP_HARD_*FLAGS. perlinger@ntp.org + Fix trivial warnings from 'make check'. perlinger@ntp.org + Fix bug in the override portion of the compiler hardening macro. HStenn. + record_raw_stats(): Log entire packet. Log writes. HStenn. + AES-128-CMAC support. BInglis, HStenn, JPerlinger. + sntp: tweak key file logging. HStenn. + sntp: pkt_output(): Improve debug output. HStenn. + update-leap: updates from Paul McMath. + When using pkg-config, report --modversion. HStenn. + Clean up libevent configure checks. HStenn. + sntp: show the IP of who sent us a crypto-NAK. HStenn. + Allow .../N to specify subnet bits for IPs in ntp.keys. HStenn, JPerlinger. + authistrustedip() - use it in more places. HStenn, JPerlinger. + New sysstats: sys_lamport, sys_tsrounding. HStenn. + Update ntp.keys .../N documentation. HStenn. + Distribute testconf.yml. HStenn. + Add DPRINTF(2,...) lines to receive() for packet drops. HStenn. + Rename the configuration flag fifo variables. HStenn. + Improve saveconfig output. HStenn. + Decode restrict flags on receive() debug output. HStenn. + Decode interface flags on receive() debug output. HStenn. + Warn the user if deprecated "driftfile name WanderThreshold" is used. HStenn. + Update the documentation in ntp.conf.def . HStenn. + restrictions() must return restrict flags and ippeerlimit. HStenn. + Update ntpq peer documentation to describe the 'p' type. HStenn. + Rename restrict 'flags' to 'rflags. Use an enum for the values. HStenn. + Provide dump_restricts() for debugging. HStenn. + Use consistent 4th arg type for [gs]etsockopt. JPerlinger. + +* Other items: + +* update-leap needs the following perl modules: + Net::SSLeay + IO::Socket::SSL + +* New sysstats variables: sys_lamport, sys_tsrounding +See them with: ntpq -c "rv 0 ss_lamport,ss_tsrounding" +sys_lamport counts the number of observed Lamport violations, while +sys_tsrounding counts observed timestamp rounding events. + +* New ntp.conf items: + +- restrict ... noepeer +- restrict ... ippeerlimit N + +The 'noepeer' directive will disallow all ephemeral/passive peer +requests. + +The 'ippeerlimit' directive limits the number of time associations +for each IP in the designated set of addresses. This limit does not +apply to explicitly-configured associations. A value of -1, the current +default, means an unlimited number of associations may connect from a +single IP. 0 means "none", etc. Ordinarily the only way multiple +associations would come from the same IP would be if the remote side +was using a proxy. But a trusted machine might become compromised, +in which case an attacker might spin up multiple authenticated sessions +from different ports. This directive should be helpful in this case. + +* New ntp.keys feature: Each IP in the optional list of IPs in the 4th +field may contain a /subnetbits specification, which identifies the +scope of IPs that may use this key. This IP/subnet restriction can be +used to limit the IPs that may use the key in most all situations where +a key is used. +-- +NTP 4.2.8p10 (Harlan Stenn , 2017/03/21) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +This release fixes 5 medium-, 6 low-, and 4 informational-severity +vulnerabilities, and provides 15 other non-security fixes and improvements: + +* NTP-01-016 NTP: Denial of Service via Malformed Config (Medium) + Date Resolved: 21 Mar 2017 + References: Sec 3389 / CVE-2017-6464 / VU#325339 + Affects: All versions of NTP-4, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C) + CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: + A vulnerability found in the NTP server makes it possible for an + authenticated remote user to crash ntpd via a malformed mode + configuration directive. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page or + the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was discovered by Cure53. + +* NTP-01-014 NTP: Buffer Overflow in DPTS Clock (Low) + Date Resolved: 21 Mar 2017 + References: Sec 3388 / CVE-2017-6462 / VU#325339 + Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P) + CVSS3: Low 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L + Summary: + There is a potential for a buffer overflow in the legacy Datum + Programmable Time Server refclock driver. Here the packets are + processed from the /dev/datum device and handled in + datum_pts_receive(). Since an attacker would be required to + somehow control a malicious /dev/datum device, this does not + appear to be a practical attack and renders this issue "Low" in + terms of severity. + Mitigation: + If you have a Datum reference clock installed and think somebody + may maliciously change the device, upgrade to 4.2.8p10, or + later, from the NTP Project Download Page or the NTP Public + Services Project Download Page + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was discovered by Cure53. + +* NTP-01-012 NTP: Authenticated DoS via Malicious Config Option (Medium) + Date Resolved: 21 Mar 2017 + References: Sec 3387 / CVE-2017-6463 / VU#325339 + Affects: All versions of ntp, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C) + CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: + A vulnerability found in the NTP server allows an authenticated + remote attacker to crash the daemon by sending an invalid setting + via the :config directive. The unpeer option expects a number or + an address as an argument. In case the value is "0", a + segmentation fault occurs. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was discovered by Cure53. + +* NTP-01-011 NTP: ntpq_stripquotes() returns incorrect value (Informational) + Date Resolved: 21 Mar 2017 + References: Sec 3386 + Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: None 0.0 (AV:N/AC:H/Au:N/C:N/I:N/A:N) + CVSS3: None 0.0 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:N + Summary: + The NTP Mode 6 monitoring and control client, ntpq, uses the + function ntpq_stripquotes() to remove quotes and escape characters + from a given string. According to the documentation, the function + is supposed to return the number of copied bytes but due to + incorrect pointer usage this value is always zero. Although the + return value of this function is never used in the code, this + flaw could lead to a vulnerability in the future. Since relying + on wrong return values when performing memory operations is a + dangerous practice, it is recommended to return the correct value + in accordance with the documentation pertinent to the code. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was discovered by Cure53. + +* NTP-01-010 NTP: ereallocarray()/eallocarray() underused (Info) + Date Resolved: 21 Mar 2017 + References: Sec 3385 + Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + Summary: + NTP makes use of several wrappers around the standard heap memory + allocation functions that are provided by libc. This is mainly + done to introduce additional safety checks concentrated on + several goals. First, they seek to ensure that memory is not + accidentally freed, secondly they verify that a correct amount + is always allocated and, thirdly, that allocation failures are + correctly handled. There is an additional implementation for + scenarios where memory for a specific amount of items of the + same size needs to be allocated. The handling can be found in + the oreallocarray() function for which a further number-of-elements + parameter needs to be provided. Although no considerable threat + was identified as tied to a lack of use of this function, it is + recommended to correctly apply oreallocarray() as a preferred + option across all of the locations where it is possible. + Mitigation: + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Credit: + This weakness was discovered by Cure53. + +* NTP-01-009 NTP: Privileged execution of User Library code (WINDOWS + PPSAPI ONLY) (Low) + Date Resolved: 21 Mar 2017 + References: Sec 3384 / CVE-2017-6455 / VU#325339 + Affects: All Windows versions of ntp-4 that use the PPSAPI, up to but + not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not + including ntp-4.3.94. + CVSS2: MED 3.8 (AV:L/AC:H/Au:S/C:N/I:N/A:C) + CVSS3: MED 4.0 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: + The Windows NT port has the added capability to preload DLLs + defined in the inherited global local environment variable + PPSAPI_DLLS. The code contained within those libraries is then + called from the NTPD service, usually running with elevated + privileges. Depending on how securely the machine is setup and + configured, if ntpd is configured to use the PPSAPI under Windows + this can easily lead to a code injection. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Credit: + This weakness was discovered by Cure53. + +* NTP-01-008 NTP: Stack Buffer Overflow from Command Line (WINDOWS + installer ONLY) (Low) + Date Resolved: 21 Mar 2017 + References: Sec 3383 / CVE-2017-6452 / VU#325339 + Affects: WINDOWS installer ONLY: All versions of the ntp-4 Windows + installer, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up + to, but not including ntp-4.3.94. + CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P) + CVSS3: Low 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L + Summary: + The Windows installer for NTP calls strcat(), blindly appending + the string passed to the stack buffer in the addSourceToRegistry() + function. The stack buffer is 70 bytes smaller than the buffer + in the calling main() function. Together with the initially + copied Registry path, the combination causes a stack buffer + overflow and effectively overwrites the stack frame. The + passed application path is actually limited to 256 bytes by the + operating system, but this is not sufficient to assure that the + affected stack buffer is consistently protected against + overflowing at all times. + Mitigation: + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Credit: + This weakness was discovered by Cure53. + +* NTP-01-007 NTP: Data Structure terminated insufficiently (WINDOWS + installer ONLY) (Low) + Date Resolved: 21 Mar 2017 + References: Sec 3382 / CVE-2017-6459 / VU#325339 + Affects: WINDOWS installer ONLY: All ntp-4 versions of the Windows + installer, up to but not including ntp-4.2.8p10, and ntp-4.3.0 + up to, but not including ntp-4.3.94. + CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P) + CVSS3: Low 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L + Summary: + The Windows installer for NTP calls strcpy() with an argument + that specifically contains multiple null bytes. strcpy() only + copies a single terminating null character into the target + buffer instead of copying the required double null bytes in the + addKeysToRegistry() function. As a consequence, a garbage + registry entry can be created. The additional arsize parameter + is erroneously set to contain two null bytes and the following + call to RegSetValueEx() claims to be passing in a multi-string + value, though this may not be true. + Mitigation: + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Credit: + This weakness was discovered by Cure53. + +* NTP-01-006 NTP: Copious amounts of Unused Code (Informational) + References: Sec 3381 + Summary: + The report says: Statically included external projects + potentially introduce several problems and the issue of having + extensive amounts of code that is "dead" in the resulting binary + must clearly be pointed out. The unnecessary unused code may or + may not contain bugs and, quite possibly, might be leveraged for + code-gadget-based branch-flow redirection exploits. Analogically, + having source trees statically included as well means a failure + in taking advantage of the free feature for periodical updates. + This solution is offered by the system's Package Manager. The + three libraries identified are libisc, libevent, and libopts. + Resolution: + For libisc, we already only use a portion of the original library. + We've found and fixed bugs in the original implementation (and + offered the patches to ISC), and plan to see what has changed + since we last upgraded the code. libisc is generally not + installed, and when it it we usually only see the static libisc.a + file installed. Until we know for sure that the bugs we've found + and fixed are fixed upstream, we're better off with the copy we + are using. + + Version 1 of libevent was the only production version available + until recently, and we've been requiring version 2 for a long time. + But if the build system has at least version 2 of libevent + installed, we'll use the version that is installed on the system. + Otherwise, we provide a copy of libevent that we know works. + + libopts is provided by GNU AutoGen, and that library and package + undergoes frequent API version updates. The version of autogen + used to generate the tables for the code must match the API + version in libopts. AutoGen can be ... difficult to build and + install, and very few developers really need it. So we have it + on our build and development machines, and we provide the + specific version of the libopts code in the distribution to make + sure that the proper API version of libopts is available. + + As for the point about there being code in these libraries that + NTP doesn't use, OK. But other packages used these libraries as + well, and it is reasonable to assume that other people are paying + attention to security and code quality issues for the overall + libraries. It takes significant resources to analyze and + customize these libraries to only include what we need, and to + date we believe the cost of this effort does not justify the benefit. + Credit: + This issue was discovered by Cure53. + +* NTP-01-005 NTP: Off-by-one in Oncore GPS Receiver (Low) + Date Resolved: 21 Mar 2017 + References: Sec 3380 + Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: None 0.0 (AV:L/AC:H/Au:N/C:N/I:N/A:N) + CVSS3: None 0.0 CVSS:3.0/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:N + Summary: + There is a fencepost error in a "recovery branch" of the code for + the Oncore GPS receiver if the communication link to the ONCORE + is weak / distorted and the decoding doesn't work. + Mitigation: + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page or + the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was discovered by Cure53. + +* NTP-01-004 NTP: Potential Overflows in ctl_put() functions (Medium) + Date Resolved: 21 Mar 2017 + References: Sec 3379 / CVE-2017-6458 / VU#325339 + Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C) + CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: + ntpd makes use of different wrappers around ctl_putdata() to + create name/value ntpq (mode 6) response strings. For example, + ctl_putstr() is usually used to send string data (variable names + or string data). The formatting code was missing a length check + for variable names. If somebody explicitly created any unusually + long variable names in ntpd (longer than 200-512 bytes, depending + on the type of variable), then if any of these variables are + added to the response list it would overflow a buffer. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + If you don't want to upgrade, then don't setvar variable names + longer than 200-512 bytes in your ntp.conf file. + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was discovered by Cure53. + +* NTP-01-003 NTP: Improper use of snprintf() in mx4200_send() (Low) + Date Resolved: 21 Mar 2017 + References: Sec 3378 / CVE-2017-6451 / VU#325339 + Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: LOW 0.8 (AV:L/AC:H/Au:M/C:N/I:N/A:P) + CVSS3: LOW 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N + Summary: + The legacy MX4200 refclock is only built if is specifically + enabled, and furthermore additional code changes are required to + compile and use it. But it uses the libc functions snprintf() + and vsnprintf() incorrectly, which can lead to an out-of-bounds + memory write due to an improper handling of the return value of + snprintf()/vsnprintf(). Since the return value is used as an + iterator and it can be larger than the buffer's size, it is + possible for the iterator to point somewhere outside of the + allocated buffer space. This results in an out-of-bound memory + write. This behavior can be leveraged to overwrite a saved + instruction pointer on the stack and gain control over the + execution flow. During testing it was not possible to identify + any malicious usage for this vulnerability. Specifically, no + way for an attacker to exploit this vulnerability was ultimately + unveiled. However, it has the potential to be exploited, so the + code should be fixed. + Mitigation, if you have a Magnavox MX4200 refclock: + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was discovered by Cure53. + +* NTP-01-002 NTP: Buffer Overflow in ntpq when fetching reslist from a + malicious ntpd (Medium) + Date Resolved: 21 Mar 2017 + References: Sec 3377 / CVE-2017-6460 / VU#325339 + Affects: All versions of ntpq, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: MED 4.9 (AV:N/AC:H/Au:S/C:N/I:N/A:C) + CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: + A stack buffer overflow in ntpq can be triggered by a malicious + ntpd server when ntpq requests the restriction list from the server. + This is due to a missing length check in the reslist() function. + It occurs whenever the function parses the server's response and + encounters a flagstr variable of an excessive length. The string + will be copied into a fixed-size buffer, leading to an overflow on + the function's stack-frame. Note well that this problem requires + a malicious server, and affects ntpq, not ntpd. + Mitigation: + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + If you can't upgrade your version of ntpq then if you want to know + the reslist of an instance of ntpd that you do not control, + know that if the target ntpd is malicious that it can send back + a response that intends to crash your ntpq process. + Credit: + This weakness was discovered by Cure53. + +* NTP-01-001 NTP: Makefile does not enforce Security Flags (Informational) + Date Resolved: 21 Mar 2017 + References: Sec 3376 + Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: N/A + CVSS3: N/A + Summary: + The build process for NTP has not, by default, provided compile + or link flags to offer "hardened" security options. Package + maintainers have always been able to provide hardening security + flags for their builds. As of ntp-4.2.8p10, the NTP build + system has a way to provide OS-specific hardening flags. Please + note that this is still not a really great solution because it + is specific to NTP builds. It's inefficient to have every + package supply, track and maintain this information for every + target build. It would be much better if there was a common way + for OSes to provide this information in a way that arbitrary + packages could benefit from it. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was reported by Cure53. + +* 0rigin DoS (Medium) + Date Resolved: 21 Mar 2017 + References: Sec 3361 / CVE-2016-9042 / VU#325339 + Affects: ntp-4.2.8p9 (21 Nov 2016), up to but not including ntp-4.2.8p10 + CVSS2: MED 4.9 (AV:N/AC:H/Au:N/C:N/I:N/A:C) (worst case) + CVSS3: MED 4.4 CVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H (worst case) + Summary: + An exploitable denial of service vulnerability exists in the + origin timestamp check functionality of ntpd 4.2.8p9. A specially + crafted unauthenticated network packet can be used to reset the + expected origin timestamp for target peers. Legitimate replies + from targeted peers will fail the origin timestamp check (TEST2) + causing the reply to be dropped and creating a denial of service + condition. This vulnerability can only be exploited if the + attacker can spoof all of the servers. + Mitigation: + Implement BCP-38. + Configure enough servers/peers that an attacker cannot target + all of your time sources. + Upgrade to 4.2.8p10, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart + ntpd (without -g) if it stops running. + Credit: + This weakness was discovered by Matthew Van Gundy of Cisco. + +Other fixes: + +* [Bug 3393] clang scan-build findings +* [Bug 3363] Support for openssl-1.1.0 without compatibility modes + - rework of patch set from . +* [Bug 3356] Bugfix 3072 breaks multicastclient +* [Bug 3216] libntp audio ioctl() args incorrectly cast to int + on 4.4BSD-Lite derived platforms + - original patch by Majdi S. Abbas +* [Bug 3215] 'make distcheck' fails with new BK repo format +* [Bug 3173] forking async worker: interrupted pipe I/O + - initial patch by Christos Zoulas +* [Bug 3139] (...) time_pps_create: Exec format error + - move loader API from 'inline' to proper source + - augment pathless dlls with absolute path to NTPD + - use 'msyslog()' instead of 'printf() 'for reporting trouble +* [Bug 3107] Incorrect Logic for Peer Event Limiting + - applied patch by Matthew Van Gundy +* [Bug 3065] Quiet warnings on NetBSD + - applied some of the patches provided by Havard. Not all of them + still match the current code base, and I did not touch libopt. +* [Bug 3062] Change the process name of forked DNS worker + - applied patch by Reinhard Max. See bugzilla for limitations. +* [Bug 2923] Trap Configuration Fail + - fixed dependency inversion from [Bug 2837] +* [Bug 2896] Nothing happens if minsane < maxclock < minclock + - produce ERROR log message about dysfunctional daemon. +* [Bug 2851] allow -4/-6 on restrict line with mask + - applied patch by Miroslav Lichvar for ntp4.2.6 compat +* [Bug 2645] out-of-bound pointers in ctl_putsys and decode_bitflags + - Fixed these and some more locations of this pattern. + Probably din't get them all, though. +* Update copyright year. + +-- +(4.2.8p9-win) 2017/02/01 Released by Harlan Stenn + +* [Bug 3144] NTP does not build without openSSL. + - added missed changeset for automatic openssl lib detection + - fixed some minor warning issues +* [Bug 3095] More compatibility with openssl 1.1. +* configure.ac cleanup. stenn@ntp.org +* openssl configure cleanup. stenn@ntp.org + +-- +NTP 4.2.8p9 (Harlan Stenn , 2016/11/21) + +Focus: Security, Bug fixes, enhancements. + +Severity: HIGH + +In addition to bug fixes and enhancements, this release fixes the +following 1 high- (Windows only), 2 medium-, 2 medium-/low, and +5 low-severity vulnerabilities, and provides 28 other non-security +fixes and improvements: + +* Trap crash + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3119 / CVE-2016-9311 / VU#633847 + Affects: ntp-4.0.90 (21 July 1999), possibly earlier, up to but not + including 4.2.8p9, and ntp-4.3.0 up to but not including ntp-4.3.94. + CVSS2: MED 4.9 (AV:N/AC:H/Au:N/C:N/I:N/A:C) + CVSS3: MED 4.4 CVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H + Summary: + ntpd does not enable trap service by default. If trap service + has been explicitly enabled, an attacker can send a specially + crafted packet to cause a null pointer dereference that will + crash ntpd, resulting in a denial of service. + Mitigation: + Implement BCP-38. + Use "restrict default noquery ..." in your ntp.conf file. Only + allow mode 6 queries from trusted networks and hosts. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Matthew Van Gundy of Cisco. + +* Mode 6 information disclosure and DDoS vector + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3118 / CVE-2016-9310 / VU#633847 + Affects: ntp-4.0.90 (21 July 1999), possibly earlier, up to but not + including 4.2.8p9, and ntp-4.3.0 up to but not including ntp-4.3.94. + CVSS2: MED 6.4 (AV:A/AC:L/Au:N/C:N/I:N/A:P) + CVSS3: MED 6.5 CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: + An exploitable configuration modification vulnerability exists + in the control mode (mode 6) functionality of ntpd. If, against + long-standing BCP recommendations, "restrict default noquery ..." + is not specified, a specially crafted control mode packet can set + ntpd traps, providing information disclosure and DDoS + amplification, and unset ntpd traps, disabling legitimate + monitoring. A remote, unauthenticated, network attacker can + trigger this vulnerability. + Mitigation: + Implement BCP-38. + Use "restrict default noquery ..." in your ntp.conf file. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Matthew Van Gundy of Cisco. + +* Broadcast Mode Replay Prevention DoS + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3114 / CVE-2016-7427 / VU#633847 + Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p9, and + ntp-4.3.90 up to, but not including ntp-4.3.94. + CVSS2: LOW 3.3 (AV:A/AC:L/Au:N/C:N/I:N/A:P) + CVSS3: MED 4.3 CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: + The broadcast mode of NTP is expected to only be used in a + trusted network. If the broadcast network is accessible to an + attacker, a potentially exploitable denial of service + vulnerability in ntpd's broadcast mode replay prevention + functionality can be abused. An attacker with access to the NTP + broadcast domain can periodically inject specially crafted + broadcast mode NTP packets into the broadcast domain which, + while being logged by ntpd, can cause ntpd to reject broadcast + mode packets from legitimate NTP broadcast servers. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Matthew Van Gundy of Cisco. + +* Broadcast Mode Poll Interval Enforcement DoS + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3113 / CVE-2016-7428 / VU#633847 + Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p9, and + ntp-4.3.90 up to, but not including ntp-4.3.94 + CVSS2: LOW 3.3 (AV:A/AC:L/Au:N/C:N/I:N/A:P) + CVSS3: MED 4.3 CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: + The broadcast mode of NTP is expected to only be used in a + trusted network. If the broadcast network is accessible to an + attacker, a potentially exploitable denial of service + vulnerability in ntpd's broadcast mode poll interval enforcement + functionality can be abused. To limit abuse, ntpd restricts the + rate at which each broadcast association will process incoming + packets. ntpd will reject broadcast mode packets that arrive + before the poll interval specified in the preceding broadcast + packet expires. An attacker with access to the NTP broadcast + domain can send specially crafted broadcast mode NTP packets to + the broadcast domain which, while being logged by ntpd, will + cause ntpd to reject broadcast mode packets from legitimate NTP + broadcast servers. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Matthew Van Gundy of Cisco. + +* Windows: ntpd DoS by oversized UDP packet + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3110 / CVE-2016-9312 / VU#633847 + Affects Windows only: ntp-4.?.?, up to but not including ntp-4.2.8p9, + and ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C) + CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H + Summary: + If a vulnerable instance of ntpd on Windows receives a crafted + malicious packet that is "too big", ntpd will stop working. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Robert Pajak of ABB. + +* 0rigin (zero origin) issues + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3102 / CVE-2016-7431 / VU#633847 + Affects: ntp-4.2.8p8, and ntp-4.3.93. + CVSS2: MED 5.0 (AV:N/AC:L/Au:N/C:N/I:P/A:N) + CVSS3: MED 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N + Summary: + Zero Origin timestamp problems were fixed by Bug 2945 in + ntp-4.2.8p6. However, subsequent timestamp validation checks + introduced a regression in the handling of some Zero origin + timestamp checks. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Sharon Goldberg and Aanchal + Malhotra of Boston University. + +* read_mru_list() does inadequate incoming packet checks + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3082 / CVE-2016-7434 / VU#633847 + Affects: ntp-4.2.7p22, up to but not including ntp-4.2.8p9, and + ntp-4.3.0 up to, but not including ntp-4.3.94. + CVSS2: LOW 3.8 (AV:L/AC:H/Au:S/C:N/I:N/A:C) + CVSS3: LOW 3.8 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: + If ntpd is configured to allow mrulist query requests from a + server that sends a crafted malicious packet, ntpd will crash + on receipt of that crafted malicious mrulist query packet. + Mitigation: + Only allow mrulist query packets from trusted hosts. + Implement BCP-38. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Magnus Stubman. + +* Attack on interface selection + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3072 / CVE-2016-7429 / VU#633847 + Affects: ntp-4.2.7p385, up to but not including ntp-4.2.8p9, and + ntp-4.3.0 up to, but not including ntp-4.3.94 + CVSS2: LOW 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P) + CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L + Summary: + When ntpd receives a server response on a socket that corresponds + to a different interface than was used for the request, the peer + structure is updated to use the interface for new requests. If + ntpd is running on a host with multiple interfaces in separate + networks and the operating system doesn't check source address in + received packets (e.g. rp_filter on Linux is set to 0), an + attacker that knows the address of the source can send a packet + with spoofed source address which will cause ntpd to select wrong + interface for the source and prevent it from sending new requests + until the list of interfaces is refreshed, which happens on + routing changes or every 5 minutes by default. If the attack is + repeated often enough (once per second), ntpd will not be able to + synchronize with the source. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + If you are going to configure your OS to disable source address + checks, also configure your firewall configuration to control + what interfaces can receive packets from what networks. + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +* Client rate limiting and server responses + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3071 / CVE-2016-7426 / VU#633847 + Affects: ntp-4.2.5p203, up to but not including ntp-4.2.8p9, and + ntp-4.3.0 up to, but not including ntp-4.3.94 + CVSS2: LOW 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P) + CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L + Summary: + When ntpd is configured with rate limiting for all associations + (restrict default limited in ntp.conf), the limits are applied + also to responses received from its configured sources. An + attacker who knows the sources (e.g., from an IPv4 refid in + server response) and knows the system is (mis)configured in this + way can periodically send packets with spoofed source address to + keep the rate limiting activated and prevent ntpd from accepting + valid responses from its sources. + + While this blanket rate limiting can be useful to prevent + brute-force attacks on the origin timestamp, it allows this DoS + attack. Similarly, it allows the attacker to prevent mobilization + of ephemeral associations. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +* Fix for bug 2085 broke initial sync calculations + Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016 + References: Sec 3067 / CVE-2016-7433 / VU#633847 + Affects: ntp-4.2.7p385, up to but not including ntp-4.2.8p9, and + ntp-4.3.0 up to, but not including ntp-4.3.94. But the + root-distance calculation in general is incorrect in all versions + of ntp-4 until this release. + CVSS2: LOW 1.2 (AV:L/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L + Summary: + Bug 2085 described a condition where the root delay was included + twice, causing the jitter value to be higher than expected. Due + to a misinterpretation of a small-print variable in The Book, the + fix for this problem was incorrect, resulting in a root distance + that did not include the peer dispersion. The calculations and + formulae have been reviewed and reconciled, and the code has been + updated accordingly. + Mitigation: + Upgrade to 4.2.8p9, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered independently by Brian Utterback of + Oracle, and Sharon Goldberg and Aanchal Malhotra of Boston University. + +Other fixes: + +* [Bug 3142] bug in netmask prefix length detection +* [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org +* [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - moved retry decision where it belongs. +* [Bug 3125] NTPD doesn't fully start when ntp.conf entries are out of order + using the loopback-ppsapi-provider.dll +* [Bug 3116] unit tests for NTP time stamp expansion. +* [Bug 3100] ntpq can't retrieve daemon_version + - fixed extended sysvar lookup (bug introduced with bug 3008 fix) +* [Bug 3095] Compatibility with openssl 1.1 + - applied patches by Kurt Roeckx to source + - added shim layer for SSL API calls with issues (both directions) +* [Bug 3089] Serial Parser does not work anymore for hopfser like device + - simplified / refactored hex-decoding in driver. +* [Bug 3084] update-leap mis-parses the leapfile name. HStenn. +* [Bug 3068] Linker warnings when building on Solaris. perlinger@ntp.org + - applied patch thanks to Andrew Stormont +* [Bug 3067] Root distance calculation needs improvement. HStenn +* [Bug 3066] NMEA clock ignores pps. perlinger@ntp.org + - PPS-HACK works again. +* [Bug 3059] Potential buffer overrun from oversized hash + - applied patch by Brian Utterback +* [Bug 3053] ntp_loopfilter.c frequency calc precedence error. Sarah White. +* [Bug 3050] Fix for bug #2960 causes [...] spurious error message. + + - patches by Reinhard Max and Havard Eidnes +* [Bug 3047] Fix refclock_jjy C-DEX JST2000. abe@ntp.org + - Patch provided by Kuramatsu. +* [Bug 3021] unity_fixture.c needs pragma weak + - removed unnecessary & harmful decls of 'setUp()' & 'tearDown()' +* [Bug 3019] Windows: ERROR_HOST_UNREACHABLE block packet processing. DMayer +* [Bug 2998] sntp/tests/packetProcessing.c broken without openssl. JPerlinger +* [Bug 2961] sntp/tests/packetProcessing.c assumes AUTOKEY. HStenn. +* [Bug 2959] refclock_jupiter: gps week correction + - fixed GPS week expansion to work based on build date. Special thanks + to Craig Leres for initial patch and testing. +* [Bug 2951] ntpd tests fail: multiple definition of `send_via_ntp_signd' + - fixed Makefile.am +* [Bug 2689] ATOM driver processes last PPS pulse at startup, + even if it is very old + - make sure PPS source is alive before processing samples + - improve stability close to the 500ms phase jump (phase gate) +* Fix typos in include/ntp.h. +* Shim X509_get_signature_nid() if needed +* git author attribution cleanup +* bk ignore file cleanup +* remove locks in Windows IO, use rpc-like thread synchronisation instead + +--- +NTP 4.2.8p8 (Harlan Stenn , 2016/06/02) + +Focus: Security, Bug fixes, enhancements. + +Severity: HIGH + +In addition to bug fixes and enhancements, this release fixes the +following 1 high- and 4 low-severity vulnerabilities: + +* CRYPTO_NAK crash + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3046 / CVE-2016-4957 / VU#321640 + Affects: ntp-4.2.8p7, and ntp-4.3.92. + CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C) + CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H + Summary: The fix for Sec 3007 in ntp-4.2.8p7 contained a bug that + could cause ntpd to crash. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + If you cannot upgrade from 4.2.8p7, the only other alternatives + are to patch your code or filter CRYPTO_NAK packets. + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Nicolas Edet of Cisco. + +* Bad authentication demobilizes ephemeral associations + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3045 / CVE-2016-4953 / VU#321640 + Affects: ntp-4, up to but not including ntp-4.2.8p8, and + ntp-4.3.0 up to, but not including ntp-4.3.93. + CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: An attacker who knows the origin timestamp and can send a + spoofed packet containing a CRYPTO-NAK to an ephemeral peer + target before any other response is sent can demobilize that + association. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +* Processing spoofed server packets + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3044 / CVE-2016-4954 / VU#321640 + Affects: ntp-4, up to but not including ntp-4.2.8p8, and + ntp-4.3.0 up to, but not including ntp-4.3.93. + CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: An attacker who is able to spoof packets with correct origin + timestamps from enough servers before the expected response + packets arrive at the target machine can affect some peer + variables and, for example, cause a false leap indication to be set. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Jakub Prokes of Red Hat. + +* Autokey association reset + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3043 / CVE-2016-4955 / VU#321640 + Affects: ntp-4, up to but not including ntp-4.2.8p8, and + ntp-4.3.0 up to, but not including ntp-4.3.93. + CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: An attacker who is able to spoof a packet with a correct + origin timestamp before the expected response packet arrives at + the target machine can send a CRYPTO_NAK or a bad MAC and cause + the association's peer variables to be cleared. If this can be + done often enough, it will prevent that association from working. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +* Broadcast interleave + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3042 / CVE-2016-4956 / VU#321640 + Affects: ntp-4, up to but not including ntp-4.2.8p8, and + ntp-4.3.0 up to, but not including ntp-4.3.93. + CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: The fix for NtpBug2978 does not cover broadcast associations, + so broadcast clients can be triggered to flip into interleave mode. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +Other fixes: +* [Bug 3038] NTP fails to build in VS2015. perlinger@ntp.org + - provide build environment + - 'wint_t' and 'struct timespec' defined by VS2015 + - fixed print()/scanf() format issues +* [Bug 3052] Add a .gitignore file. Edmund Wong. +* [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite. +* [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback, + JPerlinger, HStenn. +* Fix typo in ntp-wait and plot_summary. HStenn. +* Make sure we have an "author" file for git imports. HStenn. +* Update the sntp problem tests for MacOS. HStenn. + +--- +NTP 4.2.8p7 (Harlan Stenn , 2016/04/26) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +When building NTP from source, there is a new configure option +available, --enable-dynamic-interleave. More information on this below. + +Also note that ntp-4.2.8p7 logs more "unexpected events" than previous +versions of ntp. These events have almost certainly happened in the +past, it's just that they were silently counted and not logged. With +the increasing awareness around security, we feel it's better to clearly +log these events to help detect abusive behavior. This increased +logging can also help detect other problems, too. + +In addition to bug fixes and enhancements, this release fixes the +following 9 low- and medium-severity vulnerabilities: + +* Improve NTP security against buffer comparison timing attacks, + AKA: authdecrypt-timing + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 2879 / CVE-2016-1550 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92 + CVSSv2: LOW 2.6 - (AV:L/AC:H/Au:N/C:P/I:P/A:N) + CVSSv3: MED 4.0 - CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N + Summary: Packet authentication tests have been performed using + memcmp() or possibly bcmp(), and it is potentially possible + for a local or perhaps LAN-based attacker to send a packet with + an authentication payload and indirectly observe how much of + the digest has matched. + Mitigation: + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Properly monitor your ntpd instances. + Credit: This weakness was discovered independently by Loganaden + Velvindron, and Matthew Van Gundy and Stephen Gray of Cisco ASIG. + +* Zero origin timestamp bypass: Additional KoD checks. + References: Sec 2945 / Sec 2901 / CVE-2015-8138 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, + Summary: Improvements to the fixes incorporated in t 4.2.8p6 and 4.3.92. + +* peer associations were broken by the fix for NtpBug2899 + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 2952 / CVE-2015-7704 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92 + CVSSv2: MED 4.3 - (AV:N/AC:M/Au:N/C:N/I:N/A:P) + Summary: The fix for NtpBug2952 in ntp-4.2.8p5 to address broken peer + associations did not address all of the issues. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + If you can't upgrade, use "server" associations instead of + "peer" associations. + Monitor your ntpd instances. + Credit: This problem was discovered by Michael Tatarinov. + +* Validate crypto-NAKs, AKA: CRYPTO-NAK DoS + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 3007 / CVE-2016-1547 / VU#718152 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92 + CVSS2: MED 4.3 - (AV:N/AC:M/Au:N/C:N/I:N/A:P) + CVSS3: MED 3.7 - CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: For ntp-4 versions up to but not including ntp-4.2.8p7, an + off-path attacker can cause a preemptable client association to + be demobilized by sending a crypto NAK packet to a victim client + with a spoofed source address of an existing associated peer. + This is true even if authentication is enabled. + + Furthermore, if the attacker keeps sending crypto NAK packets, + for example one every second, the victim never has a chance to + reestablish the association and synchronize time with that + legitimate server. + + For ntp-4.2.8 thru ntp-4.2.8p6 there is less risk because more + stringent checks are performed on incoming packets, but there + are still ways to exploit this vulnerability in versions before + ntp-4.2.8p7. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances + Credit: This weakness was discovered by Stephen Gray and + Matthew Van Gundy of Cisco ASIG. + +* ctl_getitem() return value not always checked + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 3008 / CVE-2016-2519 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92 + CVSSv2: MED 4.9 - (AV:N/AC:H/Au:S/C:N/I:N/A:C) + CVSSv3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: ntpq and ntpdc can be used to store and retrieve information + in ntpd. It is possible to store a data value that is larger + than the size of the buffer that the ctl_getitem() function of + ntpd uses to report the return value. If the length of the + requested data value returned by ctl_getitem() is too large, + the value NULL is returned instead. There are 2 cases where the + return value from ctl_getitem() was not directly checked to make + sure it's not NULL, but there are subsequent INSIST() checks + that make sure the return value is not NULL. There are no data + values ordinarily stored in ntpd that would exceed this buffer + length. But if one has permission to store values and one stores + a value that is "too large", then ntpd will abort if an attempt + is made to read that oversized value. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Yihan Lian of the Cloud + Security Team, Qihoo 360. + +* Crafted addpeer with hmode > 7 causes array wraparound with MATCH_ASSOC + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 3009 / CVE-2016-2518 / VU#718152 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92 + CVSS2: LOW 2.1 - (AV:N/AC:H/Au:S/C:N/I:N/A:P) + CVSS3: LOW 2.0 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L + Summary: Using a crafted packet to create a peer association with + hmode > 7 causes the MATCH_ASSOC() lookup to make an + out-of-bounds reference. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances + Credit: This weakness was discovered by Yihan Lian of the Cloud + Security Team, Qihoo 360. + +* remote configuration trustedkey/requestkey/controlkey values are not + properly validated + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 3010 / CVE-2016-2517 / VU#718152 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92 + CVSS2: MED 4.9 - (AV:N/AC:H/Au:S/C:N/I:N/A:C) + CVSS3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: If ntpd was expressly configured to allow for remote + configuration, a malicious user who knows the controlkey for + ntpq or the requestkey for ntpdc (if mode7 is expressly enabled) + can create a session with ntpd and then send a crafted packet to + ntpd that will change the value of the trustedkey, controlkey, + or requestkey to a value that will prevent any subsequent + authentication with ntpd until ntpd is restarted. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances + Credit: This weakness was discovered by Yihan Lian of the Cloud + Security Team, Qihoo 360. + +* Duplicate IPs on unconfig directives will cause an assertion botch in ntpd + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 3011 / CVE-2016-2516 / VU#718152 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92 + CVSS2: MED 6.3 - (AV:N/AC:M/Au:S/C:N/I:N/A:C) + CVSS3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H + Summary: If ntpd was expressly configured to allow for remote + configuration, a malicious user who knows the controlkey for + ntpq or the requestkey for ntpdc (if mode7 is expressly enabled) + can create a session with ntpd and if an existing association is + unconfigured using the same IP twice on the unconfig directive + line, ntpd will abort. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances + Credit: This weakness was discovered by Yihan Lian of the Cloud + Security Team, Qihoo 360. + +* Refclock impersonation vulnerability + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 3020 / CVE-2016-1551 + Affects: On a very limited number of OSes, all NTP releases up to but + not including 4.2.8p7, and 4.3.0 up to but not including 4.3.92. + By "very limited number of OSes" we mean no general-purpose OSes + have yet been identified that have this vulnerability. + CVSSv2: LOW 2.6 - (AV:N/AC:H/Au:N/C:N/I:P/A:N) + CVSSv3: LOW 3.7 - CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N + Summary: While most OSes implement martian packet filtering in their + network stack, at least regarding 127.0.0.0/8, some will allow + packets claiming to be from 127.0.0.0/8 that arrive over a + physical network. On these OSes, if ntpd is configured to use a + reference clock an attacker can inject packets over the network + that look like they are coming from that reference clock. + Mitigation: + Implement martian packet filtering and BCP-38. + Configure ntpd to use an adequate number of time sources. + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + If you are unable to upgrade and if you are running an OS that + has this vulnerability, implement martian packet filters and + lobby your OS vendor to fix this problem, or run your + refclocks on computers that use OSes that are not vulnerable + to these attacks and have your vulnerable machines get their + time from protected resources. + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Matt Street and others of + Cisco ASIG. + +The following issues were fixed in earlier releases and contain +improvements in 4.2.8p7: + +* Clients that receive a KoD should validate the origin timestamp field. + References: Sec 2901 / CVE-2015-7704, CVE-2015-7705 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, + Summary: Improvements to the fixes incorporated into 4.2.8p4 and 4.3.77. + +* Skeleton key: passive server with trusted key can serve time. + References: Sec 2936 / CVE-2015-7974 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, + Summary: Improvements to the fixes incorporated in t 4.2.8p6 and 4.3.90. + +Two other vulnerabilities have been reported, and the mitigations +for these are as follows: + +* Interleave-pivot + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 2978 / CVE-2016-1548 + Affects: All ntp-4 releases. + CVSSv2: MED 6.4 - (AV:N/AC:L/Au:N/C:N/I:P/A:P) + CVSSv3: MED 7.2 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L + Summary: It is possible to change the time of an ntpd client or deny + service to an ntpd client by forcing it to change from basic + client/server mode to interleaved symmetric mode. An attacker + can spoof a packet from a legitimate ntpd server with an origin + timestamp that matches the peer->dst timestamp recorded for that + server. After making this switch, the client will reject all + future legitimate server responses. It is possible to force the + victim client to move time after the mode has been changed. + ntpq gives no indication that the mode has been switched. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p7, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. These + versions will not dynamically "flip" into interleave mode + unless configured to do so. + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Miroslav Lichvar of RedHat + and separately by Jonathan Gardner of Cisco ASIG. + +* Sybil vulnerability: ephemeral association attack + Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + References: Sec 3012 / CVE-2016-1549 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92 + CVSSv2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N) + CVSS3v: MED 5.3 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N + Summary: ntpd can be vulnerable to Sybil attacks. If one is not using + the feature introduced in ntp-4.2.8p6 allowing an optional 4th + field in the ntp.keys file to specify which IPs can serve time, + a malicious authenticated peer can create arbitrarily-many + ephemeral associations in order to win the clock selection of + ntpd and modify a victim's clock. + Mitigation: + Implement BCP-38. + Use the 4th field in the ntp.keys file to specify which IPs + can be time servers. + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Matthew Van Gundy of Cisco ASIG. + +Other fixes: + +* [Bug 2831] Segmentation Fault in DNS lookup during startup. perlinger@ntp.org + - fixed yet another race condition in the threaded resolver code. +* [Bug 2858] bool support. Use stdbool.h when available. HStenn. +* [Bug 2879] Improve NTP security against timing attacks. perlinger@ntp.org + - integrated patches by Loganaden Velvidron + with some modifications & unit tests +* [Bug 2960] async name resolution fixes for chroot() environments. + Reinhard Max. +* [Bug 2994] Systems with HAVE_SIGNALED_IO fail to compile. perlinger@ntp.org +* [Bug 2995] Fixes to compile on Windows +* [Bug 2999] out-of-bounds access in 'is_safe_filename()'. perlinger@ntp.org +* [Bug 3013] Fix for ssl_init.c SHA1 test. perlinger@ntp.org + - Patch provided by Ch. Weisgerber +* [Bug 3015] ntpq: config-from-file: "request contains an unprintable character" + - A change related to [Bug 2853] forbids trailing white space in + remote config commands. perlinger@ntp.org +* [Bug 3019] NTPD stops processing packets after ERROR_HOST_UNREACHABLE + - report and patch from Aleksandr Kostikov. + - Overhaul of Windows IO completion port handling. perlinger@ntp.org +* [Bug 3022] authkeys.c should be refactored. perlinger@ntp.org + - fixed memory leak in access list (auth[read]keys.c) + - refactored handling of key access lists (auth[read]keys.c) + - reduced number of error branches (authreadkeys.c) +* [Bug 3023] ntpdate cannot correct dates in the future. perlinger@ntp.org +* [Bug 3030] ntpq needs a general way to specify refid output format. HStenn. +* [Bug 3031] ntp broadcastclient unable to synchronize to an server + when the time of server changed. perlinger@ntp.org + - Check the initial delay calculation and reject/unpeer the broadcast + server if the delay exceeds 50ms. Retry again after the next + broadcast packet. +* [Bug 3036] autokey trips an INSIST in authistrustedip(). Harlan Stenn. +* Document ntp.key's optional IP list in authenetic.html. Harlan Stenn. +* Update html/xleave.html documentation. Harlan Stenn. +* Update ntp.conf documentation. Harlan Stenn. +* Fix some Credit: attributions in the NEWS file. Harlan Stenn. +* Fix typo in html/monopt.html. Harlan Stenn. +* Add README.pullrequests. Harlan Stenn. +* Cleanup to include/ntp.h. Harlan Stenn. + +New option to 'configure': + +While looking in to the issues around Bug 2978, the "interleave pivot" +issue, it became clear that there are some intricate and unresolved +issues with interleave operations. We also realized that the interleave +protocol was never added to the NTPv4 Standard, and it should have been. + +Interleave mode was first released in July of 2008, and can be engaged +in two ways. Any 'peer' and 'broadcast' lines in the ntp.conf file may +contain the 'xleave' option, which will expressly enable interlave mode +for that association. Additionally, if a time packet arrives and is +found inconsistent with normal protocol behavior but has certain +characteristics that are compatible with interleave mode, NTP will +dynamically switch to interleave mode. With sufficient knowledge, an +attacker can send a crafted forged packet to an NTP instance that +triggers only one side to enter interleaved mode. + +To prevent this attack until we can thoroughly document, describe, +fix, and test the dynamic interleave mode, we've added a new +'configure' option to the build process: + + --enable-dynamic-interleave + +This option controls whether or not NTP will, if conditions are right, +engage dynamic interleave mode. Dynamic interleave mode is disabled by +default in ntp-4.2.8p7. + +--- +NTP 4.2.8p6 (Harlan Stenn , 2016/01/20) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +In addition to bug fixes and enhancements, this release fixes the +following 1 low- and 8 medium-severity vulnerabilities: + +* Potential Infinite Loop in 'ntpq' + Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016 + References: Sec 2548 / CVE-2015-8158 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS2: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM + CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N Base Score: 5.3 - MEDIUM + Summary: 'ntpq' processes incoming packets in a loop in 'getresponse()'. + The loop's only stopping conditions are receiving a complete and + correct response or hitting a small number of error conditions. + If the packet contains incorrect values that don't trigger one of + the error conditions, the loop continues to receive new packets. + Note well, this is an attack against an instance of 'ntpq', not + 'ntpd', and this attack requires the attacker to do one of the + following: + * Own a malicious NTP server that the client trusts + * Prevent a legitimate NTP server from sending packets to + the 'ntpq' client + * MITM the 'ntpq' communications between the 'ntpq' client + and the NTP server + Mitigation: + Upgrade to 4.2.8p6, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Credit: This weakness was discovered by Jonathan Gardner of Cisco ASIG. + +* 0rigin: Zero Origin Timestamp Bypass + Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016 + References: Sec 2945 / CVE-2015-8138 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS2: (AV:N/AC:L/Au:N/C:N/I:P/A:N) Base Score: 5.0 - MEDIUM + CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N Base Score: 5.3 - MEDIUM + (3.7 - LOW if you score AC:L) + Summary: To distinguish legitimate peer responses from forgeries, a + client attempts to verify a response packet by ensuring that the + origin timestamp in the packet matches the origin timestamp it + transmitted in its last request. A logic error exists that + allows packets with an origin timestamp of zero to bypass this + check whenever there is not an outstanding request to the server. + Mitigation: + Configure 'ntpd' to get time from multiple sources. + Upgrade to 4.2.8p6, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Monitor your 'ntpd' instances. + Credit: This weakness was discovered by Matthey Van Gundy and + Jonathan Gardner of Cisco ASIG. + +* Stack exhaustion in recursive traversal of restriction list + Date Resolved: Stable (4.2.8p6) 19 Jan 2016 + References: Sec 2940 / CVE-2015-7978 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM + Summary: An unauthenticated 'ntpdc reslist' command can cause a + segmentation fault in ntpd by exhausting the call stack. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p6, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + If you are unable to upgrade: + In ntp-4.2.8, mode 7 is disabled by default. Don't enable it. + If you must enable mode 7: + configure the use of a 'requestkey' to control who can + issue mode 7 requests. + configure 'restrict noquery' to further limit mode 7 + requests to trusted sources. + Monitor your ntpd instances. + Credit: This weakness was discovered by Stephen Gray at Cisco ASIG. + +* Off-path Denial of Service (!DoS) attack on authenticated broadcast mode + Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016 + References: Sec 2942 / CVE-2015-7979 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS: (AV:N/AC:M/Au:N/C:N/I:P/A:P) Base Score: 5.8 + Summary: An off-path attacker can send broadcast packets with bad + authentication (wrong key, mismatched key, incorrect MAC, etc) + to broadcast clients. It is observed that the broadcast client + tears down the association with the broadcast server upon + receiving just one bad packet. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p6, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Monitor your 'ntpd' instances. + If this sort of attack is an active problem for you, you have + deeper problems to investigate. In this case also consider + having smaller NTP broadcast domains. + Credit: This weakness was discovered by Aanchal Malhotra of Boston + University. + +* reslist NULL pointer dereference + Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016 + References: Sec 2939 / CVE-2015-7977 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM + Summary: An unauthenticated 'ntpdc reslist' command can cause a + segmentation fault in ntpd by causing a NULL pointer dereference. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p6, or later, from NTP Project Download Page or + the NTP Public Services Project Download Page. + If you are unable to upgrade: + mode 7 is disabled by default. Don't enable it. + If you must enable mode 7: + configure the use of a 'requestkey' to control who can + issue mode 7 requests. + configure 'restrict noquery' to further limit mode 7 + requests to trusted sources. + Monitor your ntpd instances. + Credit: This weakness was discovered by Stephen Gray of Cisco ASIG. + +* 'ntpq saveconfig' command allows dangerous characters in filenames. + Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016 + References: Sec 2938 / CVE-2015-7976 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS: (AV:N/AC:L/Au:S/C:N/I:P/A:N) Base Score: 4.0 - MEDIUM + Summary: The ntpq saveconfig command does not do adequate filtering + of special characters from the supplied filename. + Note well: The ability to use the saveconfig command is controlled + by the 'restrict nomodify' directive, and the recommended default + configuration is to disable this capability. If the ability to + execute a 'saveconfig' is required, it can easily (and should) be + limited and restricted to a known small number of IP addresses. + Mitigation: + Implement BCP-38. + use 'restrict default nomodify' in your 'ntp.conf' file. + Upgrade to 4.2.8p6, or later, from the NTP Project Download Page. + If you are unable to upgrade: + build NTP with 'configure --disable-saveconfig' if you will + never need this capability, or + use 'restrict default nomodify' in your 'ntp.conf' file. Be + careful about what IPs have the ability to send 'modify' + requests to 'ntpd'. + Monitor your ntpd instances. + 'saveconfig' requests are logged to syslog - monitor your syslog files. + Credit: This weakness was discovered by Jonathan Gardner of Cisco ASIG. + +* nextvar() missing length check in ntpq + Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016 + References: Sec 2937 / CVE-2015-7975 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS: (AV:L/AC:H/Au:N/C:N/I:N/A:P) Base Score: 1.2 - LOW + If you score A:C, this becomes 4.0. + CVSSv3: (CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L) Base Score 2.9, LOW + Summary: ntpq may call nextvar() which executes a memcpy() into the + name buffer without a proper length check against its maximum + length of 256 bytes. Note well that we're taking about ntpq here. + The usual worst-case effect of this vulnerability is that the + specific instance of ntpq will crash and the person or process + that did this will have stopped themselves. + Mitigation: + Upgrade to 4.2.8p6, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + If you are unable to upgrade: + If you have scripts that feed input to ntpq make sure there are + some sanity checks on the input received from the "outside". + This is potentially more dangerous if ntpq is run as root. + Credit: This weakness was discovered by Jonathan Gardner at Cisco ASIG. + +* Skeleton Key: Any trusted key system can serve time + Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016 + References: Sec 2936 / CVE-2015-7974 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS: (AV:N/AC:H/Au:S/C:N/I:C/A:N) Base Score: 4.9 + Summary: Symmetric key encryption uses a shared trusted key. The + reported title for this issue was "Missing key check allows + impersonation between authenticated peers" and the report claimed + "A key specified only for one server should only work to + authenticate that server, other trusted keys should be refused." + Except there has never been any correlation between this trusted + key and server v. clients machines and there has never been any + way to specify a key only for one server. We have treated this as + an enhancement request, and ntp-4.2.8p6 includes other checks and + tests to strengthen clients against attacks coming from broadcast + servers. + Mitigation: + Implement BCP-38. + If this scenario represents a real or a potential issue for you, + upgrade to 4.2.8p6, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page, and + use the new field in the ntp.keys file that specifies the list + of IPs that are allowed to serve time. Note that this alone + will not protect against time packets with forged source IP + addresses, however other changes in ntp-4.2.8p6 provide + significant mitigation against broadcast attacks. MITM attacks + are a different story. + If you are unable to upgrade: + Don't use broadcast mode if you cannot monitor your client + servers. + If you choose to use symmetric keys to authenticate time + packets in a hostile environment where ephemeral time + servers can be created, or if it is expected that malicious + time servers will participate in an NTP broadcast domain, + limit the number of participating systems that participate + in the shared-key group. + Monitor your ntpd instances. + Credit: This weakness was discovered by Matt Street of Cisco ASIG. + +* Deja Vu: Replay attack on authenticated broadcast mode + Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016 + References: Sec 2935 / CVE-2015-7973 + Affects: All ntp-4 releases up to, but not including 4.2.8p6, and + 4.3.0 up to, but not including 4.3.90 + CVSS: (AV:A/AC:M/Au:N/C:N/I:P/A:P) Base Score: 4.3 - MEDIUM + Summary: If an NTP network is configured for broadcast operations then + either a man-in-the-middle attacker or a malicious participant + that has the same trusted keys as the victim can replay time packets. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p6, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + If you are unable to upgrade: + Don't use broadcast mode if you cannot monitor your client servers. + Monitor your ntpd instances. + Credit: This weakness was discovered by Aanchal Malhotra of Boston + University. + +Other fixes: + +* [Bug 2772] adj_systime overflows tv_usec. perlinger@ntp.org +* [Bug 2814] msyslog deadlock when signaled. perlinger@ntp.org + - applied patch by shenpeng11@huawei.com with minor adjustments +* [Bug 2882] Look at ntp_request.c:list_peers_sum(). perlinger@ntp.org +* [Bug 2891] Deadlock in deferred DNS lookup framework. perlinger@ntp.org +* [Bug 2892] Several test cases assume IPv6 capabilities even when + IPv6 is disabled in the build. perlinger@ntp.org + - Found this already fixed, but validation led to cleanup actions. +* [Bug 2905] DNS lookups broken. perlinger@ntp.org + - added limits to stack consumption, fixed some return code handling +* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call + - changed stacked/nested handling of CTRL-C. perlinger@ntp.org + - make CTRL-C work for retrieval and printing od MRU list. perlinger@ntp.org +* [Bug 2980] reduce number of warnings. perlinger@ntp.org + - integrated several patches from Havard Eidnes (he@uninett.no) +* [Bug 2985] bogus calculation in authkeys.c perlinger@ntp.org + - implement 'auth_log2()' using integer bithack instead of float calculation +* Make leapsec_query debug messages less verbose. Harlan Stenn. + +--- +NTP 4.2.8p5 (Harlan Stenn , 2016/01/07) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +In addition to bug fixes and enhancements, this release fixes the +following medium-severity vulnerability: + +* Small-step/big-step. Close the panic gate earlier. + References: Sec 2956, CVE-2015-5300 + Affects: All ntp-4 releases up to, but not including 4.2.8p5, and + 4.3.0 up to, but not including 4.3.78 + CVSS3: (AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:N/A:L) Base Score: 4.0, MEDIUM + Summary: If ntpd is always started with the -g option, which is + common and against long-standing recommendation, and if at the + moment ntpd is restarted an attacker can immediately respond to + enough requests from enough sources trusted by the target, which + is difficult and not common, there is a window of opportunity + where the attacker can cause ntpd to set the time to an + arbitrary value. Similarly, if an attacker is able to respond + to enough requests from enough sources trusted by the target, + the attacker can cause ntpd to abort and restart, at which + point it can tell the target to set the time to an arbitrary + value if and only if ntpd was re-started against long-standing + recommendation with the -g flag, or if ntpd was not given the + -g flag, the attacker can move the target system's time by at + most 900 seconds' time per attack. + Mitigation: + Configure ntpd to get time from multiple sources. + Upgrade to 4.2.8p5, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page + As we've long documented, only use the -g option to ntpd in + cold-start situations. + Monitor your ntpd instances. + Credit: This weakness was discovered by Aanchal Malhotra, + Isaac E. Cohen, and Sharon Goldberg at Boston University. + + NOTE WELL: The -g flag disables the limit check on the panic_gate + in ntpd, which is 900 seconds by default. The bug identified by + the researchers at Boston University is that the panic_gate + check was only re-enabled after the first change to the system + clock that was greater than 128 milliseconds, by default. The + correct behavior is that the panic_gate check should be + re-enabled after any initial time correction. + + If an attacker is able to inject consistent but erroneous time + responses to your systems via the network or "over the air", + perhaps by spoofing radio, cellphone, or navigation satellite + transmissions, they are in a great position to affect your + system's clock. There comes a point where your very best + defenses include: + + Configure ntpd to get time from multiple sources. + Monitor your ntpd instances. + +Other fixes: + +* Coverity submission process updated from Coverity 5 to Coverity 7. + The NTP codebase has been undergoing regular Coverity scans on an + ongoing basis since 2006. As part of our recent upgrade from + Coverity 5 to Coverity 7, Coverity identified 16 nits in some of + the newly-written Unity test programs. These were fixed. +* [Bug 2829] Clean up pipe_fds in ntpd.c perlinger@ntp.org +* [Bug 2887] stratum -1 config results as showing value 99 + - fudge stratum should only accept values [0..16]. perlinger@ntp.org +* [Bug 2932] Update leapsecond file info in miscopt.html. CWoodbury, HStenn. +* [Bug 2934] tests/ntpd/t-ntp_scanner.c has a magic constant wired in. HMurray +* [Bug 2944] errno is not preserved properly in ntpdate after sendto call. + - applied patch by Christos Zoulas. perlinger@ntp.org +* [Bug 2952] Peer associations broken by fix for Bug 2901/CVE-2015-7704. +* [Bug 2954] Version 4.2.8p4 crashes on startup on some OSes. + - fixed data race conditions in threaded DNS worker. perlinger@ntp.org + - limit threading warm-up to linux; FreeBSD bombs on it. perlinger@ntp.org +* [Bug 2957] 'unsigned int' vs 'size_t' format clash. perlinger@ntp.org + - accept key file only if there are no parsing errors + - fixed size_t/u_int format clash + - fixed wrong use of 'strlcpy' +* [Bug 2958] ntpq: fatal error messages need a final newline. Craig Leres. +* [Bug 2962] truncation of size_t/ptrdiff_t on 64bit targets. perlinger@ntp.org + - fixed several other warnings (cast-alignment, missing const, missing prototypes) + - promote use of 'size_t' for values that express a size + - use ptr-to-const for read-only arguments + - make sure SOCKET values are not truncated (win32-specific) + - format string fixes +* [Bug 2965] Local clock didn't work since 4.2.8p4. Martin Burnicki. +* [Bug 2967] ntpdate command suffers an assertion failure + - fixed ntp_rfc2553.c to return proper address length. perlinger@ntp.org +* [Bug 2969] Seg fault from ntpq/mrulist when looking at server with + lots of clients. perlinger@ntp.org +* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call + - changed stacked/nested handling of CTRL-C. perlinger@ntp.org +* Unity cleanup for FreeBSD-6.4. Harlan Stenn. +* Unity test cleanup. Harlan Stenn. +* Libevent autoconf pthread fixes for FreeBSD-10. Harlan Stenn. +* Header cleanup in tests/sandbox/uglydate.c. Harlan Stenn. +* Header cleanup in tests/libntp/sfptostr.c. Harlan Stenn. +* Quiet a warning from clang. Harlan Stenn. + +--- +NTP 4.2.8p4 (Harlan Stenn , 2015/10/21) + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +In addition to bug fixes and enhancements, this release fixes the +following 13 low- and medium-severity vulnerabilities: + +* Incomplete vallen (value length) checks in ntp_crypto.c, leading + to potential crashes or potential code injection/information leakage. + + References: Sec 2899, Sec 2671, CVE-2015-7691, CVE-2015-7692, CVE-2015-7702 + Affects: All ntp-4 releases up to, but not including 4.2.8p4, + and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6 + Summary: The fix for CVE-2014-9750 was incomplete in that there were + certain code paths where a packet with particular autokey operations + that contained malicious data was not always being completely + validated. Receipt of these packets can cause ntpd to crash. + Mitigation: + Don't use autokey. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page + Monitor your ntpd instances. + Credit: This weakness was discovered by Tenable Network Security. + +* Clients that receive a KoD should validate the origin timestamp field. + + References: Sec 2901 / CVE-2015-7704, CVE-2015-7705 + Affects: All ntp-4 releases up to, but not including 4.2.8p4, + and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3-5.0 at worst + Summary: An ntpd client that honors Kiss-of-Death responses will honor + KoD messages that have been forged by an attacker, causing it to + delay or stop querying its servers for time updates. Also, an + attacker can forge packets that claim to be from the target and + send them to servers often enough that a server that implements + KoD rate limiting will send the target machine a KoD response to + attempt to reduce the rate of incoming packets, or it may also + trigger a firewall block at the server for packets from the target + machine. For either of these attacks to succeed, the attacker must + know what servers the target is communicating with. An attacker + can be anywhere on the Internet and can frequently learn the + identity of the target's time source by sending the target a + time query. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + If you can't upgrade, restrict who can query ntpd to learn who + its servers are, and what IPs are allowed to ask your system + for the time. This mitigation is heavy-handed. + Monitor your ntpd instances. + Note: + 4.2.8p4 protects against the first attack. For the second attack, + all we can do is warn when it is happening, which we do in 4.2.8p4. + Credit: This weakness was discovered by Aanchal Malhotra, + Issac E. Cohen, and Sharon Goldberg of Boston University. + +* configuration directives to change "pidfile" and "driftfile" should + only be allowed locally. + + References: Sec 2902 / CVE-2015-5196 + Affects: All ntp-4 releases up to, but not including 4.2.8p4, + and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.2 worst case + Summary: If ntpd is configured to allow for remote configuration, + and if the (possibly spoofed) source IP address is allowed to + send remote configuration requests, and if the attacker knows + the remote configuration password, it's possible for an attacker + to use the "pidfile" or "driftfile" directives to potentially + overwrite other files. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page + If you cannot upgrade, don't enable remote configuration. + If you must enable remote configuration and cannot upgrade, + remote configuration of NTF's ntpd requires: + - an explicitly configured trustedkey, and you should also + configure a controlkey. + - access from a permitted IP. You choose the IPs. + - authentication. Don't disable it. Practice secure key safety. + Monitor your ntpd instances. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +* Slow memory leak in CRYPTO_ASSOC + + References: Sec 2909 / CVE-2015-7701 + Affects: All ntp-4 releases that use autokey up to, but not + including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 0.0 best/usual case, + 4.6 otherwise + Summary: If ntpd is configured to use autokey, then an attacker can + send packets to ntpd that will, after several days of ongoing + attack, cause it to run out of memory. + Mitigation: + Don't use autokey. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page + Monitor your ntpd instances. + Credit: This weakness was discovered by Tenable Network Security. + +* mode 7 loop counter underrun + + References: Sec 2913 / CVE-2015-7848 / TALOS-CAN-0052 + Affects: All ntp-4 releases up to, but not including 4.2.8p4, + and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6 + Summary: If ntpd is configured to enable mode 7 packets, and if the + use of mode 7 packets is not properly protected thru the use of + the available mode 7 authentication and restriction mechanisms, + and if the (possibly spoofed) source IP address is allowed to + send mode 7 queries, then an attacker can send a crafted packet + to ntpd that will cause it to crash. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade: + In ntp-4.2.8, mode 7 is disabled by default. Don't enable it. + If you must enable mode 7: + configure the use of a requestkey to control who can issue + mode 7 requests. + configure restrict noquery to further limit mode 7 requests + to trusted sources. + Monitor your ntpd instances. +Credit: This weakness was discovered by Aleksandar Nikolic of Cisco Talos. + +* memory corruption in password store + + References: Sec 2916 / CVE-2015-7849 / TALOS-CAN-0054 + Affects: All ntp-4 releases up to, but not including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.8, worst case + Summary: If ntpd is configured to allow remote configuration, and if + the (possibly spoofed) source IP address is allowed to send + remote configuration requests, and if the attacker knows the + remote configuration password or if ntpd was configured to + disable authentication, then an attacker can send a set of + packets to ntpd that may cause a crash or theoretically + perform a code injection attack. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade, remote configuration of NTF's + ntpd requires: + an explicitly configured "trusted" key. Only configure + this if you need it. + access from a permitted IP address. You choose the IPs. + authentication. Don't disable it. Practice secure key safety. + Monitor your ntpd instances. + Credit: This weakness was discovered by Yves Younan of Cisco Talos. + +* Infinite loop if extended logging enabled and the logfile and + keyfile are the same. + + References: Sec 2917 / CVE-2015-7850 / TALOS-CAN-0055 + Affects: All ntp-4 releases up to, but not including 4.2.8p4, + and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case + Summary: If ntpd is configured to allow remote configuration, and if + the (possibly spoofed) source IP address is allowed to send + remote configuration requests, and if the attacker knows the + remote configuration password or if ntpd was configured to + disable authentication, then an attacker can send a set of + packets to ntpd that will cause it to crash and/or create a + potentially huge log file. Specifically, the attacker could + enable extended logging, point the key file at the log file, + and cause what amounts to an infinite loop. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade, remote configuration of NTF's ntpd + requires: + an explicitly configured "trusted" key. Only configure this + if you need it. + access from a permitted IP address. You choose the IPs. + authentication. Don't disable it. Practice secure key safety. + Monitor your ntpd instances. + Credit: This weakness was discovered by Yves Younan of Cisco Talos. + +* Potential path traversal vulnerability in the config file saving of + ntpd on VMS. + + References: Sec 2918 / CVE-2015-7851 / TALOS-CAN-0062 + Affects: All ntp-4 releases running under VMS up to, but not + including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:N/I:P/A:C) Base Score: 5.2, worst case + Summary: If ntpd is configured to allow remote configuration, and if + the (possibly spoofed) IP address is allowed to send remote + configuration requests, and if the attacker knows the remote + configuration password or if ntpd was configured to disable + authentication, then an attacker can send a set of packets to + ntpd that may cause ntpd to overwrite files. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade, remote configuration of NTF's ntpd + requires: + an explicitly configured "trusted" key. Only configure + this if you need it. + access from permitted IP addresses. You choose the IPs. + authentication. Don't disable it. Practice key security safety. + Monitor your ntpd instances. + Credit: This weakness was discovered by Yves Younan of Cisco Talos. + +* ntpq atoascii() potential memory corruption + + References: Sec 2919 / CVE-2015-7852 / TALOS-CAN-0063 + Affects: All ntp-4 releases running up to, but not including 4.2.8p4, + and 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:N/C:N/I:P/A:P) Base Score: 4.0, worst case + Summary: If an attacker can figure out the precise moment that ntpq + is listening for data and the port number it is listening on or + if the attacker can provide a malicious instance ntpd that + victims will connect to then an attacker can send a set of + crafted mode 6 response packets that, if received by ntpq, + can cause ntpq to crash. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade and you run ntpq against a server + and ntpq crashes, try again using raw mode. Build or get a + patched ntpq and see if that fixes the problem. Report new + bugs in ntpq or abusive servers appropriately. + If you use ntpq in scripts, make sure ntpq does what you expect + in your scripts. + Credit: This weakness was discovered by Yves Younan and + Aleksander Nikolich of Cisco Talos. + +* Invalid length data provided by a custom refclock driver could cause + a buffer overflow. + + References: Sec 2920 / CVE-2015-7853 / TALOS-CAN-0064 + Affects: Potentially all ntp-4 releases running up to, but not + including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77 + that have custom refclocks + CVSS: (AV:L/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 usual case, + 5.9 unusual worst case + Summary: A negative value for the datalen parameter will overflow a + data buffer. NTF's ntpd driver implementations always set this + value to 0 and are therefore not vulnerable to this weakness. + If you are running a custom refclock driver in ntpd and that + driver supplies a negative value for datalen (no custom driver + of even minimal competence would do this) then ntpd would + overflow a data buffer. It is even hypothetically possible + in this case that instead of simply crashing ntpd the attacker + could effect a code injection attack. + Mitigation: + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade: + If you are running custom refclock drivers, make sure + the signed datalen value is either zero or positive. + Monitor your ntpd instances. + Credit: This weakness was discovered by Yves Younan of Cisco Talos. + +* Password Length Memory Corruption Vulnerability + + References: Sec 2921 / CVE-2015-7854 / TALOS-CAN-0065 + Affects: All ntp-4 releases up to, but not including 4.2.8p4, and + 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 best case, + 1.7 usual case, 6.8, worst case + Summary: If ntpd is configured to allow remote configuration, and if + the (possibly spoofed) source IP address is allowed to send + remote configuration requests, and if the attacker knows the + remote configuration password or if ntpd was (foolishly) + configured to disable authentication, then an attacker can + send a set of packets to ntpd that may cause it to crash, + with the hypothetical possibility of a small code injection. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade, remote configuration of NTF's + ntpd requires: + an explicitly configured "trusted" key. Only configure + this if you need it. + access from a permitted IP address. You choose the IPs. + authentication. Don't disable it. Practice secure key safety. + Monitor your ntpd instances. + Credit: This weakness was discovered by Yves Younan and + Aleksander Nikolich of Cisco Talos. + +* decodenetnum() will ASSERT botch instead of returning FAIL on some + bogus values. + + References: Sec 2922 / CVE-2015-7855 + Affects: All ntp-4 releases up to, but not including 4.2.8p4, and + 4.3.0 up to, but not including 4.3.77 + CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case + Summary: If ntpd is fed a crafted mode 6 or mode 7 packet containing + an unusually long data value where a network address is expected, + the decodenetnum() function will abort with an assertion failure + instead of simply returning a failure condition. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade: + mode 7 is disabled by default. Don't enable it. + Use restrict noquery to limit who can send mode 6 + and mode 7 requests. + Configure and use the controlkey and requestkey + authentication directives to limit who can + send mode 6 and mode 7 requests. + Monitor your ntpd instances. + Credit: This weakness was discovered by John D "Doug" Birdwell of IDA.org. + +* NAK to the Future: Symmetric association authentication bypass via + crypto-NAK. + + References: Sec 2941 / CVE-2015-7871 + Affects: All ntp-4 releases between 4.2.5p186 up to but not including + 4.2.8p4, and 4.3.0 up to but not including 4.3.77 + CVSS: (AV:N/AC:L/Au:N/C:N/I:P/A:P) Base Score: 6.4 + Summary: Crypto-NAK packets can be used to cause ntpd to accept time + from unauthenticated ephemeral symmetric peers by bypassing the + authentication required to mobilize peer associations. This + vulnerability appears to have been introduced in ntp-4.2.5p186 + when the code handling mobilization of new passive symmetric + associations (lines 1103-1165) was refactored. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p4, or later, from the NTP Project Download + Page or the NTP Public Services Project Download Page. + If you are unable to upgrade: + Apply the patch to the bottom of the "authentic" check + block around line 1136 of ntp_proto.c. + Monitor your ntpd instances. + Credit: This weakness was discovered by Matthew Van Gundy of Cisco ASIG. + +Backward-Incompatible changes: +* [Bug 2817] Default on Linux is now "rlimit memlock -1". + While the general default of 32M is still the case, under Linux + the default value has been changed to -1 (do not lock ntpd into + memory). A value of 0 means "lock ntpd into memory with whatever + memory it needs." If your ntp.conf file has an explicit "rlimit memlock" + value in it, that value will continue to be used. + +* [Bug 2886] Misspelling: "outlyer" should be "outlier". + If you've written a script that looks for this case in, say, the + output of ntpq, you probably want to change your regex matches + from 'outlyer' to 'outl[iy]er'. + +New features in this release: +* 'rlimit memlock' now has finer-grained control. A value of -1 means + "don't lock ntpd into memore". This is the default for Linux boxes. + A value of 0 means "lock ntpd into memory" with no limits. Otherwise + the value is the number of megabytes of memory to lock. The default + is 32 megabytes. + +* The old Google Test framework has been replaced with a new framework, + based on http://www.throwtheswitch.org/unity/ . + +Bug Fixes and Improvements: +* [Bug 2332] (reopened) Exercise thread cancellation once before dropping + privileges and limiting resources in NTPD removes the need to link + forcefully against 'libgcc_s' which does not always work. J.Perlinger +* [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn. +* [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn. +* [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn. +* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c. perlinger@ntp.org +* [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn. +* [Bug 2849] Systems with more than one default route may never + synchronize. Brian Utterback. Note that this patch might need to + be reverted once Bug 2043 has been fixed. +* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger +* [Bug 2866] segmentation fault at initgroups(). Harlan Stenn. +* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger +* [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn +* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn +* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must + be configured for the distribution targets. Harlan Stenn. +* [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar. +* [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org +* [Bug 2888] streamline calendar functions. perlinger@ntp.org +* [Bug 2889] ntp-dev-4.3.67 does not build on Windows. perlinger@ntp.org +* [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov. +* [Bug 2906] make check needs better support for pthreads. Harlan Stenn. +* [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn. +* [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn. +* libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn. +* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. +* tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn. +* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn. +* On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn. +* top_srcdir can change based on ntp v. sntp. Harlan Stenn. +* sntp/tests/ function parameter list cleanup. Damir Tomić. +* tests/libntp/ function parameter list cleanup. Damir Tomić. +* tests/ntpd/ function parameter list cleanup. Damir Tomić. +* sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn. +* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. H.Stenn. +* tests/libntp/timevalops.c and timespecops.c fixed error printing. D.Tomić. +* tests/libntp/ improvements in code and fixed error printing. Damir Tomić. +* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c, + caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed + formatting; first declaration, then code (C90); deleted unnecessary comments; + changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich +* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments, + fix formatting, cleanup. Tomasz Flendrich +* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting. + Tomasz Flendrich +* tests/libntp/statestr.c remove empty functions, remove unnecessary include, + fix formatting. Tomasz Flendrich +* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich +* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting. + Tomasz Flendrich +* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich +* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich +* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich +* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich +* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting. +* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include, +fixed formatting. Tomasz Flendrich +* tests/libntp/timespecops.c fixed formatting, fixed the order of includes, + removed unnecessary comments, cleanup. Tomasz Flendrich +* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary + comments, cleanup. Tomasz Flendrich +* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting. + Tomasz Flendrich +* tests/libntp/lfptest.h cleanup. Tomasz Flendrich +* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich +* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/kodDatabase.c added consts, deleted empty function, + fixed formatting. Tomasz Flendrich +* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich +* sntp/tests/packetHandling.c is now using proper Unity's assertions, + fixed formatting, deleted unused variable. Tomasz Flendrich +* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/packetProcessing.c changed from sprintf to snprintf, + fixed formatting. Tomasz Flendrich +* sntp/tests/utilities.c is now using proper Unity's assertions, changed + the order of includes, fixed formatting, removed unnecessary comments. + Tomasz Flendrich +* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich +* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem, + made one function do its job, deleted unnecessary prints, fixed formatting. + Tomasz Flendrich +* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich +* sntp/unity/unity_config.h: Distribute it. Harlan Stenn. +* sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn. +* sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn. +* sntp/unity/unity.c: Clean up a printf(). Harlan Stenn. +* Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn. +* Don't build sntp/libevent/sample/. Harlan Stenn. +* tests/libntp/test_caltontp needs -lpthread. Harlan Stenn. +* br-flock: --enable-local-libevent. Harlan Stenn. +* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich +* scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn. +* Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn. +* Code cleanup. Harlan Stenn. +* libntp/icom.c: Typo fix. Harlan Stenn. +* util/ntptime.c: initialization nit. Harlan Stenn. +* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn. +* Add std_unity_tests to various Makefile.am files. Harlan Stenn. +* ntpd/ntp_restrict.c: added a few assertions, created tests for this file. + Tomasz Flendrich +* Changed progname to be const in many files - now it's consistent. Tomasz + Flendrich +* Typo fix for GCC warning suppression. Harlan Stenn. +* Added tests/ntpd/ntp_scanner.c test. Damir Tomić. +* Added declarations to all Unity tests, and did minor fixes to them. + Reduced the number of warnings by half. Damir Tomić. +* Updated generate_test_runner.rb and updated the sntp/unity/auto directory + with the latest Unity updates from Mark. Damir Tomić. +* Retire google test - phase I. Harlan Stenn. +* Unity test cleanup: move declaration of 'initializing'. Harlan Stenn. +* Update the NEWS file. Harlan Stenn. +* Autoconf cleanup. Harlan Stenn. +* Unit test dist cleanup. Harlan Stenn. +* Cleanup various test Makefile.am files. Harlan Stenn. +* Pthread autoconf macro cleanup. Harlan Stenn. +* Fix progname definition in unity runner scripts. Harlan Stenn. +* Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn. +* Update the patch for bug 2817. Harlan Stenn. +* More updates for bug 2817. Harlan Stenn. +* Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn. +* gcc on older HPUX may need +allowdups. Harlan Stenn. +* Adding missing MCAST protection. Harlan Stenn. +* Disable certain test programs on certain platforms. Harlan Stenn. +* Implement --enable-problem-tests (on by default). Harlan Stenn. +* build system tweaks. Harlan Stenn. + +--- +NTP 4.2.8p3 (Harlan Stenn , 2015/06/29) + +Focus: 1 Security fix. Bug fixes and enhancements. Leap-second improvements. + +Severity: MEDIUM + +Security Fix: + +* [Sec 2853] Crafted remote config packet can crash some versions of + ntpd. Aleksis Kauppinen, Juergen Perlinger, Harlan Stenn. + +Under specific circumstances an attacker can send a crafted packet to +cause a vulnerable ntpd instance to crash. This requires each of the +following to be true: + +1) ntpd set up to allow remote configuration (not allowed by default), and +2) knowledge of the configuration password, and +3) access to a computer entrusted to perform remote configuration. + +This vulnerability is considered low-risk. + +New features in this release: + +Optional (disabled by default) support to have ntpd provide smeared +leap second time. A specially built and configured ntpd will only +offer smeared time in response to client packets. These response +packets will also contain a "refid" of 254.a.b.c, where the 24 bits +of a, b, and c encode the amount of smear in a 2:22 integer:fraction +format. See README.leapsmear and http://bugs.ntp.org/2855 for more +information. + + *IF YOU CHOOSE TO CONFIGURE NTPD TO PROVIDE LEAP SMEAR TIME* + *BE SURE YOU DO NOT OFFER THAT TIME ON PUBLIC TIMESERVERS.* + +We've imported the Unity test framework, and have begun converting +the existing google-test items to this new framework. If you want +to write new tests or change old ones, you'll need to have ruby +installed. You don't need ruby to run the test suite. + +Bug Fixes and Improvements: + +* CID 739725: Fix a rare resource leak in libevent/listener.c. +* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776. +* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html +* CID 1269537: Clean up a line of dead code in getShmTime(). +* [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c. Helge Oldach. +* [Bug 2590] autogen-5.18.5. +* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because + of 'limited'. +* [Bug 2650] fix includefile processing. +* [Bug 2745] ntpd -x steps clock on leap second + Fixed an initial-value problem that caused misbehaviour in absence of + any leapsecond information. + Do leap second stepping only of the step adjustment is beyond the + proper jump distance limit and step correction is allowed at all. +* [Bug 2750] build for Win64 + Building for 32bit of loopback ppsapi needs def file +* [Bug 2776] Improve ntpq's 'help keytype'. +* [Bug 2778] Implement "apeers" ntpq command to include associd. +* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection. +* [Bug 2792] If the IFF_RUNNING interface flag is supported then an + interface is ignored as long as this flag is not set since the + interface is not usable (e.g., no link). +* [Bug 2794] Clean up kernel clock status reports. +* [Bug 2800] refclock_true.c true_debug() can't open debug log because + of incompatible open/fdopen parameters. +* [Bug 2804] install-local-data assumes GNU 'find' semantics. +* [Bug 2805] ntpd fails to join multicast group. +* [Bug 2806] refclock_jjy.c supports the Telephone JJY. +* [Bug 2808] GPSD_JSON driver enhancements, step 1. + Fix crash during cleanup if GPS device not present and char device. + Increase internal token buffer to parse all JSON data, even SKY. + Defer logging of errors during driver init until the first unit is + started, so the syslog is not cluttered when the driver is not used. + Various improvements, see http://bugs.ntp.org/2808 for details. + Changed libjsmn to a more recent version. +* [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX. +* [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h. +* [Bug 2815] net-snmp before v5.4 has circular library dependencies. +* [Bug 2821] Add a missing NTP_PRINTF and a missing const. +* [Bug 2822] New leap column in sntp broke NTP::Util.pm. +* [Bug 2824] Convert update-leap to perl. (also see 2769) +* [Bug 2825] Quiet file installation in html/ . +* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey + NTPD transfers the current TAI (instead of an announcement) now. + This might still needed improvement. + Update autokey data ASAP when 'sys_tai' changes. + Fix unit test that was broken by changes for autokey update. + Avoid potential signature length issue and use DPRINTF where possible + in ntp_crypto.c. +* [Bug 2832] refclock_jjy.c supports the TDC-300. +* [Bug 2834] Correct a broken html tag in html/refclock.html +* [Bug 2836] DFC77 patches from Frank Kardel to make decoding more + robust, and require 2 consecutive timestamps to be consistent. +* [Bug 2837] Allow a configurable DSCP value. +* [Bug 2837] add test for DSCP to ntpd/complete.conf.in +* [Bug 2842] Glitch in ntp.conf.def documentation stanza. +* [Bug 2842] Bug in mdoc2man. +* [Bug 2843] make check fails on 4.3.36 + Fixed compiler warnings about numeric range overflow + (The original topic was fixed in a byplay to bug#2830) +* [Bug 2845] Harden memory allocation in ntpd. +* [Bug 2852] 'make check' can't find unity.h. Hal Murray. +* [Bug 2854] Missing brace in libntp/strdup.c. Masanari Iida. +* [Bug 2855] Parser fix for conditional leap smear code. Harlan Stenn. +* [Bug 2855] Report leap smear in the REFID. Harlan Stenn. +* [Bug 2855] Implement conditional leap smear code. Martin Burnicki. +* [Bug 2856] ntpd should wait() on terminated child processes. Paul Green. +* [Bug 2857] Stratus VOS does not support SIGIO. Paul Green. +* [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. +* [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel. +* html/drivers/driver22.html: typo fix. Harlan Stenn. +* refidsmear test cleanup. Tomasz Flendrich. +* refidsmear function support and tests. Harlan Stenn. +* sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested + something that was only in the 4.2.6 sntp. Harlan Stenn. +* Modified tests/bug-2803/Makefile.am so it builds Unity framework tests. + Damir Tomić +* Modified tests/libtnp/Makefile.am so it builds Unity framework tests. + Damir Tomić +* Modified sntp/tests/Makefile.am so it builds Unity framework tests. + Damir Tomić +* tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger. +* Converted from gtest to Unity: tests/bug-2803/. Damir Tomić +* Converted from gtest to Unity: tests/libntp/ a_md5encrypt, atoint.c, + atouint.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c, + calyearstart.c, clocktime.c, hextoint.c, lfpfunc.c, modetoa.c, + numtoa.c, numtohost.c, refnumtoa.c, ssl_init.c, statestr.c, + timespecops.c, timevalops.c, uglydate.c, vi64ops.c, ymd2yd.c. + Damir Tomić +* Converted from gtest to Unity: sntp/tests/ kodDatabase.c, kodFile.c, + networking.c, keyFile.c, utilities.cpp, sntptest.h, + fileHandlingTest.h. Damir Tomić +* Initial support for experimental leap smear code. Harlan Stenn. +* Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn. +* Report select() debug messages at debug level 3 now. +* sntp/scripts/genLocInfo: treat raspbian as debian. +* Unity test framework fixes. + ** Requires ruby for changes to tests. +* Initial support for PACKAGE_VERSION tests. +* sntp/libpkgver belongs in EXTRA_DIST, not DIST_SUBDIRS. +* tests/bug-2803/Makefile.am must distribute bug-2803.h. +* Add an assert to the ntpq ifstats code. +* Clean up the RLIMIT_STACK code. +* Improve the ntpq documentation around the controlkey keyid. +* ntpq.c cleanup. +* Windows port build cleanup. + +--- +NTP 4.2.8p2 (Harlan Stenn , 2015/04/07) + +Focus: Security and Bug fixes, enhancements. + +Severity: MEDIUM + +In addition to bug fixes and enhancements, this release fixes the +following medium-severity vulnerabilities involving private key +authentication: + +* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto. + + References: Sec 2779 / CVE-2015-1798 / VU#374268 + Affects: All NTP4 releases starting with ntp-4.2.5p99 up to but not + including ntp-4.2.8p2 where the installation uses symmetric keys + to authenticate remote associations. + CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4 + Date Resolved: Stable (4.2.8p2) 07 Apr 2015 + Summary: When ntpd is configured to use a symmetric key to authenticate + a remote NTP server/peer, it checks if the NTP message + authentication code (MAC) in received packets is valid, but not if + there actually is any MAC included. Packets without a MAC are + accepted as if they had a valid MAC. This allows a MITM attacker to + send false packets that are accepted by the client/peer without + having to know the symmetric key. The attacker needs to know the + transmit timestamp of the client to match it in the forged reply + and the false reply needs to reach the client before the genuine + reply from the server. The attacker doesn't necessarily need to be + relaying the packets between the client and the server. + + Authentication using autokey doesn't have this problem as there is + a check that requires the key ID to be larger than NTP_MAXKEY, + which fails for packets without a MAC. + Mitigation: + Upgrade to 4.2.8p2, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Configure ntpd with enough time sources and monitor it properly. + Credit: This issue was discovered by Miroslav Lichvar, of Red Hat. + +* [Sec 2781] Authentication doesn't protect symmetric associations against + DoS attacks. + + References: Sec 2781 / CVE-2015-1799 / VU#374268 + Affects: All NTP releases starting with at least xntp3.3wy up to but + not including ntp-4.2.8p2 where the installation uses symmetric + key authentication. + CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4 + Note: the CVSS base Score for this issue could be 4.3 or lower, and + it could be higher than 5.4. + Date Resolved: Stable (4.2.8p2) 07 Apr 2015 + Summary: An attacker knowing that NTP hosts A and B are peering with + each other (symmetric association) can send a packet to host A + with source address of B which will set the NTP state variables + on A to the values sent by the attacker. Host A will then send + on its next poll to B a packet with originate timestamp that + doesn't match the transmit timestamp of B and the packet will + be dropped. If the attacker does this periodically for both + hosts, they won't be able to synchronize to each other. This is + a known denial-of-service attack, described at + https://www.eecis.udel.edu/~mills/onwire.html . + + According to the document the NTP authentication is supposed to + protect symmetric associations against this attack, but that + doesn't seem to be the case. The state variables are updated even + when authentication fails and the peers are sending packets with + originate timestamps that don't match the transmit timestamps on + the receiving side. + + This seems to be a very old problem, dating back to at least + xntp3.3wy. It's also in the NTPv3 (RFC 1305) and NTPv4 (RFC 5905) + specifications, so other NTP implementations with support for + symmetric associations and authentication may be vulnerable too. + An update to the NTP RFC to correct this error is in-process. + Mitigation: + Upgrade to 4.2.8p2, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Note that for users of autokey, this specific style of MITM attack + is simply a long-known potential problem. + Configure ntpd with appropriate time sources and monitor ntpd. + Alert your staff if problems are detected. + Credit: This issue was discovered by Miroslav Lichvar, of Red Hat. + +* New script: update-leap +The update-leap script will verify and if necessary, update the +leap-second definition file. +It requires the following commands in order to work: + + wget logger tr sed shasum + +Some may choose to run this from cron. It needs more portability testing. + +Bug Fixes and Improvements: + +* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003. +* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument. +* [Bug 2346] "graceful termination" signals do not do peer cleanup. +* [Bug 2728] See if C99-style structure initialization works. +* [Bug 2747] Upgrade libevent to 2.1.5-beta. +* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. . +* [Bug 2751] jitter.h has stale copies of l_fp macros. +* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM. +* [Bug 2757] Quiet compiler warnings. +* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq. +* [Bug 2763] Allow different thresholds for forward and backward steps. +* [Bug 2766] ntp-keygen output files should not be world-readable. +* [Bug 2767] ntp-keygen -M should symlink to ntp.keys. +* [Bug 2771] nonvolatile value is documented in wrong units. +* [Bug 2773] Early leap announcement from Palisade/Thunderbolt +* [Bug 2774] Unreasonably verbose printout - leap pending/warning +* [Bug 2775] ntp-keygen.c fails to compile under Windows. +* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info. + Removed non-ASCII characters from some copyright comments. + Removed trailing whitespace. + Updated definitions for Meinberg clocks from current Meinberg header files. + Now use C99 fixed-width types and avoid non-ASCII characters in comments. + Account for updated definitions pulled from Meinberg header files. + Updated comments on Meinberg GPS receivers which are not only called GPS16x. + Replaced some constant numbers by defines from ntp_calendar.h + Modified creation of parse-specific variables for Meinberg devices + in gps16x_message(). + Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates. + Modified mbg_tm_str() which now expexts an additional parameter controlling + if the time status shall be printed. +* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto. +* [Sec 2781] Authentication doesn't protect symmetric associations against + DoS attacks. +* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE. +* [Bug 2789] Quiet compiler warnings from libevent. +* [Bug 2790] If ntpd sets the Windows MM timer highest resolution + pause briefly before measuring system clock precision to yield + correct results. +* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer. +* Use predefined function types for parse driver functions + used to set up function pointers. + Account for changed prototype of parse_inp_fnc_t functions. + Cast parse conversion results to appropriate types to avoid + compiler warnings. + Let ioctl() for Windows accept a (void *) to avoid compiler warnings + when called with pointers to different types. + +--- +NTP 4.2.8p1 (Harlan Stenn , 2015/02/04) + +Focus: Security and Bug fixes, enhancements. + +Severity: HIGH + +In addition to bug fixes and enhancements, this release fixes the +following high-severity vulnerabilities: + +* vallen is not validated in several places in ntp_crypto.c, leading + to a potential information leak or possibly a crash + + References: Sec 2671 / CVE-2014-9297 / VU#852879 + Affects: All NTP4 releases before 4.2.8p1 that are running autokey. + CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5 + Date Resolved: Stable (4.2.8p1) 04 Feb 2015 + Summary: The vallen packet value is not validated in several code + paths in ntp_crypto.c which can lead to information leakage + or perhaps a crash of the ntpd process. + Mitigation - any of: + Upgrade to 4.2.8p1, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Disable Autokey Authentication by removing, or commenting out, + all configuration directives beginning with the "crypto" + keyword in your ntp.conf file. + Credit: This vulnerability was discovered by Stephen Roettger of the + Google Security Team, with additional cases found by Sebastian + Krahmer of the SUSE Security Team and Harlan Stenn of Network + Time Foundation. + +* ::1 can be spoofed on some OSes, so ACLs based on IPv6 ::1 addresses + can be bypassed. + + References: Sec 2672 / CVE-2014-9298 / VU#852879 + Affects: All NTP4 releases before 4.2.8p1, under at least some + versions of MacOS and Linux. *BSD has not been seen to be vulnerable. + CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:C) Base Score: 9 + Date Resolved: Stable (4.2.8p1) 04 Feb 2014 + Summary: While available kernels will prevent 127.0.0.1 addresses + from "appearing" on non-localhost IPv4 interfaces, some kernels + do not offer the same protection for ::1 source addresses on + IPv6 interfaces. Since NTP's access control is based on source + address and localhost addresses generally have no restrictions, + an attacker can send malicious control and configuration packets + by spoofing ::1 addresses from the outside. Note Well: This is + not really a bug in NTP, it's a problem with some OSes. If you + have one of these OSes where ::1 can be spoofed, ALL ::1 -based + ACL restrictions on any application can be bypassed! + Mitigation: + Upgrade to 4.2.8p1, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Install firewall rules to block packets claiming to come from + ::1 from inappropriate network interfaces. + Credit: This vulnerability was discovered by Stephen Roettger of + the Google Security Team. + +Additionally, over 30 bugfixes and improvements were made to the codebase. +See the ChangeLog for more information. + +--- +NTP 4.2.8 (Harlan Stenn , 2014/12/18) + +Focus: Security and Bug fixes, enhancements. + +Severity: HIGH + +In addition to bug fixes and enhancements, this release fixes the +following high-severity vulnerabilities: + +************************** vv NOTE WELL vv ***************************** + +The vulnerabilities listed below can be significantly mitigated by +following the BCP of putting + + restrict default ... noquery + +in the ntp.conf file. With the exception of: + + receive(): missing return on error + References: Sec 2670 / CVE-2014-9296 / VU#852879 + +below (which is a limited-risk vulnerability), none of the recent +vulnerabilities listed below can be exploited if the source IP is +restricted from sending a 'query'-class packet by your ntp.conf file. + +************************** ^^ NOTE WELL ^^ ***************************** + +* Weak default key in config_auth(). + + References: [Sec 2665] / CVE-2014-9293 / VU#852879 + CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3 + Vulnerable Versions: all releases prior to 4.2.7p11 + Date Resolved: 28 Jan 2010 + + Summary: If no 'auth' key is set in the configuration file, ntpd + would generate a random key on the fly. There were two + problems with this: 1) the generated key was 31 bits in size, + and 2) it used the (now weak) ntp_random() function, which was + seeded with a 32-bit value and could only provide 32 bits of + entropy. This was sufficient back in the late 1990s when the + code was written. Not today. + + Mitigation - any of: + - Upgrade to 4.2.7p11 or later. + - Follow BCP and put 'restrict ... noquery' in your ntp.conf file. + + Credit: This vulnerability was noticed in ntp-4.2.6 by Neel Mehta + of the Google Security Team. + +* Non-cryptographic random number generator with weak seed used by + ntp-keygen to generate symmetric keys. + + References: [Sec 2666] / CVE-2014-9294 / VU#852879 + CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3 + Vulnerable Versions: All NTP4 releases before 4.2.7p230 + Date Resolved: Dev (4.2.7p230) 01 Nov 2011 + + Summary: Prior to ntp-4.2.7p230 ntp-keygen used a weak seed to + prepare a random number generator that was of good quality back + in the late 1990s. The random numbers produced was then used to + generate symmetric keys. In ntp-4.2.8 we use a current-technology + cryptographic random number generator, either RAND_bytes from + OpenSSL, or arc4random(). + + Mitigation - any of: + - Upgrade to 4.2.7p230 or later. + - Follow BCP and put 'restrict ... noquery' in your ntp.conf file. + + Credit: This vulnerability was discovered in ntp-4.2.6 by + Stephen Roettger of the Google Security Team. + +* Buffer overflow in crypto_recv() + + References: Sec 2667 / CVE-2014-9295 / VU#852879 + CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5 + Versions: All releases before 4.2.8 + Date Resolved: Stable (4.2.8) 18 Dec 2014 + + Summary: When Autokey Authentication is enabled (i.e. the ntp.conf + file contains a 'crypto pw ...' directive) a remote attacker + can send a carefully crafted packet that can overflow a stack + buffer and potentially allow malicious code to be executed + with the privilege level of the ntpd process. + + Mitigation - any of: + - Upgrade to 4.2.8, or later, or + - Disable Autokey Authentication by removing, or commenting out, + all configuration directives beginning with the crypto keyword + in your ntp.conf file. + + Credit: This vulnerability was discovered by Stephen Roettger of the + Google Security Team. + +* Buffer overflow in ctl_putdata() + + References: Sec 2668 / CVE-2014-9295 / VU#852879 + CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5 + Versions: All NTP4 releases before 4.2.8 + Date Resolved: Stable (4.2.8) 18 Dec 2014 + + Summary: A remote attacker can send a carefully crafted packet that + can overflow a stack buffer and potentially allow malicious + code to be executed with the privilege level of the ntpd process. + + Mitigation - any of: + - Upgrade to 4.2.8, or later. + - Follow BCP and put 'restrict ... noquery' in your ntp.conf file. + + Credit: This vulnerability was discovered by Stephen Roettger of the + Google Security Team. + +* Buffer overflow in configure() + + References: Sec 2669 / CVE-2014-9295 / VU#852879 + CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5 + Versions: All NTP4 releases before 4.2.8 + Date Resolved: Stable (4.2.8) 18 Dec 2014 + + Summary: A remote attacker can send a carefully crafted packet that + can overflow a stack buffer and potentially allow malicious + code to be executed with the privilege level of the ntpd process. + + Mitigation - any of: + - Upgrade to 4.2.8, or later. + - Follow BCP and put 'restrict ... noquery' in your ntp.conf file. + + Credit: This vulnerability was discovered by Stephen Roettger of the + Google Security Team. + +* receive(): missing return on error + + References: Sec 2670 / CVE-2014-9296 / VU#852879 + CVSS: (AV:N/AC:L/Au:N/C:N/I:N/A:P) Base Score: 5.0 + Versions: All NTP4 releases before 4.2.8 + Date Resolved: Stable (4.2.8) 18 Dec 2014 + + Summary: Code in ntp_proto.c:receive() was missing a 'return;' in + the code path where an error was detected, which meant + processing did not stop when a specific rare error occurred. + We haven't found a way for this bug to affect system integrity. + If there is no way to affect system integrity the base CVSS + score for this bug is 0. If there is one avenue through which + system integrity can be partially affected, the base score + becomes a 5. If system integrity can be partially affected + via all three integrity metrics, the CVSS base score become 7.5. + + Mitigation - any of: + - Upgrade to 4.2.8, or later, + - Remove or comment out all configuration directives + beginning with the crypto keyword in your ntp.conf file. + + Credit: This vulnerability was discovered by Stephen Roettger of the + Google Security Team. + +See http://support.ntp.org/security for more information. + +New features / changes in this release: + +Important Changes + +* Internal NTP Era counters + +The internal counters that track the "era" (range of years) we are in +rolls over every 136 years'. The current "era" started at the stroke of +midnight on 1 Jan 1900, and ends just before the stroke of midnight on +1 Jan 2036. +In the past, we have used the "midpoint" of the range to decide which +era we were in. Given the longevity of some products, it became clear +that it would be more functional to "look back" less, and "look forward" +more. We now compile a timestamp into the ntpd executable and when we +get a timestamp we us the "built-on" to tell us what era we are in. +This check "looks back" 10 years, and "looks forward" 126 years. + +* ntpdc responses disabled by default + +Dave Hart writes: + +For a long time, ntpq and its mostly text-based mode 6 (control) +protocol have been preferred over ntpdc and its mode 7 (private +request) protocol for runtime queries and configuration. There has +been a goal of deprecating ntpdc, previously held back by numerous +capabilities exposed by ntpdc with no ntpq equivalent. I have been +adding commands to ntpq to cover these cases, and I believe I've +covered them all, though I've not compared command-by-command +recently. + +As I've said previously, the binary mode 7 protocol involves a lot of +hand-rolled structure layout and byte-swapping code in both ntpd and +ntpdc which is hard to get right. As ntpd grows and changes, the +changes are difficult to expose via ntpdc while maintaining forward +and backward compatibility between ntpdc and ntpd. In contrast, +ntpq's text-based, label=value approach involves more code reuse and +allows compatible changes without extra work in most cases. + +Mode 7 has always been defined as vendor/implementation-specific while +mode 6 is described in RFC 1305 and intended to be open to interoperate +with other implementations. There is an early draft of an updated +mode 6 description that likely will join the other NTPv4 RFCs +eventually. (http://tools.ietf.org/html/draft-odonoghue-ntpv4-control-01) + +For these reasons, ntpd 4.2.7p230 by default disables processing of +ntpdc queries, reducing ntpd's attack surface and functionally +deprecating ntpdc. If you are in the habit of using ntpdc for certain +operations, please try the ntpq equivalent. If there's no equivalent, +please open a bug report at http://bugs.ntp.org./ + +In addition to the above, over 1100 issues have been resolved between +the 4.2.6 branch and 4.2.8. The ChangeLog file in the distribution +lists these. + +--- +NTP 4.2.6p5 (Harlan Stenn , 2011/12/24) + +Focus: Bug fixes + +Severity: Medium + +This is a recommended upgrade. + +This release updates sys_rootdisp and sys_jitter calculations to match the +RFC specification, fixes a potential IPv6 address matching error for the +"nic" and "interface" configuration directives, suppresses the creation of +extraneous ephemeral associations for certain broadcastclient and +multicastclient configurations, cleans up some ntpq display issues, and +includes improvements to orphan mode, minor bugs fixes and code clean-ups. + +New features / changes in this release: + +ntpd + + * Updated "nic" and "interface" IPv6 address handling to prevent + mismatches with localhost [::1] and wildcard [::] which resulted from + using the address/prefix format (e.g. fe80::/64) + * Fix orphan mode stratum incorrectly counting to infinity + * Orphan parent selection metric updated to includes missing ntohl() + * Non-printable stratum 16 refid no longer sent to ntp + * Duplicate ephemeral associations suppressed for broadcastclient and + multicastclient without broadcastdelay + * Exclude undetermined sys_refid from use in loopback TEST12 + * Exclude MODE_SERVER responses from KoD rate limiting + * Include root delay in clock_update() sys_rootdisp calculations + * get_systime() updated to exclude sys_residual offset (which only + affected bits "below" sys_tick, the precision threshold) + * sys.peer jitter weighting corrected in sys_jitter calculation + +ntpq + + * -n option extended to include the billboard "server" column + * IPv6 addresses in the local column truncated to prevent overruns + +--- +NTP 4.2.6p4 (Harlan Stenn , 2011/09/22) + +Focus: Bug fixes and portability improvements + +Severity: Medium + +This is a recommended upgrade. + +This release includes build infrastructure updates, code +clean-ups, minor bug fixes, fixes for a number of minor +ref-clock issues, and documentation revisions. + +Portability improvements affect AIX, HP-UX, Linux, OS X and 64-bit time_t. + +New features / changes in this release: + +Build system + +* Fix checking for struct rtattr +* Update config.guess and config.sub for AIX +* Upgrade required version of autogen and libopts for building + from our source code repository + +ntpd + +* Back-ported several fixes for Coverity warnings from ntp-dev +* Fix a rare boundary condition in UNLINK_EXPR_SLIST() +* Allow "logconfig =allall" configuration directive +* Bind tentative IPv6 addresses on Linux +* Correct WWVB/Spectracom driver to timestamp CR instead of LF +* Improved tally bit handling to prevent incorrect ntpq peer status reports +* Exclude the Undisciplined Local Clock and ACTS drivers from the initial + candidate list unless they are designated a "prefer peer" +* Prevent the consideration of Undisciplined Local Clock or ACTS drivers for + selection during the 'tos orphanwait' period +* Prefer an Orphan Mode Parent over the Undisciplined Local Clock or ACTS + drivers +* Improved support of the Parse Refclock trusttime flag in Meinberg mode +* Back-port utility routines from ntp-dev: mprintf(), emalloc_zero() +* Added the NTPD_TICKADJ_PPM environment variable for specifying baseline + clock slew on Microsoft Windows +* Code cleanup in libntpq + +ntpdc + +* Fix timerstats reporting + +ntpdate + +* Reduce time required to set clock +* Allow a timeout greater than 2 seconds + +sntp + +* Backward incompatible command-line option change: + -l/--filelog changed -l/--logfile (to be consistent with ntpd) + +Documentation + +* Update html2man. Fix some tags in the .html files +* Distribute ntp-wait.html + +--- +NTP 4.2.6p3 (Harlan Stenn , 2011/01/03) + +Focus: Bug fixes and portability improvements + +Severity: Medium + +This is a recommended upgrade. + +This release includes build infrastructure updates, code +clean-ups, minor bug fixes, fixes for a number of minor +ref-clock issues, and documentation revisions. + +Portability improvements in this release affect AIX, Atari FreeMiNT, +FreeBSD4, Linux and Microsoft Windows. + +New features / changes in this release: + +Build system +* Use lsb_release to get information about Linux distributions. +* 'test' is in /usr/bin (instead of /bin) on some systems. +* Basic sanity checks for the ChangeLog file. +* Source certain build files with ./filename for systems without . in PATH. +* IRIX portability fix. +* Use a single copy of the "libopts" code. +* autogen/libopts upgrade. +* configure.ac m4 quoting cleanup. + +ntpd +* Do not bind to IN6_IFF_ANYCAST addresses. +* Log the reason for exiting under Windows. +* Multicast fixes for Windows. +* Interpolation fixes for Windows. +* IPv4 and IPv6 Multicast fixes. +* Manycast solicitation fixes and general repairs. +* JJY refclock cleanup. +* NMEA refclock improvements. +* Oncore debug message cleanup. +* Palisade refclock now builds under Linux. +* Give RAWDCF more baud rates. +* Support Truetime Satellite clocks under Windows. +* Support Arbiter 1093C Satellite clocks under Windows. +* Make sure that the "filegen" configuration command defaults to "enable". +* Range-check the status codes (plus other cleanup) in the RIPE-NCC driver. +* Prohibit 'includefile' directive in remote configuration command. +* Fix 'nic' interface bindings. +* Fix the way we link with openssl if openssl is installed in the base + system. + +ntp-keygen +* Fix -V coredump. +* OpenSSL version display cleanup. + +ntpdc +* Many counters should be treated as unsigned. + +ntpdate +* Do not ignore replies with equal receive and transmit timestamps. + +ntpq +* libntpq warning cleanup. + +ntpsnmpd +* Correct SNMP type for "precision" and "resolution". +* Update the MIB from the draft version to RFC-5907. + +sntp +* Display timezone offset when showing time for sntp in the local + timezone. +* Pay proper attention to RATE KoD packets. +* Fix a miscalculation of the offset. +* Properly parse empty lines in the key file. +* Logging cleanup. +* Use tv_usec correctly in set_time(). +* Documentation cleanup. + +--- +NTP 4.2.6p2 (Harlan Stenn , 2010/07/08) + +Focus: Bug fixes and portability improvements + +Severity: Medium + +This is a recommended upgrade. + +This release includes build infrastructure updates, code +clean-ups, minor bug fixes, fixes for a number of minor +ref-clock issues, improved KOD handling, OpenSSL related +updates and documentation revisions. + +Portability improvements in this release affect Irix, Linux, +Mac OS, Microsoft Windows, OpenBSD and QNX6 + +New features / changes in this release: + +ntpd +* Range syntax for the trustedkey configuration directive +* Unified IPv4 and IPv6 restrict lists + +ntpdate +* Rate limiting and KOD handling + +ntpsnmpd +* default connection to net-snmpd via a unix-domain socket +* command-line 'socket name' option + +ntpq / ntpdc +* support for the "passwd ..." syntax +* key-type specific password prompts + +sntp +* MD5 authentication of an ntpd +* Broadcast and crypto +* OpenSSL support + +--- +NTP 4.2.6p1 (Harlan Stenn , 2010/04/09) + +Focus: Bug fixes, portability fixes, and documentation improvements + +Severity: Medium + +This is a recommended upgrade. + +--- +NTP 4.2.6 (Harlan Stenn , 2009/12/08) + +Focus: enhancements and bug fixes. + +--- +NTP 4.2.4p8 (Harlan Stenn , 2009/12/08) + +Focus: Security Fixes + +Severity: HIGH + +This release fixes the following high-severity vulnerability: + +* [Sec 1331] DoS with mode 7 packets - CVE-2009-3563. + + See http://support.ntp.org/security for more information. + + NTP mode 7 (MODE_PRIVATE) is used by the ntpdc query and control utility. + In contrast, ntpq uses NTP mode 6 (MODE_CONTROL), while routine NTP time + transfers use modes 1 through 5. Upon receipt of an incorrect mode 7 + request or a mode 7 error response from an address which is not listed + in a "restrict ... noquery" or "restrict ... ignore" statement, ntpd will + reply with a mode 7 error response (and log a message). In this case: + + * If an attacker spoofs the source address of ntpd host A in a + mode 7 response packet sent to ntpd host B, both A and B will + continuously send each other error responses, for as long as + those packets get through. + + * If an attacker spoofs an address of ntpd host A in a mode 7 + response packet sent to ntpd host A, A will respond to itself + endlessly, consuming CPU and logging excessively. + + Credit for finding this vulnerability goes to Robin Park and Dmitri + Vinokurov of Alcatel-Lucent. + +THIS IS A STRONGLY RECOMMENDED UPGRADE. + +--- +ntpd now syncs to refclocks right away. + +Backward-Incompatible changes: + +ntpd no longer accepts '-v name' or '-V name' to define internal variables. +Use '--var name' or '--dvar name' instead. (Bug 817) + +--- +NTP 4.2.4p7 (Harlan Stenn , 2009/05/04) + +Focus: Security and Bug Fixes + +Severity: HIGH + +This release fixes the following high-severity vulnerability: + +* [Sec 1151] Remote exploit if autokey is enabled. CVE-2009-1252 + + See http://support.ntp.org/security for more information. + + If autokey is enabled (if ntp.conf contains a "crypto pw whatever" + line) then a carefully crafted packet sent to the machine will cause + a buffer overflow and possible execution of injected code, running + with the privileges of the ntpd process (often root). + + Credit for finding this vulnerability goes to Chris Ries of CMU. + +This release fixes the following low-severity vulnerabilities: + +* [Sec 1144] limited (two byte) buffer overflow in ntpq. CVE-2009-0159 + Credit for finding this vulnerability goes to Geoff Keating of Apple. + +* [Sec 1149] use SO_EXCLUSIVEADDRUSE on Windows + Credit for finding this issue goes to Dave Hart. + +This release fixes a number of bugs and adds some improvements: + +* Improved logging +* Fix many compiler warnings +* Many fixes and improvements for Windows +* Adds support for AIX 6.1 +* Resolves some issues under MacOS X and Solaris + +THIS IS A STRONGLY RECOMMENDED UPGRADE. + +--- +NTP 4.2.4p6 (Harlan Stenn , 2009/01/07) + +Focus: Security Fix + +Severity: Low + +This release fixes oCERT.org's CVE-2009-0021, a vulnerability affecting +the OpenSSL library relating to the incorrect checking of the return +value of EVP_VerifyFinal function. + +Credit for finding this issue goes to the Google Security Team for +finding the original issue with OpenSSL, and to ocert.org for finding +the problem in NTP and telling us about it. + +This is a recommended upgrade. +--- +NTP 4.2.4p5 (Harlan Stenn , 2008/08/17) + +Focus: Minor Bugfixes + +This release fixes a number of Windows-specific ntpd bugs and +platform-independent ntpdate bugs. A logging bugfix has been applied +to the ONCORE driver. + +The "dynamic" keyword and is now obsolete and deferred binding to local +interfaces is the new default. The minimum time restriction for the +interface update interval has been dropped. + +A number of minor build system and documentation fixes are included. + +This is a recommended upgrade for Windows. + +--- +NTP 4.2.4p4 (Harlan Stenn , 2007/09/10) + +Focus: Minor Bugfixes + +This release updates certain copyright information, fixes several display +bugs in ntpdc, avoids SIGIO interrupting malloc(), cleans up file descriptor +shutdown in the parse refclock driver, removes some lint from the code, +stops accessing certain buffers immediately after they were freed, fixes +a problem with non-command-line specification of -6, and allows the loopback +interface to share addresses with other interfaces. + +--- +NTP 4.2.4p3 (Harlan Stenn , 2007/06/29) + +Focus: Minor Bugfixes + +This release fixes a bug in Windows that made it difficult to +terminate ntpd under windows. +This is a recommended upgrade for Windows. + +--- +NTP 4.2.4p2 (Harlan Stenn , 2007/06/19) + +Focus: Minor Bugfixes + +This release fixes a multicast mode authentication problem, +an error in NTP packet handling on Windows that could lead to +ntpd crashing, and several other minor bugs. Handling of +multicast interfaces and logging configuration were improved. +The required versions of autogen and libopts were incremented. +This is a recommended upgrade for Windows and multicast users. + +--- +NTP 4.2.4 (Harlan Stenn , 2006/12/31) + +Focus: enhancements and bug fixes. + +Dynamic interface rescanning was added to simplify the use of ntpd in +conjunction with DHCP. GNU AutoGen is used for its command-line options +processing. Separate PPS devices are supported for PARSE refclocks, MD5 +signatures are now provided for the release files. Drivers have been +added for some new ref-clocks and have been removed for some older +ref-clocks. This release also includes other improvements, documentation +and bug fixes. + +K&R C is no longer supported as of NTP-4.2.4. We are now aiming for ANSI +C support. + +--- +NTP 4.2.0 (Harlan Stenn , 2003/10/15) + +Focus: enhancements and bug fixes. +--- NTP 4.2.8p17 (Harlan Stenn , 2023 Jun 06) Focus: Bug fixes diff --git a/contrib/ntp/adjtimed/Makefile.in b/contrib/ntp/adjtimed/Makefile.in index 7e7469c4f1b6..b97ef133137b 100644 --- a/contrib/ntp/adjtimed/Makefile.in +++ b/contrib/ntp/adjtimed/Makefile.in @@ -96,6 +96,7 @@ bin_PROGRAMS = libexec_PROGRAMS = sbin_PROGRAMS = EXTRA_PROGRAMS = adjtimed$(EXEEXT) +@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp subdir = adjtimed ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \ @@ -389,6 +390,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -487,8 +489,8 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -BUILT_SOURCES = check-libntp .deps-ver -CLEANFILES = check-libntp .deps-ver +BUILT_SOURCES = $(am__append_1) .deps-ver +CLEANFILES = .deps-ver DISTCLEANFILES = $(DEPDIR)/deps-ver AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS) AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS) @@ -967,11 +969,10 @@ install-exec-hook: # -check-libntp: $(top_builddir)/libntp/libntp.a - @: avoid default SCCS get by some make implementations +.PHONY: check-libntp -$(top_builddir)/libntp/libntp.a: - cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a +@LIBNTP_SUBMAKES_TRUE@check-libntp: +@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver @[ -f $@ ] || \ cp $(top_srcdir)/deps-ver $@ diff --git a/contrib/ntp/check-libntp.mf b/contrib/ntp/check-libntp.mf index 07c855b4be78..86fcca45b0e3 100644 --- a/contrib/ntp/check-libntp.mf +++ b/contrib/ntp/check-libntp.mf @@ -3,12 +3,12 @@ ## sntp/check-libntp.mf ## The above file has a version of this for the sntp tree. +.PHONY: check-libntp + +if LIBNTP_SUBMAKES BUILT_SOURCES += check-libntp -CLEANFILES += check-libntp -check-libntp: $(top_builddir)/libntp/libntp.a - @: avoid default SCCS get by some make implementations - -$(top_builddir)/libntp/libntp.a: +check-libntp: cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a +endif diff --git a/contrib/ntp/check-libntpd.mf b/contrib/ntp/check-libntpd.mf index 46304dd5f236..45133ad52c1c 100644 --- a/contrib/ntp/check-libntpd.mf +++ b/contrib/ntp/check-libntpd.mf @@ -4,16 +4,7 @@ BUILT_SOURCES += check-libntpd -# CLEANFILES addition below won't be needed after a while. -# Leave it in for now for folks tracking the source repo -# who have the file from a former version of the rule. -# DLH Jan 2023 - -CLEANFILES += check-libntpd - -check-libntpd: $(top_builddir)/ntpd/libntpd.a - @: avoid default SCCS get by some make implementations - -$(top_builddir)/ntpd/libntpd.a: +.PHONY: check-libntpd +check-libntpd: cd $(top_builddir)/ntpd && $(MAKE) $(AM_MAKEFLAGS) libntpd.a diff --git a/contrib/ntp/check-libunity.mf b/contrib/ntp/check-libunity.mf index 4e052058c0c3..830c72c1a421 100644 --- a/contrib/ntp/check-libunity.mf +++ b/contrib/ntp/check-libunity.mf @@ -4,10 +4,10 @@ ## The above file has a version of this for the sntp tree. BUILT_SOURCES += check-libunity +CLEANFILES += check-libunity check-libunity: $(top_builddir)/sntp/unity/libunity.a - @: avoid default SCCS get by some make implementations + @echo stamp > $@ $(top_builddir)/sntp/unity/libunity.a: cd $(top_builddir)/sntp/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a - diff --git a/contrib/ntp/check-scm-rev.mf b/contrib/ntp/check-scm-rev.mf index e2abbf0e452c..7c0d1be2892f 100644 --- a/contrib/ntp/check-scm-rev.mf +++ b/contrib/ntp/check-scm-rev.mf @@ -1,8 +1,6 @@ $(top_srcdir)/sntp/scm-rev: FRC.scm-rev $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev +.PHONY: FRC.scm-rev FRC.scm-rev: - @: FRC.scm-rev "force" depends on nothing and is not a file, so is \ - always out-of-date causing targets which depend on it to also \ - be outdated so their rules to fire each time they are built. - + @: FRC.scm-rev is always out of date, triggering the check every make invocation. diff --git a/contrib/ntp/clockstuff/Makefile.in b/contrib/ntp/clockstuff/Makefile.in index f33483eb59c8..b24cb48d113b 100644 --- a/contrib/ntp/clockstuff/Makefile.in +++ b/contrib/ntp/clockstuff/Makefile.in @@ -89,6 +89,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = propdelay$(EXEEXT) chutest$(EXEEXT) +@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp subdir = clockstuff ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \ @@ -384,6 +385,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -488,8 +490,8 @@ AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS) LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) AM_LDFLAGS = $(NTP_HARD_LDFLAGS) propdelay_LDADD = $(LDADD) -BUILT_SOURCES = check-libntp .deps-ver -CLEANFILES = check-libntp .deps-ver +BUILT_SOURCES = $(am__append_1) .deps-ver +CLEANFILES = .deps-ver DISTCLEANFILES = $(DEPDIR)/deps-ver NTP_INCS = -I$(top_srcdir)/include \ -I$(top_srcdir)/libntp/lib/isc/include \ @@ -809,11 +811,10 @@ uninstall-am: .PRECIOUS: Makefile -check-libntp: $(top_builddir)/libntp/libntp.a - @: avoid default SCCS get by some make implementations +.PHONY: check-libntp -$(top_builddir)/libntp/libntp.a: - cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a +@LIBNTP_SUBMAKES_TRUE@check-libntp: +@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver @[ -f $@ ] || \ cp $(top_srcdir)/deps-ver $@ diff --git a/contrib/ntp/config.h.in b/contrib/ntp/config.h.in index c00eba442298..bfaabf02e183 100644 --- a/contrib/ntp/config.h.in +++ b/contrib/ntp/config.h.in @@ -496,9 +496,6 @@ /* Define to 1 if the system has the type `int32'. */ #undef HAVE_INT32 -/* int32 type in DNS headers, not others. */ -#undef HAVE_INT32_ONLY_WITH_DNS - /* Define to 1 if the system has the type `int32_t'. */ #undef HAVE_INT32_T @@ -691,9 +688,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_CMAC_H -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_HMAC_H - /* Define to 1 if the system has the type `pid_t'. */ #undef HAVE_PID_T @@ -970,7 +964,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYSEXITS_H -/* */ +/* syslog.h provides facilitynames */ #undef HAVE_SYSLOG_FACILITYNAMES /* Define to 1 if you have the header file. */ @@ -1035,6 +1029,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PRCTL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PROCCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PROCSET_H @@ -1221,9 +1218,6 @@ /* Define to 1 if the system has the type `u_int32'. */ #undef HAVE_U_INT32 -/* u_int32 type in DNS headers, not others. */ -#undef HAVE_U_INT32_ONLY_WITH_DNS - /* Define to 1 if you have the header file. */ #undef HAVE_VALUES_H @@ -1477,6 +1471,9 @@ /* Use OpenSSL? */ #undef OPENSSL +/* Suppress OpenSSL 3 deprecation warnings */ +#undef OPENSSL_SUPPRESS_DEPRECATED + /* Should we open the broadcast socket? */ #undef OPEN_BCAST_SOCKET @@ -1619,10 +1616,6 @@ /* Is K_TICK_NAME in nanoseconds? */ #undef TICK_NANO -/* Define to 1 if you can safely include both and . This - macro is obsolete. */ -#undef TIME_WITH_SYS_TIME - /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME @@ -1820,15 +1813,8 @@ typedef unsigned int uintptr_t; /* Define to `unsigned int' if does not define. */ #undef size_t - - #if !defined(_KERNEL) && !defined(PARSESTREAM) - /* - * stdio.h must be included after _GNU_SOURCE is defined - * but before #define snprintf rpl_snprintf - */ - # include - #endif - + #include "c99_snprintf.h" + /* Define to rpl_snprintf if the replacement function should be used. */ #undef snprintf @@ -1887,3 +1873,15 @@ typedef union mpinfou { # endif #endif /* !defined(_KERNEL) && !defined(PARSESTREAM) */ + + + /* + * Macro to use in otherwise-empty source files to comply with ANSI C + * requirement that each translation unit (source file) contain some + * declaration. This has commonly been done by declaring an unused + * global variable of type int or char. An extern reference to abs() + * serves the same purpose without bloat. We once used exit() but + * that can produce warnings on systems that declare exit() noreturn. + */ + #define NONEMPTY_TRANSLATION_UNIT extern int abs(int); + diff --git a/contrib/ntp/configure b/contrib/ntp/configure index 5d09904bea03..5172c2d5521f 100755 --- a/contrib/ntp/configure +++ b/contrib/ntp/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for ntp 4.2.8p17. +# Generated by GNU Autoconf 2.71 for ntp 4.2.8p18. # # Report bugs to . # @@ -183,7 +183,6 @@ test -x / || exit 1" as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -191,7 +190,8 @@ test \$(( 1 + 1 )) = 2 || exit 1 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ntp' PACKAGE_TARNAME='ntp' -PACKAGE_VERSION='4.2.8p17' -PACKAGE_STRING='ntp 4.2.8p17' +PACKAGE_VERSION='4.2.8p18' +PACKAGE_STRING='ntp 4.2.8p18' PACKAGE_BUGREPORT='https://bugs.ntp.org/' PACKAGE_URL='https://www.ntp.org/' @@ -698,7 +698,6 @@ MAKE_PARSEKMODULE DCFD TESTDCF MAKE_CHECK_LAYOUT -VER_SUFFIX MAKE_CHECK_Y2K MAKE_LIBPARSE_KERNEL MAKE_LIBPARSE @@ -710,6 +709,10 @@ PATH_NET_SNMP_CONFIG CONFIG_SHELL PATH_TEST PATH_PERL +PATH_OPENSSL +VER_SUFFIX +LIBNTP_SUBMAKES_FALSE +LIBNTP_SUBMAKES_TRUE LIBOBJS PTHREADS_FALSE PTHREADS_TRUE @@ -759,6 +762,8 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP +EGREP +GREP SED LIBTOOL ac_ct_AR @@ -857,14 +862,12 @@ NTP_HARD_CPPFLAGS NTP_HARD_CFLAGS YFLAGS YACC +CPP LDFLAGS_NTP LDADD_NTP CPPFLAGS_NTP CFLAGS_NTP CC_NOFORMAT -EGREP -GREP -CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -968,6 +971,7 @@ plot_summary_opts' ac_user_opts=' enable_option_checking enable_silent_rules +enable_build_framework_help enable_dependency_tracking with_hardenfile with_locfile @@ -995,7 +999,11 @@ enable_linuxcaps enable_solarisprivs enable_trustedbsd_mac enable_signalled_io -with_arlib +with_crypto +with_openssl_libdir +with_openssl_incdir +enable_verbose_ssl +enable_openssl_random with_net_snmp_config enable_libseccomp with_stack_limit @@ -1057,11 +1065,6 @@ enable_TRIMTSIP enable_WHARTON enable_VARITEXT enable_SEL240X -with_crypto -with_openssl_libdir -with_openssl_incdir -with_rpath -enable_openssl_random enable_autokey enable_kmem enable_accurate_adjtime @@ -1651,7 +1654,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ntp 4.2.8p17 to adapt to many kinds of systems. +\`configure' configures ntp 4.2.8p18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1722,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ntp 4.2.8p17:";; + short | recursive ) echo "Configuration of ntp 4.2.8p18:";; esac cat <<\_ACEOF @@ -1734,6 +1737,8 @@ Optional Features and Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") + --enable-build-framework-help + + enable build framework help --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking @@ -1765,14 +1770,20 @@ Optional Features and Packages: --enable-thread-support s use threads (+ if available) --with-threads with threads [auto] --with-yielding-select with yielding select [auto] - --enable-c99-snprintf s force replacement + --enable-c99-snprintf s use replacement printf family --enable-clockctl s Use /dev/clockctl for non-root clock control --enable-linuxcaps + Use Linux capabilities for non-root clock control --enable-solarisprivs + Use Solaris privileges for non-root clock control --enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock control --enable-signalled-io s Use signalled IO if we can - --with-arlib - deprecated, arlib not distributed + --with-crypto + =openssl,libcrypto + --with-openssl-libdir + =/something/reasonable + + --with-openssl-incdir + =search likely dirs + + --enable-verbose-ssl - show crypto lib detection details + --enable-openssl-random + Use SSL lib's secure random numbers --with-net-snmp-config + =net-snmp-config --enable-libseccomp EXPERIMENTAL: enable support for libseccomp sandboxing (default is no) @@ -1837,16 +1848,6 @@ Optional Features and Packages: --enable-WHARTON s WHARTON 400A Series clock --enable-VARITEXT s VARITEXT clock --enable-SEL240X s SEL240X clock - --with-crypto + =openssl,libcrypto - - --with-openssl-libdir + =/something/reasonable - - --with-openssl-incdir + =/something/reasonable - - --without-rpath s Disable auto-added -R linker paths - - --enable-openssl-random Use OpenSSL's crypto random number functions, if - available (default is yes) --enable-autokey + support NTP Autokey protocol --enable-kmem s read /dev/kmem for tick and/or tickadj --enable-accurate-adjtime @@ -1967,7 +1968,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ntp configure 4.2.8p17 +ntp configure 4.2.8p18 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2053,44 +2054,6 @@ printf "%s\n" "$ac_res" >&6; } } # ac_fn_c_check_header_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2181,6 +2144,44 @@ fi } # ac_fn_c_try_run +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2624,7 +2625,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ntp $as_me 4.2.8p17, which was +It was created by ntp $as_me 4.2.8p18, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3218,7 +3219,6 @@ as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF" as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H" as_fn_append ac_func_c_list " fork HAVE_FORK" as_fn_append ac_func_c_list " vfork HAVE_VFORK" -as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" as_fn_append ac_header_c_list " stdarg.h stdarg_h HAVE_STDARG_H" # Auxiliary files required by this configure script. @@ -3420,7 +3420,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # the date YYYYMMDD optionally with -HHMM if there is more than one # bump in a day. -ntp_configure_cache_version=20230326 +ntp_configure_cache_version=20240218 # When the cache version of config.cache and configure do not # match, NTP_CACHEVERSION will flush the cache. @@ -4039,7 +4039,7 @@ fi # Define the identity of the package. PACKAGE='ntp' - VERSION='4.2.8p17' + VERSION='4.2.8p18' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -4266,6 +4266,25 @@ printf "%s\n" "#define STR_SYSTEM \"$host\"" >>confdefs.h ac_config_headers="$ac_config_headers config.h" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should enable build framework help" >&5 +printf %s "checking if we should enable build framework help... " >&6; } +# Check whether --enable-build-framework-help was given. +if test ${enable_build_framework_help+y} +then : + enableval=$enable_build_framework_help; ntp_ok=$enableval +else $as_nop + ntp_ok=yes + +fi + +case "$ntp_ok" in + yes) + ntp_cv_build_framework_help=yes ;; + *) ntp_cv_build_framework_help=no ;; +esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5 +printf "%s\n" "$ntp_ok" >&6; } + ntp_atom_ok=${ntp_atom_ok=no} ntp_oncore_ok=${ntp_oncore_ok=no} ntp_parse_ok=${ntp_parse_ok=no} @@ -5221,6 +5240,7 @@ fi + ac_header= ac_cache= for ac_item in $ac_header_c_list do @@ -5392,333 +5412,7 @@ then : fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - - - - - - -# Ralf Wildenhues: With per-target flags we need CC_C_O -# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O - -if test $ac_cv_c_compiler_gnu = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -printf %s "checking whether $CC needs -traditional... " >&6; } -if test ${ac_cv_prog_gcc_traditional+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_pattern="Autoconf.*'x'" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1 -then : - ac_cv_prog_gcc_traditional=yes -else $as_nop - ac_cv_prog_gcc_traditional=no -fi -rm -rf conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1 -then : - ac_cv_prog_gcc_traditional=yes -fi -rm -rf conftest* - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi @@ -5885,14 +5579,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5 printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; } + # + # $ntp_cv_gcc_Winit_self is tested later to add the + # flag to CFLAGS_NTP. # # libopts specifically builds a string with embedded NULs. # This causes a bunch of distracting warnings due to -Wformat. - # Let's see if we can figure out how to disable these. # - CFLAGS="$SAVED_CFLAGS -Wno-format" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format" >&5 -printf %s "checking if $CC can handle -Wno-format... " >&6; } + CFLAGS="$SAVED_CFLAGS -Wno-format -Wno-format-security" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format -Wno-format-security" >&5 +printf %s "checking if $CC can handle -Wno-format -Wno-format-security... " >&6; } if test ${ntp_cv_gcc_Wno_format+y} then : printf %s "(cached) " >&6 @@ -5922,21 +5618,50 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5 printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; } - case "$ntp_cv_gcc_Wno_format" in + no) ntp_cv_gcc_Wno_format_truncation=no + ;; yes) - CC_NOFORMAT="$CC_NOFORMAT -Wno-format" - ;; - no) - ;; + CC_NOFORMAT="-Wno-format -Wno-format-security" + CFLAGS="$SAVED_CFLAGS -Wformat -Wno-format-truncation -Werror" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wformat -Wno-format-truncation" >&5 +printf %s "checking if $CC can handle -Wformat -Wno-format-truncation... " >&6; } +if test ${ntp_cv_gcc_Wno_format_truncation+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ntp_cv_gcc_Wno_format_truncation=yes +else $as_nop + ntp_cv_gcc_Wno_format_truncation=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format_truncation" >&5 +printf "%s\n" "$ntp_cv_gcc_Wno_format_truncation" >&6; } + # + # $ntp_cv_gcc_Wno_format_truncation is tested later to add the + # flag to CFLAGS. + # esac CFLAGS="$SAVED_CFLAGS" { SAVED_CFLAGS=; unset SAVED_CFLAGS;} - # - # $ntp_cv_gcc_Winit_self is tested later to add the - # flag to CFLAGS_NTP. - # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5 printf %s "checking if linker supports omitting unused code and data... " >&6; } if test ${ntp_cv_gc_sections_runs+y} @@ -5944,7 +5669,17 @@ then : printf %s "(cached) " >&6 else $as_nop - origCFLAGS="$CFLAGS" + # NetBSD will link but likely not run with --gc-sections + # http://bugs.ntp.org/1844 + # http://gnats.netbsd.org/40401 + # --gc-sections causes attempt to load as linux elf, with + # wrong syscalls in place. Test a little gauntlet of + # simple stdio read code checking for errors, expecting + # enough syscall differences that the NetBSD code will + # fail even with Linux emulation working as designed. + # A shorter test could be refined by someone with access + # to a NetBSD host with Linux emulation working. + origCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wl,--gc-sections" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6034,6 +5769,10 @@ printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; } yes) CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow" esac + case "$ntp_cv_gcc_Wno_format_truncation" in + yes) + CFLAGS_NTP="$CFLAGS_NTP -Wno-format-truncation" + esac # -W[no-]strict-prototypes might be added by NTP_OPENSSL esac @@ -7080,38 +6819,6 @@ esac # So far, the only shared library we might use is libopts. # It's a small library - we might as well use a static version of it. -# Check whether --enable-shared was given. -if test ${enable_shared+y} -then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_shared=no -fi - - - - - - - - - case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -7295,6 +7002,148 @@ Xsed="$SED -e 1s/^X//" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} @@ -10575,6 +10424,36 @@ fi # Set options +# Check whether --enable-shared was given. +if test ${enable_shared+y} +then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else $as_nop + enable_shared=no +fi + + + + + + + @@ -14874,7 +14753,7 @@ CC=$lt_save_CC # Therefore, by default: # - use the version of libopts we ship with # - do not install it -# - build a static copy (AC_DISABLE_SHARED - done earlier) +# - build a static copy (disable-shared - done earlier) case "${enable_local_libopts+set}" in set) ;; *) enable_local_libopts=yes ;; @@ -16526,8 +16405,6 @@ case "$ntp_use_local_libevent" in *) # If we have (a good enough) pkg-config, see if it can find libevent case "$PKG_CONFIG" in /*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5 -printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; } if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent then ntp_use_local_libevent=no @@ -16536,6 +16413,8 @@ printf %s "checking if libevent $ntp_libevent_min_version or later is installed. *.*) ;; *) ntp_libevent_version='(unknown)' ;; esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5 +printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5 printf "%s\n" "yes, version $ntp_libevent_version" >&6; } CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads` @@ -16570,6 +16449,8 @@ printf "%s\n" "yes, version $ntp_libevent_version" >&6; } # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS # is "pthreads"? CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5 +printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi @@ -17483,11 +17364,23 @@ fi +VER_SUFFIX= + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: " >&5 +printf "%s\n" "$as_me: " >&6;} + esac + + + + + + # HMS: Save $LIBS and empty it. # any LIBS we add here should go in to LDADD_LIBNTP -__LIBS=$LIBS +SAVED_LIBS=$LIBS LIBS= @@ -19228,14 +19121,6 @@ printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h esac -# Obsolete code to be removed. -if test $ac_cv_header_sys_time_h = yes; then - -printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi -# End of obsolete code. - # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -25091,100 +24976,6 @@ fi -case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in - no::yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5 -printf %s "checking for int32 with DNS headers included... " >&6; } -if test ${ntp_cv_type_int32_with_dns+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #ifdef HAVE_ARPA_NAMESER_H - # include - #endif - #include - -int -main (void) -{ - - size_t cb = sizeof(int32); - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ntp_cv_type_int32_with_dns=yes -else $as_nop - ntp_cv_type_int32_with_dns=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5 -printf "%s\n" "$ntp_cv_type_int32_with_dns" >&6; } - case "$ntp_cv_type_int32_with_dns" in - yes) - -printf "%s\n" "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h - - esac -esac - -case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in - no::yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5 -printf %s "checking for u_int32 with DNS headers included... " >&6; } -if test ${ntp_cv_type_u_int32_with_dns+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #ifdef HAVE_ARPA_NAMESER_H - # include - #endif - #include - -int -main (void) -{ - - size_t cb = sizeof(u_int32); - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ntp_cv_type_u_int32_with_dns=yes -else $as_nop - ntp_cv_type_u_int32_with_dns=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5 -printf "%s\n" "$ntp_cv_type_u_int32_with_dns" >&6; } - case "$ntp_cv_type_u_int32_with_dns" in - yes) - -printf "%s\n" "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h - - esac -esac - ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" " #ifdef HAVE_SYS_TIME_H # include @@ -25766,34 +25557,1192 @@ printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;} ;; esac - -LDADD_LIBNTP="$LDADD_LIBNTP $LIBS" -LIBS=$__LIBS -{ __LIBS=; unset __LIBS;} - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5 -printf %s "checking for deprecated --with-arlib... " >&6; } - -# Check whether --with-arlib was given. -if test ${with_arlib+y} -then : - withval=$with_arlib; ans=$withval -else $as_nop - ans=no + if test x"$enable_dependency_tracking" = x"yes"; then + LIBNTP_SUBMAKES_TRUE= + LIBNTP_SUBMAKES_FALSE='#' +else + LIBNTP_SUBMAKES_TRUE='#' + LIBNTP_SUBMAKES_FALSE= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5 -printf "%s\n" "$ans" >&6; } -case "$ans" in - yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&5 -printf "%s\n" "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&2;} + + + +# Check whether --with-crypto was given. +if test ${with_crypto+y} +then : + withval=$with_crypto; case "$with_crypto" in + yes) + with_crypto=openssl,libcrypto + esac + +else $as_nop + with_crypto=openssl,libcrypto +fi + + +# Check whether --with-openssl-libdir was given. +if test ${with_openssl_libdir+y} +then : + withval=$with_openssl_libdir; +fi + + +# Check whether --with-openssl-incdir was given. +if test ${with_openssl_incdir+y} +then : + withval=$with_openssl_incdir; +fi + +# Check whether --enable-verbose-ssl was given. +if test ${enable_verbose_ssl+y} +then : + enableval=$enable_verbose_ssl; +else $as_nop + enable_verbose_ssl=no +fi + + +ntp_openssl=no +ntp_openssl_from_pkg_config=no +ntp_ssl_incdir= +ntp_ssl_cflags= +ntp_ssl_cppflags= +ntp_ssl_libdir= +ntp_ssl_libs_L= +ntp_ssl_libs_l= +ntp_ssl_libs= +ntp_ssl_ldflags= + +NTPSSL_SAVED_CFLAGS="$CFLAGS" +NTPSSL_SAVED_CPPFLAGS="$CPPFLAGS" +NTPSSL_SAVED_LIBS="$LIBS" +NTPSSL_SAVED_LDFLAGS="$LDFLAGS" + +# Extract the first word of "openssl", so it can be a program name with args. +set dummy openssl; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PATH_OPENSSL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PATH_OPENSSL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_OPENSSL="$PATH_OPENSSL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_OPENSSL="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PATH_OPENSSL=$ac_cv_path_PATH_OPENSSL +if test -n "$PATH_OPENSSL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_OPENSSL" >&5 +printf "%s\n" "$PATH_OPENSSL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +str="$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $str" >&5 +printf "%s\n" "$as_me: $str" >&6;} + esac + + +{ str=; unset str;} + +# Make sure neither/both --with_openssl-{inc,lib}dir are given +case "${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in + notgiven:notgiven) ;; + *notgiven*) + as_fn_error $? "only one of --with-openssl-{inc,lib}dir=... given - provide both or neither" "$LINENO" 5 ;; esac +# HMS: Today there are only 2 case options. We probably want a third +# *:*:notgiven:notgiven +# and in that case we would validate the path in PKG_CONFIG_PATH. +# Unless we can do it with 2 cases, where the 2nd case is *:*:... +# and we do a reality check on execpath and the headers/libraries. +# +## +# if $with_crypto is not "no": +# if --with-openssl-{inc,lib}dir are not given: +# we should use pkg-config to find openssl +# if we don't have pkg-config, if openssl is in the base OS, use that. +## +case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in + no:*) ;; + *:notempty:notgiven:notgiven) + # If PKG_CONFIG is notempty and we haven't been given openssl paths, + # then let's make sure that the openssl executable's path corresponds + # to the path in openssl.pc, and 'openssl version' matches the Version + # in openssl.pc. If $PKG_CONFIG tells us an INCPATH and/or a LIBPATH, + # then should we reality check them? + ## INCPATH + # harlan@ntp-testbuild.tal1> openssl version + # OpenSSL 1.1.1t 7 Feb 2023 + # harlan@ntp-testbuild.tal1> grep 1.1.1t /ntpbuild/include/openssl/* + # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023" + # harlan@ntp-testbuild.tal1> + ## LIBPATH + # harlan@ntp-testbuild.tal1> strings -a /ntpbuild/lib/libcrypto.* | fgrep 1.1.1t + # OpenSSL 1.1.1t 7 Feb 2023 + # OpenSSL 1.1.1t 7 Feb 2023 + # OpenSSL 1.1.1t 7 Feb 2023 + # harlan@ntp-testbuild.tal1> ls /ntpbuild/lib/libcrypto.* + # /ntpbuild/lib/libcrypto.a /ntpbuild/lib/libcrypto.so.1.1* + # /ntpbuild/lib/libcrypto.so@ + # harlan@ntp-testbuild.tal1> + ## + # Having said this, do we really care if the openssl executable that + # we have found is matched with the INCPATH and LIBPATH? + # One answer: Probably not, but we should complain on a mismatch as + # otherwise runtime differences could easily cause problems/drama. + + ##BO + # ntp_cv_build_framework_help=yes + save_PKG_CONFIG_PATH=${PKG_CONFIG_PATH} + for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do + case "$pkg" in + openssl) + if $PKG_CONFIG --exists $pkg ; then + # Found it - yay + # Do we want to check we found the right one? + # --modver + # --variable={libdir,includedir} (varname) + overf=`openssl version` + overs=`echo $overf | awk '{print }'` + case "$overs" in + 0.*) ;; # Should we squawk? + 1.0.*) ;; # Should we squawk? + 1.1.*) ;; # Should we squawk? + 3.*) + oinc=`openssl --variable=includedir` + olib=`openssl --variable=libdir` + # How should we use these? + ;; + *) ;; # Should we squawk? + esac + # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023" + # grep 1.1.1t /ntpbuild/lib/libcrypto.a + # strings -a /ntpbuild/lib/libcrypto.a | grep 1.1.1t + # OpenSSL 1.1.1t 7 Feb 2023 + # harlan@ntp-testbuild.tal1> + # which should match $overf + ## + # harlan@ntp-testbuild.tal1> echo '"OpenSSL 1.1.1t 7 Feb 2023"' | cut -f 2 -d\" + # OpenSSL 1.1.1t 7 Feb 2023 + # harlan@ntp-testbuild.tal1> grep OPENSSL_VERSION_TEXT /ntpbuild/include/openssl/opensslv.h + # # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023" + # harlan@ntp-testbuild.tal1> + ## + + else + # This is a hack, but it's reasonable. + pkgpath="`echo $PATH_OPENSSL | sed -e 's:/bin/openssl$::'`/lib/pkgconfig" + test -d "$pkgpath" || pkgpath= + # echo "pkgpath is <$pkgpath>" + # echo "PKG_CONFIG_PATH is <$PKG_CONFIG_PATH>" + case "$pkgpath" in + '') ;; # Nothing to see here... + *) case ":$PKG_CONFIG_PATH:" in + ::) + PKG_CONFIG_PATH=$pkgpath + export PKG_CONFIG_PATH + ;; + *:$pkgpath:*) + # Already there... + ;; + *) + PKG_CONFIG_PATH="$pkgpath:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH + ;; + esac + ;; + esac + fi + ;; + esac + done + ##EO + + for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5 +printf %s "checking pkg-config for $pkg... " >&6; } + if $PKG_CONFIG --exists $pkg ; then + ntp_ssl_cppflags="`$PKG_CONFIG --cflags-only-I $pkg`" + case "$ntp_ssl_cppflags" in + '') + ntp_ssl_incdir='not needed' + ;; + *) + ntp_ssl_incdir="`echo $ntp_ssl_cppflags | $SED -e 's/-I//'`" + esac + ntp_ssl_cflags="`$PKG_CONFIG --cflags-only-other $pkg`" + ntp_ssl_libs_L="`$PKG_CONFIG --libs-only-L $pkg`" + case "$ntp_ssl_libs_L" in + '') + ntp_ssl_libdir='not needed' + ;; + *) + ntp_ssl_libdir="`echo $ntp_ssl_libs_L | $SED -e 's/-L//'`" + esac + ntp_ssl_libs_l="`$PKG_CONFIG --libs-only-l $pkg`" + ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l" + ntp_ssl_ldflags="`$PKG_CONFIG --libs-only-other $pkg`" + ntp_openssl=yes + ntp_openssl_from_pkg_config=yes + ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`" + case "$ntp_openssl_version" in + *.*) ;; + *) ntp_openssl_version='(unknown)' ;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5 +printf "%s\n" "yes, version $ntp_openssl_version" >&6; } + + break + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + done + { pkg=; unset pkg;} +esac +case "$with_crypto" in + no) ;; + *) + case "$with_openssl_libdir" in + '') ;; + *) + ntp_ssl_libdir="$with_openssl_libdir" + ntp_ssl_libs_L="-L$with_openssl_libdir" + ntp_ssl_libs_l="-lcrypto" + ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l" + esac + case "$with_openssl_incdir" in + '') ;; + *) + ntp_ssl_incdir="$with_openssl_incdir" + ntp_ssl_cppflags="-I$with_openssl_incdir" + esac +esac + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase I checks:" >&5 +printf "%s\n" "$as_me: OpenSSL Phase I checks:" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5 +printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP: ($CFLAGS_NTP)" >&5 +printf "%s\n" "$as_me: CFLAGS_NTP: ($CFLAGS_NTP)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP: ($LDADD_NTP)" >&5 +printf "%s\n" "$as_me: LDADD_NTP: ($LDADD_NTP)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&5 +printf "%s\n" "$as_me: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&5 +printf "%s\n" "$as_me: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&5 +printf "%s\n" "$as_me: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&5 +printf "%s\n" "$as_me: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&5 +printf "%s\n" "$as_me: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5 +printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&5 +printf "%s\n" "$as_me: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&5 +printf "%s\n" "$as_me: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs: ($ntp_ssl_libs)" >&5 +printf "%s\n" "$as_me: ntp_ssl_libs: ($ntp_ssl_libs)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&5 +printf "%s\n" "$as_me: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&6;} + esac + + + +case "$with_crypto" in + no) + ntp_openssl=no + ;; + *) + ntp_ssl_libs_l="${ntp_ssl_libs_l:--lcrypto}" + ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l" + case "$ntp_ssl_libdir" in + '') + + { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto without -L" >&5 +printf "%s\n" "$as_me: Searching for libcrypto without -L" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_CTX_new (); +int +main (void) +{ +return EVP_MD_CTX_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_CTX_new=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_CTX_new=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : + ntp_ssl_libdir='not needed' + +fi + + { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;} + esac + case "$ntp_ssl_libdir" in + '') + ntp_ssl_libdir_search="/usr/lib /usr/lib/openssl /usr/sfw/lib" + ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/lib" + ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/ssl/lib" + ntp_ssl_libdir_search="$ntp_ssl_libdir_search /opt/local/lib" + ntp_ssl_libdir_search="$ntp_ssl_libdir_search /lib /lib64" + ;; + *) + ntp_ssl_libdir_search="$ntp_ssl_libdir" + esac + case $ntp_ssl_libdir_search in + 'not needed') ;; + *) + for i in $ntp_ssl_libdir_search not_found + do + case "$i" in + not_found) ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto in $i" >&5 +printf "%s\n" "$as_me: Searching for libcrypto in $i" >&6;} + LIBS="-L$i $NTPSSL_SAVED_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5 +printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char EVP_MD_CTX_new (); +int +main (void) +{ +return EVP_MD_CTX_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_MD_CTX_new=yes +else $as_nop + ac_cv_lib_crypto_EVP_MD_CTX_new=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes +then : + break + +fi + + { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;} + esac + done + ntp_ssl_libdir="$i" + ntp_ssl_libs_L="-L$i" + ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l" + LIBS="$NTPSSL_SAVED_LIBS" + case "$ntp_ssl_libdir" in + not_found) + as_fn_error $? "You may want to use --without-crypto, or add +openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the +--with-openssl-libdir=/some/path option to configure. +libcrypto not found in any of the following directories: +$ntp_ssl_libdir_search + " "$LINENO" 5 + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libcrypto found in $ntp_ssl_libdir" >&5 +printf "%s\n" "$as_me: libcrypto found in $ntp_ssl_libdir" >&6;} + esac + + case "$ntp_openssl_from_pkg_config:$ntp_ssl_incdir" in + 'yes:not needed' | no:) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h without -I" >&5 +printf "%s\n" "$as_me: Searching for openssl/evp.h without -I" >&6;} + { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;} + ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_evp_h" = xyes +then : + ntp_ssl_incdir='not needed' + +fi + + esac + case "$ntp_ssl_incdir" in + 'not needed') + ntp_ssl_incdir_search="$ntp_ssl_incdir" + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl include directory" >&5 +printf "%s\n" "$as_me: Searching for openssl include directory" >&6;} + case "$with_openssl_incdir" in + '') + case "$ntp_ssl_incdir" in + '') + ntp_ssl_incdir_search="/usr/include /usr/sfw/include" + ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/include" + ntp_ssl_incdir_search="$ntp_ssl_incdir_search /opt/local/include" + ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/ssl/include" + ;; + *) + esac + ;; + *) + ntp_ssl_incdir_search="$with_openssl_incdir" + esac + case $ntp_ssl_incdir_search in + 'not needed') ;; + *) + for i in $ntp_ssl_incdir_search + do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h in $i" >&5 +printf "%s\n" "$as_me: Searching for openssl/evp.h in $i" >&6;} + CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS -I$i" + { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;} + ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_evp_h" = xyes +then : + ntp_ssl_incdir="$i" ; break + +fi + + done + { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;} + { i=; unset i;} + CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS" + case "$ntp_ssl_incdir" in + '') + as_fn_error $? "You may want to use --without-crypto, or add +openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the +-with-openssl-incdir=/some/path option to configure. +No usable openssl/evp.h found in any of the following direcotries: +$ntp_ssl_incdir_search + " "$LINENO" 5 + esac + ntp_ssl_cppflags="-I$ntp_ssl_incdir" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Found evp.h in $ntp_ssl_incdir/openssl" >&5 +printf "%s\n" "$as_me: Found evp.h in $ntp_ssl_incdir/openssl" >&6;} + esac + esac + ntp_openssl=yes +esac +case "$ntp_openssl:$ntp_ssl_libdir" in + 'yes:not needed') + ;; + yes:*) + CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags" + CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags" + LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS" + LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto works without runpath" >&5 +printf %s "checking if crypto works without runpath... " >&6; } +if test ${ntp_cv_ssl_without_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + ntp_cv_ssl_without_runpath=yes +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include "openssl/evp.h" + +int +main (void) +{ + + if (!EVP_MD_CTX_new()) { + return 1; + } + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ntp_cv_ssl_without_runpath=yes +else $as_nop + ntp_cv_ssl_without_runpath=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_without_runpath" >&5 +printf "%s\n" "$ntp_cv_ssl_without_runpath" >&6; } + case "$ntp_cv_ssl_without_runpath" in + no) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir" >&5 +printf %s "checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir... " >&6; } +if test ${ntp_cv_ssl_needs_dashWl_rpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + LDFLAGS="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir $NTPSSL_SAVED_LDFLAGS" + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include "openssl/evp.h" + +int +main (void) +{ + + if (!EVP_MD_CTX_new()) { + return 1; + } + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ntp_cv_ssl_needs_dashWl_rpath=yes +else $as_nop + ntp_cv_ssl_needs_dashWl_rpath=no + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashWl_rpath" >&5 +printf "%s\n" "$ntp_cv_ssl_needs_dashWl_rpath" >&6; } + case "$ntp_cv_ssl_needs_dashWl_rpath" in + yes) + ntp_ssl_ldflags="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir" + ;; + no) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -R$ntp_ssl_libdir" >&5 +printf %s "checking if crypto needs -R$ntp_ssl_libdir... " >&6; } +if test ${ntp_cv_ssl_needs_dashR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + LDFLAGS="$NTPSSL_SAVED_LDFLAGS $ntp_ssl_ldflags -R$ntp_ssl_libdir" + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include "openssl/evp.h" + +int +main (void) +{ + + if (!EVP_MD_CTX_new()) { + return 1; + } + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ntp_cv_ssl_needs_dashR=yes +else $as_nop + ntp_cv_ssl_needs_dashR=no + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashR" >&5 +printf "%s\n" "$ntp_cv_ssl_needs_dashR" >&6; } + case "$ntp_cv_ssl_needs_dashR" in + yes) + ntp_ssl_ldflags="$ntp_ssl_ldflags -R$ntp_ssl_libdir" + esac + case "$build:$ntp_cv_ssl_needs_dashR" in + $host:no) + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Unable to run program using crypto, check openssl.pc +or libcrypto.pc are in PKG_CONFIG_PATH, or provide the + --with-openssl-libdir=/some/path option to configure. + +See \`config.log' for more details" "$LINENO" 5; } + esac + esac + esac +esac + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase II checks:" >&5 +printf "%s\n" "$as_me: OpenSSL Phase II checks:" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&5 +printf "%s\n" "$as_me: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&5 +printf "%s\n" "$as_me: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&5 +printf "%s\n" "$as_me: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5 +printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&5 +printf "%s\n" "$as_me: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&5 +printf "%s\n" "$as_me: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs: ($ntp_ssl_libs)" >&5 +printf "%s\n" "$as_me: ntp_ssl_libs: ($ntp_ssl_libs)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&5 +printf "%s\n" "$as_me: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&6;} + esac + + + +case "$ntp_openssl:$ntp_openssl_from_pkg_config" in + yes:no) + CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags" + CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags" + LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS" + LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l alone works" >&5 +printf %s "checking if linking with $ntp_ssl_libs_l alone works... " >&6; } +if test ${ntp_cv_bare_lcrypto+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include "openssl/evp.h" + +int +main (void) +{ + + EVP_MD_CTX_new(); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ntp_cv_bare_lcrypto=yes +else $as_nop + ntp_cv_bare_lcrypto=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5 +printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; } + case "$ntp_cv_bare_lcrypto" in + no) + LIBS="-$ntp_ssl_libs -lz $NTPSSL_SAVED_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l -lz works" >&5 +printf %s "checking if linking with $ntp_ssl_libs_l -lz works... " >&6; } +if test ${ntp_cv_lcrypto_lz+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include "openssl/evp.h" + +int +main (void) +{ + + EVP_MD_CTX_new(); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ntp_cv_lcrypto_lz=yes +else $as_nop + ntp_cv_lcrypto_lz=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5 +printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; } + case "$ntp_cv_lcrypto_lz" in + yes) + ntp_ssl_libs_l="$ntp_ssl_libs_l -lz" + ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l" + esac + esac esac +case "$ntp_openssl:$GCC" in + yes:yes) + CFLAGS="$NTP_SAVED_CFLAGS $ntp_ssl_cflags -Werror" + CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags" + LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS" + LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking If $CC supports -Werror" >&5 +printf %s "checking If $CC supports -Werror... " >&6; } +if test ${ntp_cv_gcc_supports_Werror+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ntp_cv_gcc_supports_Werror=yes +else $as_nop + ntp_cv_gcc_supports_Werror=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_supports_Werror" >&5 +printf "%s\n" "$ntp_cv_gcc_supports_Werror" >&6; } + case "ntp_cv_gcc_supports_Werror" in + no) + ntp_use_Wstrict_prototypes=yes + ;; + yes) + CFLAGS="$CFLAGS -Wstrict-prototypes" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if OpenSSL triggers warnings" >&5 +printf %s "checking if OpenSSL triggers warnings... " >&6; } +if test ${ntp_cv_ssl_triggers_warnings+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include "openssl/asn1_mac.h" + #include "openssl/bn.h" + #include "openssl/err.h" + #include "openssl/evp.h" + #include "openssl/pem.h" + #include "openssl/rand.h" + #include "openssl/x509v3.h" + +int +main (void) +{ + + /* empty body */ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ntp_cv_ssl_triggers_warnings=no +else $as_nop + ntp_cv_ssl_triggers_warnings=yes + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_triggers_warnings" >&5 +printf "%s\n" "$ntp_cv_ssl_triggers_warnings" >&6; } + case "$ntp_cv_ssl_triggers_warnings" in + yes) + ntp_use_Wstrict_prototypes=no + ;; + *) + ntp_use_Wstrict_prototypes=yes + esac + esac + case "$ntp_use_Wstrict_prototypes" in + no) + ntp_ssl_cflags="$ntp_ssl_cflags -Wno-strict-prototypes" + ;; + *) + ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes" + esac + ;; + no:yes) + ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes" +esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will link to ssl library" >&5 +printf %s "checking if we will link to ssl library... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5 +printf "%s\n" "$ntp_openssl" >&6; } + +case "$ntp_openssl" in + yes) + VER_SUFFIX=o + for ac_header in openssl/cmac.h +do : + ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_cmac_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h + ntp_enable_cmac=yes +else $as_nop + ntp_enable_cmac=no + +fi + +done + case "$ntp_enable_cmac" in + yes) + +printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h + + esac + +printf "%s\n" "#define OPENSSL /**/" >>confdefs.h + + +printf "%s\n" "#define OPENSSL_SUPPRESS_DEPRECATED 1" >>confdefs.h + + CFLAGS="$NTPSSL_SAVED_CFLAGS" + ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted" +if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes +then : + printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h + +fi + + CPPFLAGS_NTP="$CPPFLAGS_NTP $ntp_ssl_cppflags" + CFLAGS_NTP="$CFLAGS_NTP $ntp_ssl_cflags" + LDADD_NTP="$ntp_ssl_libs $LDADD_NTP" + LDFLAGS_NTP="$ntp_ssl_ldflags $LDFLAGS_NTP" +esac + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL final checks:" >&5 +printf "%s\n" "$as_me: OpenSSL final checks:" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl: $ntp_openssl" >&5 +printf "%s\n" "$as_me: ntp_openssl: $ntp_openssl" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5 +printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP: ($CFLAGS_NTP)" >&5 +printf "%s\n" "$as_me: CFLAGS_NTP: ($CFLAGS_NTP)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP: ($LDADD_NTP)" >&5 +printf "%s\n" "$as_me: LDADD_NTP: ($LDADD_NTP)" >&6;} + esac + + + case "$enable_verbose_ssl" in + yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&5 +printf "%s\n" "$as_me: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&6;} + esac + + + +CFLAGS="$NTPSSL_SAVED_CFLAGS" +CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS" +LIBS="$NTPSSL_SAVED_LIBS" +LDFLAGS="$NTPSSL_SAVED_LDFLAGS" + +{ NTPSSL_SAVED_CFLAGS=; unset NTPSSL_SAVED_CFLAGS;} +{ NTPSSL_SAVED_CPPFLAGS=; unset NTPSSL_SAVED_CPPFLAGS;} +{ NTPSSL_SAVED_LIBS=; unset NTPSSL_SAVED_LIBS;} +{ NTPSSL_SAVED_LDFLAGS=; unset NTPSSL_SAVED_LDFLAGS;} +{ ntp_enable_cmac=; unset ntp_enable_cmac;} +{ ntp_use_Wstrict_prototypes=; unset ntp_use_Wstrict_prototypes;} +{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;} +{ ntp_openssl_version=; unset ntp_openssl_version;} +{ ntp_ssl_cflags=; unset ntp_ssl_cflags;} +{ ntp_ssl_cppflags=; unset ntp_ssl_cppflags;} +{ ntp_ssl_libdir_search=; unset ntp_ssl_libdir_search;} +{ ntp_ssl_incdir_search=; unset ntp_ssl_incdir_search;} +{ ntp_ssl_libdir=; unset ntp_ssl_libdir;} +{ ntp_ssl_incdir=; unset ntp_ssl_incdir;} +{ ntp_ssl_libs_l=; unset ntp_ssl_libs_l;} +{ ntp_ssl_libs_L=; unset ntp_ssl_libs_L;} +{ ntp_ssl_ldflags=; unset ntp_ssl_ldflags;} + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SSL library's secure random numbers" >&5 +printf %s "checking if we want to use SSL library's secure random numbers... " >&6; } +# Check whether --enable-openssl-random was given. +if test ${enable_openssl_random+y} +then : + enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval ; ntp_ssl_random_mandatory=$enableval +else $as_nop + ntp_use_openssl_random=yes ; ntp_ssl_random_mandatory=no + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5 +printf "%s\n" "$ntp_use_openssl_random" >&6; } + +# The following might need extra libraries +NTPO_SAVED_LIBS="$LIBS" +LIBS="$NTPO_SAVED_LIBS $LDADD_NTP" +ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes" +if test "x$ac_cv_func_RAND_bytes" = xyes +then : + printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll" +if test "x$ac_cv_func_RAND_poll" = xyes +then : + printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h + +fi + +LIBS="$NTPO_SAVED_LIBS" +case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in + yesyesyesyes) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using SSL library's secure random number generator" >&5 +printf "%s\n" "$as_me: Using SSL library's secure random number generator" >&6;} + +printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h + + ;; + *) + ntp_use_openssl_random=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: SSL library's secure random number generator unavailable." >&5 +printf "%s\n" "$as_me: SSL library's secure random number generator unavailable." >&6;} + case "$ntp_ssl_random_mandatory" in + yes) + as_fn_error $? "No suitable SSL library was found and +--enable-openssl-random was given.. Remove --enable-openssl-random +if you wish to build without a cryptographically secure random number +generator. + +WARNING: Use of ntp-keygen without a secure RNG may generate +------- keys that are predictable. + " "$LINENO" 5 + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate +------- keys that are predictable. + " >&5 +printf "%s\n" "$as_me: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate +------- keys that are predictable. + " >&2;} + esac +esac + +{ ntp_ssl_random_mandatory=; unset ntp_ssl_random_mandatory;} + + + +LDADD_LIBNTP="$LDADD_LIBNTP $LIBS" +LIBS=$SAVED_LIBS +{ SAVED_LIBS=; unset SAVED_LIBS;} + + + for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -25875,9 +26824,6 @@ printf "%s\n" "no" >&6; } fi - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s @@ -25889,65 +26835,6 @@ else printf "%s\n" "no, using $LN_S" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 -printf %s "checking for library containing strerror... " >&6; } -if test ${ac_cv_search_strerror+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char strerror (); -int -main (void) -{ -return strerror (); - ; - return 0; -} -_ACEOF -for ac_lib in '' cposix -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_strerror=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_strerror+y} -then : - break -fi -done -if test ${ac_cv_search_strerror+y} -then : - -else $as_nop - ac_cv_search_strerror=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 -printf "%s\n" "$ac_cv_search_strerror" >&6; } -ac_res=$ac_cv_search_strerror -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - # Extract the first word of "perl", so it can be a program name with args. @@ -26352,35 +27239,39 @@ fi esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5 printf %s "checking for facilitynames in syslog.h... " >&6; } if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y} then : printf %s "(cached) " >&6 else $as_nop - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define SYSLOG_NAMES -#include -#include + #define SYSLOG_NAMES + #include + #include int main (void) { - void *fnames; fnames = facilitynames; + + void *fnames = facilitynames; + + ; return 0; } + ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes _ACEOF if ac_fn_c_try_compile "$LINENO" then : - ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes -else $as_nop ac_cv_HAVE_SYSLOG_FACILITYNAMES=no + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5 printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; } @@ -26393,11 +27284,6 @@ printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in " >&5 printf "%s\n" "$as_me: WARNING: No facilitynames in " >&2;} - ;; - cross) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in - cross-compiling" >&5 -printf "%s\n" "$as_me: WARNING: facilitynames in - cross-compiling" >&2;} - ;; esac @@ -26409,7 +27295,10 @@ case "$host" in *) # HMS: Make sure we check for -lrt for clock_* before this... case "$ac_cv_search_clock_gettime" in - '') as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!" "$LINENO" 5 ;; + '') { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet! +See \`config.log' for more details" "$LINENO" 5; } ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5 printf %s "checking for library containing sched_setscheduler... " >&6; } @@ -26478,6 +27367,12 @@ if test "x$ac_cv_header_bstring_h" = xyes then : printf "%s\n" "#define HAVE_BSTRING_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/procctl.h" "ac_cv_header_sys_procctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_procctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PROCCTL_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default" @@ -31425,530 +32320,7 @@ esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5 printf "%s\n" "$ans" >&6; } - - - -VER_SUFFIX= - - - - -# Check whether --with-crypto was given. -if test ${with_crypto+y} -then : - withval=$with_crypto; -fi - - -# Check whether --with-openssl-libdir was given. -if test ${with_openssl_libdir+y} -then : - withval=$with_openssl_libdir; -fi - - -# Check whether --with-openssl-incdir was given. -if test ${with_openssl_incdir+y} -then : - withval=$with_openssl_incdir; -fi - - -# Check whether --with-rpath was given. -if test ${with_rpath+y} -then : - withval=$with_rpath; -fi - - -ntp_openssl=no -ntp_openssl_from_pkg_config=no - -with_crypto=${with_crypto:-openssl,libcrypto} -case "$with_crypto" in - yes) - with_crypto=openssl,libcrypto -esac - - -case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in - no:*) ;; - *:notempty:notgiven:notgiven) - for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5 -printf %s "checking pkg-config for $pkg... " >&6; } - if $PKG_CONFIG --exists $pkg ; then - CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`" - CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`" - LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`" - LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`" - LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`" - VER_SUFFIX=o - ntp_openssl=yes - ntp_openssl_from_pkg_config=yes - ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`" - case "$ntp_openssl_version" in - *.*) ;; - *) ntp_openssl_version='(unknown)' ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5 -printf "%s\n" "yes, version $ntp_openssl_version" >&6; } - - break - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - done -esac -case "$with_crypto:$ntp_openssl" in - no:*) ;; - *:no) - need_dash_r= - need_dash_Wlrpath= - case "${with_rpath-notgiven}" in - yes) - # Lame - what to do if we need -Wl... but not -R? - need_dash_r=1 - ;; - notgiven) - case "$host" in - *-*-linux*) - # This may really only be true for gcc - need_dash_Wlrpath=1 - ;; - *-*-netbsd*) - need_dash_r=1 - ;; - *-*-solaris*) - need_dash_r=1 - ;; - esac - ;; - esac - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5 -printf %s "checking for openssl library directory... " >&6; } - with_openssl_libdir=${with_openssl_libdir-notgiven} - case "$with_openssl_libdir" in - notgiven) - case "$build" in - $host) - with_openssl_libdir=default - ;; - *) - with_openssl_libdir=no - ;; - esac - esac - case "$with_openssl_libdir" in - default) - # Look in: - with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib" - with_openssl_libdir="$with_openssl_libdir /usr/local/lib" - with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib" - esac - case "$with_openssl_libdir" in - no) - ;; - *) # Look for libcrypto.a and libssl.a: - for i in $with_openssl_libdir no - do - case "$host" in - *-*-darwin*) - test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break - ;; - *) - test -f $i/libcrypto.so -a -f $i/libssl.so && break - test -f $i/libcrypto.a -a -f $i/libssl.a && break - ;; - esac - done - openssl_libdir=$i - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5 -printf "%s\n" "$openssl_libdir" >&6; } - case "$openssl_libdir" in - no) - openssl_libdir= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5 -printf "%s\n" "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;} - esac - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5 -printf %s "checking for openssl include directory... " >&6; } - with_openssl_incdir=${with_openssl_incdir-notgiven} - case "$with_openssl_incdir" in - notgiven) - # Look in: - with_openssl_incdir="/usr/include /usr/sfw/include" - with_openssl_incdir="$with_openssl_incdir /usr/local/include" - with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include" - esac - case "$with_openssl_incdir" in - no) - ;; - *) # look for openssl/evp.h: - for i in $with_openssl_incdir no - do - test -f $i/openssl/evp.h && break - done - openssl_incdir=$i - ;; - esac - { i=; unset i;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5 -printf "%s\n" "$openssl_incdir" >&6; } - case "$openssl_incdir" in - no) - openssl_incdir= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5 -printf "%s\n" "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;} - esac - if test -z "$openssl_libdir" -o -z "$openssl_incdir" - then - ntp_openssl=no - else - ntp_openssl=yes - VER_SUFFIX=o - fi - case "$ntp_openssl" in - yes) - # We have OpenSSL inc/lib dirs - use them. - case "$openssl_incdir" in - /usr/include) - ;; - *) - CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir" - ;; - esac - case "$openssl_libdir" in - /usr/lib) - ;; - *) - LDADD_NTP="$LDADD_NTP -L$openssl_libdir" - case "$need_dash_r" in - 1) - LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir" - esac - case "$need_dash_Wlrpath" in - 1) - LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir" - esac - ;; - esac - LDADD_NTP="$LDADD_NTP -lcrypto" - esac -esac - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5 -printf %s "checking if we will use crypto... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5 -printf "%s\n" "$ntp_openssl" >&6; } - -case "$ntp_openssl" in - yes) - ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_cmac_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_hmac_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_HMAC_H 1" >>confdefs.h - -fi - - -printf "%s\n" "#define OPENSSL /**/" >>confdefs.h - - case "$VER_SUFFIX" in - *o*) ;; - *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;; - esac - ;; -esac - -NTPO_SAVED_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP" -NTPO_SAVED_LIBS="$LIBS" - -# -# check for linking with -lcrypto failure, and try -lcrypto -lz. -# Helps m68k-atari-mint -# -case "$ntp_openssl:$ntp_openssl_from_pkg_config" in - yes:no) - LIBS="$NTPO_SAVED_LIBS $LDADD_NTP" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5 -printf %s "checking if linking with -lcrypto alone works... " >&6; } -if test ${ntp_cv_bare_lcrypto+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include "openssl/err.h" - #include "openssl/evp.h" - -int -main (void) -{ - - ERR_load_crypto_strings(); - OpenSSL_add_all_algorithms(); - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ntp_cv_bare_lcrypto=yes -else $as_nop - ntp_cv_bare_lcrypto=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5 -printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; } - case "$ntp_cv_bare_lcrypto" in - no) - LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5 -printf %s "checking if linking with -lcrypto -lz works... " >&6; } -if test ${ntp_cv_lcrypto_lz+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include "openssl/err.h" - #include "openssl/evp.h" - -int -main (void) -{ - - ERR_load_crypto_strings(); - OpenSSL_add_all_algorithms(); - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ntp_cv_lcrypto_lz=yes -else $as_nop - ntp_cv_lcrypto_lz=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5 -printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; } - case "$ntp_cv_lcrypto_lz" in - yes) - LDADD_NTP="$LDADD_NTP -lz" - esac - esac -esac - -# -# Older OpenSSL headers have a number of callback prototypes inside -# other function prototypes which trigger copious warnings with gcc's -# -Wstrict-prototypes, which is included in -Wall. -# -# An example: -# -# int i2d_RSA_NET(const RSA *a, unsigned char **pp, -# int (*cb)(), int sgckey); -# ^^^^^^^^^^^ -# -# -# -openssl_triggers_warnings=unknown -NTPO_SAVED_CFLAGS="$CFLAGS" - -case "$ntp_openssl:$GCC" in - yes:yes) - CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main (void) -{ - - /* see if -Werror breaks gcc */ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gcc_handles_Werror=yes -else $as_nop - gcc_handles_Werror=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - case "$gcc_handles_Werror" in - no) - # if this gcc doesn't do -Werror go ahead and use - # -Wstrict-prototypes. - openssl_triggers_warnings=yes - ;; - yes) - CFLAGS="$CFLAGS -Wstrict-prototypes" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include "openssl/asn1_mac.h" - #include "openssl/bn.h" - #include "openssl/err.h" - #include "openssl/evp.h" - #include "openssl/pem.h" - #include "openssl/rand.h" - #include "openssl/x509v3.h" - -int -main (void) -{ - - /* empty body */ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - openssl_triggers_warnings=no -else $as_nop - openssl_triggers_warnings=yes - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - esac - case "$openssl_triggers_warnings" in - yes) - CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes" - ;; - *) - CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes" - esac - ;; - no:yes) - # gcc without OpenSSL - CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes" -esac - -# Because we don't want -Werror for the EVP_MD_do_all_sorted check -CFLAGS="$NTPO_SAVED_CFLAGS" - -case "$ntp_openssl" in - yes) - LIBS="$NTPO_SAVED_LIBS $LDADD_NTP" - ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted" -if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes -then : - printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h - -fi - - ;; -esac - - -CPPFLAGS="$NTPO_SAVED_CPPFLAGS" -LIBS="$NTPO_SAVED_LIBS" -{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;} -{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;} -{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;} -{ openssl_triggers_warnings=; unset openssl_triggers_warnings;} -{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;} - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable CMAC support" >&5 -printf %s "checking if we want to enable CMAC support... " >&6; } -case "$ac_cv_header_openssl_cmac_h" in - yes) - -printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h - - ans="yes" - ;; - *) ans="no" - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5 -printf "%s\n" "$ans" >&6; } - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5 -printf %s "checking if we want to use OpenSSL's crypto random (if available)... " >&6; } -# Check whether --enable-openssl-random was given. -if test ${enable_openssl_random+y} -then : - enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval -else $as_nop - ntp_use_openssl_random=yes - -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5 -printf "%s\n" "$ntp_use_openssl_random" >&6; } - -# The following might need extra libraries -NTPO_SAVED_LIBS="$LIBS" -LIBS="$NTPO_SAVED_LIBS $LDADD_NTP" -ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes" -if test "x$ac_cv_func_RAND_bytes" = xyes -then : - printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll" -if test "x$ac_cv_func_RAND_poll" = xyes -then : - printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h - -fi - -LIBS="$NTPO_SAVED_LIBS" -case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in - yesyesyesyes) - -printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h - - ;; - *) ntp_use_openssl_random=no ;; -esac - - - -# if we are using OpenSSL (--with-crypto), by default Autokey is enabled -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5 -printf %s "checking if we want to include NTP Autokey protocol support... " >&6; } +# if we have crypto, by default Autokey is enabled # Check whether --enable-autokey was given. if test ${enable_autokey+y} then : @@ -31964,8 +32336,8 @@ case "$ntp_autokey" in *) case "$ntp_openssl" in no) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&5 -printf "%s\n" "$as_me: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, crypto unavailable." >&5 +printf "%s\n" "$as_me: WARNING: Disabling Autokey, crypto unavailable." >&2;} ntp_autokey=no ;; *) @@ -31977,6 +32349,8 @@ printf "%s\n" "#define AUTOKEY 1" >>confdefs.h esac ;; esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if NTP Autokey protocol will be supported" >&5 +printf %s "checking if NTP Autokey protocol will be supported... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5 printf "%s\n" "$ntp_autokey" >&6; } @@ -34457,6 +34831,8 @@ printf "%s\n" "#define DYNAMIC_INTERLEAVE $ntp_dynamic_interleave" >>confdefs.h printf "%s\n" "$ntp_ok" >&6; } + + # We may not need have_unity have_unity=false # Extract the first word of "ruby", so it can be a program name with args. @@ -34951,6 +35327,10 @@ if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then as_fn_error $? "conditional \"PTHREADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${LIBNTP_SUBMAKES_TRUE}" && test -z "${LIBNTP_SUBMAKES_FALSE}"; then + as_fn_error $? "conditional \"LIBNTP_SUBMAKES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then as_fn_error $? "conditional \"BUILD_SNTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -35365,7 +35745,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ntp $as_me 4.2.8p17, which was +This file was extended by ntp $as_me 4.2.8p18, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -35434,7 +35814,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -ntp config.status 4.2.8p17 +ntp config.status 4.2.8p18 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -35563,9 +35943,9 @@ AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' @@ -36674,13 +37054,13 @@ available_tags='' # ### BEGIN LIBTOOL CONFIG -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + # Whether or not to build static libraries. build_old_libs=$enable_static @@ -37166,7 +37546,7 @@ ltmain=$ac_aux_dir/ltmain.sh chmod +x "$ofile" ;; - "ntpd/complete.conf":F) sed -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;; + "ntpd/complete.conf":F) $SED -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;; "ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;; "scripts/build/genAuthors":F) chmod +x scripts/build/genAuthors ;; "scripts/build/mkver":F) chmod +x scripts/build/mkver ;; diff --git a/contrib/ntp/configure.ac b/contrib/ntp/configure.ac index c2dce35e800d..aef705394309 100644 --- a/contrib/ntp/configure.ac +++ b/contrib/ntp/configure.ac @@ -35,7 +35,7 @@ AC_PRESERVE_HELP_ORDER # the date YYYYMMDD optionally with -HHMM if there is more than one # bump in a day. -ntp_configure_cache_version=20230326 +ntp_configure_cache_version=20240218 # When the cache version of config.cache and configure do not # match, NTP_CACHEVERSION will flush the cache. @@ -55,6 +55,23 @@ AC_DEFINE_UNQUOTED([STR_SYSTEM], ["$host"], AC_CONFIG_HEADERS([config.h]) dnl AC_ARG_PROGRAM +AC_MSG_CHECKING([if we should enable build framework help]) +AC_ARG_ENABLE( + [build-framework-help], + [AS_HELP_STRING( + [--enable-build-framework-help], + [+ enable build framework help] + )], + [ntp_ok=$enableval], + [ntp_ok=yes] +) +case "$ntp_ok" in + yes) + ntp_cv_build_framework_help=yes ;; + *) ntp_cv_build_framework_help=no ;; +esac +AC_MSG_RESULT([$ntp_ok]) + ntp_atom_ok=${ntp_atom_ok=no} ntp_oncore_ok=${ntp_oncore_ok=no} ntp_parse_ok=${ntp_parse_ok=no} @@ -70,7 +87,7 @@ AX_C99_STRUCT_INIT NTP_HARDEN([sntp]) -NTP_VPATH_HACK dnl used only by ntpd/Makefile.am +NTP_VPATH_HACK dnl used by ntpd/Makefile.am libparse/Makefile.am NTP_LOCINFO([sntp]) dnl takes over from NTP_BINDIR, in NTP_LIBNTP @@ -78,8 +95,7 @@ AM_PROG_AR # So far, the only shared library we might use is libopts. # It's a small library - we might as well use a static version of it. -AC_DISABLE_SHARED -AC_PROG_LIBTOOL +LT_INIT([disable-shared]) AC_SUBST([LIBTOOL_DEPS]) # NTP has (so far) been relying on leading-edge autogen, which @@ -87,7 +103,7 @@ AC_SUBST([LIBTOOL_DEPS]) # Therefore, by default: # - use the version of libopts we ship with # - do not install it -# - build a static copy (AC_DISABLE_SHARED - done earlier) +# - build a static copy (disable-shared - done earlier) case "${enable_local_libopts+set}" in set) ;; *) enable_local_libopts=yes ;; @@ -103,29 +119,13 @@ NTP_LIBEVENT_CHECK_NOBUILD([2], [sntp/libevent]) NTP_LIBNTP -AC_MSG_CHECKING([for deprecated --with-arlib]) -AC_ARG_WITH([arlib], - AS_HELP_STRING([--with-arlib], [- deprecated, arlib not distributed]), - [ans=$withval], [ans=no]) -AC_MSG_RESULT([$ans]) - -case "$ans" in - yes) - AC_MSG_WARN([Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized.]) - ;; -esac - dnl we need to check for cross compile tools for vxWorks here AC_PROG_AWK AS_UNSET([ac_cv_prog_AWK]) AC_SUBST([AWK]) dnl scripts/ntpver.in AC_PROG_MAKE_SET -AC_SUBST([CFLAGS]) -AC_SUBST([LDFLAGS]) - AC_PROG_LN_S -AC_ISC_POSIX AC_PATH_PROG([PATH_PERL], [perl]) @@ -277,13 +277,13 @@ case "$host" in *) # HMS: Make sure we check for -lrt for clock_* before this... case "$ac_cv_search_clock_gettime" in - '') AC_MSG_ERROR([Internal Error: Haven't looked for clock_gettime() yet!]) ;; + '') AC_MSG_FAILURE([Internal Error: Haven't looked for clock_gettime() yet!]) ;; esac AC_SEARCH_LIBS([sched_setscheduler], [rt posix4]) ;; esac -AC_CHECK_HEADERS([bstring.h]) +AC_CHECK_HEADERS([bstring.h sys/procctl.h]) AC_CHECK_HEADER( [dns_sd.h], [AC_SEARCH_LIBS( @@ -3008,23 +3008,7 @@ case "$ntp_libparse" in esac AC_MSG_RESULT([$ans]) -NTP_OPENSSL - -AC_MSG_CHECKING([if we want to enable CMAC support]) -case "$ac_cv_header_openssl_cmac_h" in - yes) - AC_DEFINE([ENABLE_CMAC], [1], [Enable CMAC support?]) - ans="yes" - ;; - *) ans="no" - ;; -esac -AC_MSG_RESULT([$ans]) - -NTP_CRYPTO_RAND - -# if we are using OpenSSL (--with-crypto), by default Autokey is enabled -AC_MSG_CHECKING([if we want to include NTP Autokey protocol support]) +# if we have crypto, by default Autokey is enabled AC_ARG_ENABLE( [autokey], AS_HELP_STRING( @@ -3040,7 +3024,7 @@ case "$ntp_autokey" in *) case "$ntp_openssl" in no) - AC_MSG_WARN([Disabling Autokey, --enable-autokey requires --with-crypto.]) + AC_MSG_WARN([Disabling Autokey, crypto unavailable.]) ntp_autokey=no ;; *) @@ -3050,6 +3034,7 @@ case "$ntp_autokey" in esac ;; esac +AC_MSG_CHECKING([if NTP Autokey protocol will be supported]) AC_MSG_RESULT([$ntp_autokey]) AC_SUBST([MAKE_CHECK_LAYOUT]) @@ -4432,6 +4417,18 @@ AC_DEFINE_UNQUOTED([DYNAMIC_INTERLEAVE], [$ntp_dynamic_interleave], [support dynamic interleave?]) AC_MSG_RESULT([$ntp_ok]) +AH_BOTTOM([ + /* + * Macro to use in otherwise-empty source files to comply with ANSI C + * requirement that each translation unit (source file) contain some + * declaration. This has commonly been done by declaring an unused + * global variable of type int or char. An extern reference to abs() + * serves the same purpose without bloat. We once used exit() but + * that can produce warnings on systems that declare exit() noreturn. + */ + #define NONEMPTY_TRANSLATION_UNIT extern int abs(int); +]) + NTP_UNITYBUILD NTP_PROBLEM_TESTS @@ -4455,7 +4452,7 @@ AC_CONFIG_FILES([kernel/sys/Makefile]) AC_CONFIG_FILES([libntp/Makefile]) AC_CONFIG_FILES([libparse/Makefile]) AC_CONFIG_FILES([ntpd/Makefile]) -AC_CONFIG_FILES([ntpd/complete.conf], [sed -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf]) +AC_CONFIG_FILES([ntpd/complete.conf], [$SED -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf]) AC_CONFIG_FILES([ntpdate/Makefile]) AC_CONFIG_FILES([ntpdc/Makefile]) AC_CONFIG_FILES([ntpdc/nl.pl], [chmod +x ntpdc/nl.pl]) diff --git a/contrib/ntp/flock-build b/contrib/ntp/flock-build index b537ac349175..14767b934e17 100755 --- a/contrib/ntp/flock-build +++ b/contrib/ntp/flock-build @@ -34,23 +34,11 @@ case "$PARALLEL_BUILDS" in *) echo Launching $PARALLEL_BUILDS parallel builds on each machine esac -# Backroom: -# barnstable freebsd-6.1 -# beauregard freebsd-6.0 -# X churchy alpha-dec-osf5.1 -# deacon sparc-sun-solaris2.10 -# grundoon freebsd-6.2 -# howland freebsd-6.1 -# o macabre freebsd-6.1-STABLE -# o mort freebsd-6.1 -# whimsy sparc-sun-solaris2.10 - # Campus: # * baldwin sparc-sun-solaris2.10 # * bridgeport sparc-sun-solaris2.10 -# * malarky sparc-sun-solaris2.10 # * pogo sparc-sun-solaris2.10 -# * rackety freebsd-6.1 +# * rackety sparc-sun-solaris2.10 if [ ! -r sntp/libevent/build-aux/config.guess ] ; then echo "Error: bootstrap required." 1>&2 && exit 1 @@ -80,8 +68,8 @@ do case "1" in 0) ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" & - ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS" & - ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS" & + ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging --disable-saveconfig $BUILD_ARGS" & + ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf --enable-leap-smear $BUILD_ARGS" & ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS" & ;; 1) @@ -103,13 +91,13 @@ do case $FB_FIRSTONLY in '0') - ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS & + ./build $SIG $PARSE $STD --disable-debugging --disable-saveconfig $BUILD_ARGS & COUNT=\`expr \$COUNT + 1\` echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4 [ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait - ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS & + ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf --enable-leap-smear $BUILD_ARGS & COUNT=\`expr \$COUNT + 1\` echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4 diff --git a/contrib/ntp/html/.datecheck b/contrib/ntp/html/.datecheck new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/contrib/ntp/html/clockopt.html b/contrib/ntp/html/clockopt.html index 5b2de7e58d6e..5a721a8a745e 100644 --- a/contrib/ntp/html/clockopt.html +++ b/contrib/ntp/html/clockopt.html @@ -29,8 +29,8 @@
Marks the reference clock as preferred. All other things being equal, this host will be chosen for synchronization among a set of correctly operating hosts. See the Mitigation Rules and the prefer Keyword page for further information.
mode int
Specifies a mode number which is interpreted in a device-specific fashion. For instance, it selects a dialing protocol in the ACTS driver and a device subtype in the parse drivers.
-
minpoll int
- maxpoll int
+
minpoll int
+
maxpoll int
These options specify the minimum and maximum polling interval for reference clock messages in log2 seconds. For most directly connected reference clocks, both minpoll and maxpoll default to 6 (64 s). For modem reference clocks, minpoll is ordinarily set to 10 (about 17 m) and maxpoll to 15 (about 9 h). The allowable range is 4 (16 s) to 17 (36 h) inclusive.
@@ -48,7 +48,10 @@
Specifies the stratum number assigned to the driver in the range 0 to 15, inclusive. This number overrides the default stratum number ordinarily assigned by the driver itself, usually zero.
refid string
Specifies an ASCII string of from one to four characters which defines the reference identifier used by the driver. This string overrides the default identifier ordinarily assigned by the driver itself.
-
flag1 flag2 flag3 flag4
+
flag1 0|1
+
flag2 0|1
+
flag3 0|1
+
flag4 0|1
These four flags are used for customizing the clock driver. The interpretation of these values, and whether they are used at all, is a function of the particular driver. However, by convention flag4 is used to enable recording monitoring data to the clockstats file configured with the filegen command. Additional information on the filegen command is on the Monitoring Options page.
minjitter secs
If the source has a jitter that cannot be sensibly estimated, because diff --git a/contrib/ntp/html/copyright.html b/contrib/ntp/html/copyright.html index d00cf9712178..7584aefc3230 100644 --- a/contrib/ntp/html/copyright.html +++ b/contrib/ntp/html/copyright.html @@ -9,7 +9,7 @@

Copyright Notice

jpg "Clone me," says Dolly sheepishly.

Last update: - 2-Mar-2023 05:21 + 7-Jan-2024 00:29 UTC


@@ -38,7 +38,7 @@
 ***********************************************************************
 *                                                                     *
-* Copyright (c) Network Time Foundation 2011-2023                     *
+* Copyright (c) Network Time Foundation 2011-2024                     *
 *                                                                     *
 * All Rights Reserved                                                 *
 *                                                                     *
diff --git a/contrib/ntp/html/release.html b/contrib/ntp/html/release.html
index f940603a0947..d354ba653953 100644
--- a/contrib/ntp/html/release.html
+++ b/contrib/ntp/html/release.html
@@ -37,7 +37,7 @@
   
  • There are two new burst mode features available where special conditions apply. One of these is enabled by the iburst keyword in the server configuration command. It is intended for cases where it is important to set the clock quickly when an association is first mobilized. The other is enabled by the burst keyword in the server configuration command. It is intended for cases where the network attachment requires an initial calling or training procedure. See the Association Management page for further information.
  • The OpenSSL cryptographic library has replaced the library formerly available from RSA Laboratories. All cryptographic routines except a version of the MD5 message digest algorithm have been removed from the base distribution. All 128-bit and 160-bit message digests algorithms are now supported for both symmetric key and public key cryptosystems. See the Authentication Support page for further information and the Authentication Options page for a list of supported digest algorithms.
  • This release includes support for Autokey public-key cryptography for authenticating public servers to clients, as described in RFC 5906. This support requires the --enable-autokey option when building the distribution, which is the default is OpenSSL is available. The deployment of Autokey subnets is now considerably simpler than in earlier versions. A subnet naming scheme is now available to filter manycast and pool configurations. Additional information about Autokey is on the Autokey Public Key Authentication page and links from there.
  • -
  • The NTP descrete even simulator has been substantially upgraded, now including scenarios with multiple servers and time-sensitive scripts. This allows the NTP algorithms to be tested in an embedded environment with systematic and pseudo-random network delay and oscillator wander distributions. This has been used to verify correct operation under conditions of extreme error and misconfiguration. See the ntpdsim - Network Time Protocol (NTP) simulator page. A technical description and performance analysis is given in the white papers at the NTP Project Page.
  • +
  • The NTP descrete event simulator has been substantially upgraded, now including scenarios with multiple servers and time-sensitive scripts. This allows the NTP algorithms to be tested in an embedded environment with systematic and pseudo-random network delay and oscillator wander distributions. This has been used to verify correct operation under conditions of extreme error and misconfiguration. See the ntpdsim - Network Time Protocol (NTP) simulator page. A technical description and performance analysis is given in the white papers at the NTP Project Page.
  • NTPv4 includes three new server discovery schemes, which in most applications can avoid per-host configuration altogether. Two of these are based on IP multicast technology, while the remaining one is based on crafted DNS lookups. See the Automatic NTP Configuration Schemes page for further information.
  • The status display and event report monitoring functions have been considerably expanded, including new statistics files and event reporting to files and the system log. See the Event Messages and Status Words page for further information.
  • Several new options have been added for the ntpd command line. For the inveterate knob twiddlers several of the more important performance variables can be changed to fit actual or perceived special conditions. In particular, the tinker and tos commands can be used to adjust thresholds, throw switches and change limits.
  • diff --git a/contrib/ntp/include/Makefile.am b/contrib/ntp/include/Makefile.am index dd739ebbcdbd..b661ca639f29 100644 --- a/contrib/ntp/include/Makefile.am +++ b/contrib/ntp/include/Makefile.am @@ -8,6 +8,7 @@ noinst_HEADERS = \ ascii.h \ audio.h \ binio.h \ + c99_snprintf.h \ declcond.h \ gps.h \ hopf6039.h \ diff --git a/contrib/ntp/include/Makefile.in b/contrib/ntp/include/Makefile.in index 5bf244e81bd8..317111a094b1 100644 --- a/contrib/ntp/include/Makefile.in +++ b/contrib/ntp/include/Makefile.in @@ -386,6 +386,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -492,6 +493,7 @@ noinst_HEADERS = \ ascii.h \ audio.h \ binio.h \ + c99_snprintf.h \ declcond.h \ gps.h \ hopf6039.h \ diff --git a/contrib/ntp/include/c99_snprintf.h b/contrib/ntp/include/c99_snprintf.h new file mode 100644 index 000000000000..f5c1bf0e117c --- /dev/null +++ b/contrib/ntp/include/c99_snprintf.h @@ -0,0 +1,28 @@ +/* + * ntp_c99_snprintf.h + * + * Included from config.h to deal with replacing [v]snprintf() on older + * systems. The #undef lines below cannot be directly in config.h as + * config.status modifies each #undef in config.h.in to either be a + * commented-out #undef or a functional #define. Here they are used + * to avoid redefinition warnings on systems such as macos ca. 2024 + * where system headers define [v]snprintf as preprocessor macros. + * + * Do not include this file directly, leave it to config.h. + */ + +#if !defined(_KERNEL) && !defined(PARSESTREAM) +/* + * stdio.h must be included in config.h after _GNU_SOURCE is defined + * but before #define snprintf rpl_snprintf + */ +# include +#endif + +#ifdef HW_WANT_RPL_SNPRINTF +# undef snprintf +#endif +#ifdef HW_WANT_RPL_VSNPRINTF +# undef vsnprintf +#endif + diff --git a/contrib/ntp/include/isc/Makefile.in b/contrib/ntp/include/isc/Makefile.in index 037cfbe354bf..fadd48e1c8ee 100644 --- a/contrib/ntp/include/isc/Makefile.in +++ b/contrib/ntp/include/isc/Makefile.in @@ -344,6 +344,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ diff --git a/contrib/ntp/include/lib_strbuf.h b/contrib/ntp/include/lib_strbuf.h index 5ee92d6f8341..89da450a5547 100644 --- a/contrib/ntp/include/lib_strbuf.h +++ b/contrib/ntp/include/lib_strbuf.h @@ -5,28 +5,28 @@ #define LIB_STRBUF_H #include -#include /* for ZERO() */ +#include /* for zero_mem() */ -/* - * Sizes of things - */ -#define LIB_NUMBUF 16 #define LIB_BUFLENGTH 128 -typedef char libbufstr[LIB_BUFLENGTH]; -extern libbufstr lib_stringbuf[LIB_NUMBUF]; -extern int lib_nextbuf; -extern int lib_inited; +extern int lib_inited; +extern int ipv4_works; +extern int ipv6_works; +extern void init_lib(void); /* - * Macro to get a pointer to the next buffer + * Get a pointer to the next string buffer of LIB_BUFLENGTH octets. + * New and modified code should use buf = lib_getbuf() directly to + * provide clarity for folks familiar with common C style, but there's + * no need to churn the history with a mechanical switch away from + * LIB_GETBUF(buf). */ -#define LIB_GETBUF(bufp) \ - do { \ - ZERO(lib_stringbuf[lib_nextbuf]); \ - (bufp) = &lib_stringbuf[lib_nextbuf++][0]; \ - lib_nextbuf %= COUNTOF(lib_stringbuf); \ +extern char* lib_getbuf(void); + +#define LIB_GETBUF(bufp) \ + do { \ + (bufp) = lib_getbuf(); \ } while (FALSE) #endif /* LIB_STRBUF_H */ diff --git a/contrib/ntp/include/ntp.h b/contrib/ntp/include/ntp.h index 258ddd6138f7..7406a79ea8a4 100644 --- a/contrib/ntp/include/ntp.h +++ b/contrib/ntp/include/ntp.h @@ -171,8 +171,8 @@ typedef char s_char; * Eventually the struct tag will change from interface to endpt_tag. * endpt is unrelated to the select algorithm's struct endpoint. */ -typedef struct interface endpt; -struct interface { +typedef struct endpt_tag endpt; +struct endpt_tag { endpt * elink; /* endpt list link */ endpt * mclink; /* per-AF_* multicast list */ void * ioreg_ctx; /* IO registration context */ @@ -185,9 +185,12 @@ struct interface { char name[32]; /* name of interface */ u_short family; /* AF_INET/AF_INET6 */ u_short phase; /* phase in update cycle */ - u_int32 flags; /* interface flags */ + u_int32 flags; /* INT_ flags */ int last_ttl; /* last TTL specified */ u_int32 addr_refid; /* IPv4 addr or IPv6 hash */ +# ifdef WORDS_BIGENDIAN + u_int32 old_refid; /* byte-swapped IPv6 refid */ +# endif int num_mcast; /* mcast addrs enabled */ u_long starttime; /* current_time at creation */ volatile long received; /* number of incoming packets */ @@ -200,11 +203,11 @@ struct interface { }; /* - * Flags for interfaces + * Flags for network endpoints (interfaces or really addresses) */ #define INT_UP 0x001 /* Interface is up */ #define INT_PPP 0x002 /* Point-to-point interface */ -#define INT_LOOPBACK 0x004 /* the loopback interface */ +#define INT_LOOPBACK 0x004 /* ::1 or 127.0.0.1 */ #define INT_BROADCAST 0x008 /* can broadcast out this interface */ #define INT_MULTICAST 0x010 /* can multicast out this interface */ #define INT_BCASTOPEN 0x020 /* broadcast receive socket is open */ @@ -212,7 +215,8 @@ struct interface { #define INT_WILDCARD 0x080 /* wildcard interface - usually skipped */ #define INT_MCASTIF 0x100 /* bound directly to MCAST address */ #define INT_PRIVACY 0x200 /* RFC 4941 IPv6 privacy address */ -#define INT_BCASTXMIT 0x400 /* socket setup to allow broadcasts */ +#define INT_BCASTXMIT 0x400 /* socket setup to allow broadcasts */ +#define INT_LL_OF_GLOB 0x800 /* IPv6 link-local duplicate of global */ /* * Define flasher bits (tests 1 through 11 in packet procedure) @@ -342,12 +346,12 @@ struct peer { u_char status; /* peer status */ u_char new_status; /* under-construction status */ u_char reach; /* reachability register */ + u_char filter_nextpt; /* index into filter shift register */ int flash; /* protocol error test tally bits */ u_long epoch; /* reference epoch */ int burst; /* packets remaining in burst */ int retry; /* retry counter */ int flip; /* interleave mode control */ - int filter_nextpt; /* index into filter shift register */ double filter_delay[NTP_SHIFT]; /* delay shift register */ double filter_offset[NTP_SHIFT]; /* offset shift register */ double filter_disp[NTP_SHIFT]; /* dispersion shift register */ @@ -463,11 +467,12 @@ struct peer { #define FLAG_XLEAVE 0x1000 /* interleaved protocol */ #define FLAG_XB 0x2000 /* interleaved broadcast */ #define FLAG_XBOGUS 0x4000 /* interleaved bogus packet */ -#ifdef OPENSSL +#ifdef AUTOKEY # define FLAG_ASSOC 0x8000 /* autokey request */ -#endif /* OPENSSL */ +#endif #define FLAG_TSTAMP_PPS 0x10000 /* PPS source provides absolute timestamp */ #define FLAG_LOOPNONCE 0x20000 /* Use a nonce for the loopback test */ +#define FLAG_DISABLED 0x40000 /* peer is being torn down */ /* * Definitions for the clear() routine. We use memset() to clear @@ -558,9 +563,15 @@ struct pkt { #define MIN_V4_PKT_LEN (12 * sizeof(u_int32)) /* min header length */ #define LEN_PKT_NOMAC (12 * sizeof(u_int32)) /* min header length */ #define MIN_MAC_LEN (1 * sizeof(u_int32)) /* crypto_NAK */ -#define MAX_MD5_LEN (5 * sizeof(u_int32)) /* MD5 */ -#define MAX_MAC_LEN (6 * sizeof(u_int32)) /* SHA */ +#define MD5_LENGTH 16 +#define SHAKE128_LENGTH 16 +#define CMAC_LENGTH 16 +#define SHA1_LENGTH 20 #define KEY_MAC_LEN sizeof(u_int32) /* key ID in MAC */ +#define MAX_MD5_LEN (KEY_MAC_LEN + MD5_LENGTH) +#define MAX_SHAKE128_LEN (KEY_MAC_LEN + SHAKE128_LENGTH) +#define MAX_SHA1_LEN (KEY_MAC_LEN + SHA1_LENGTH) +#define MAX_MAC_LEN (6 * sizeof(u_int32)) /* any MAC */ #define MAX_MDG_LEN (MAX_MAC_LEN-KEY_MAC_LEN) /* max. digest len */ /* @@ -703,6 +714,10 @@ struct pkt { #define max(a,b) (((a) > (b)) ? (a) : (b)) #define min3(a,b,c) min(min((a),(b)), (c)) +/* clamp a value within a range */ +#define CLAMP(val, minval, maxval) \ + max((minval), min((val), (maxval))) + /* * Configuration items. These are for the protocol module (proto_config()) @@ -783,7 +798,7 @@ typedef struct mon_data mon_entry; struct mon_data { mon_entry * hash_next; /* next structure in hash list */ DECL_DLIST_LINK(mon_entry, mru);/* MRU list link pointers */ - struct interface * lcladr; /* address on which this arrived */ + endpt * lcladr; /* address on which this arrived */ l_fp first; /* first time seen */ l_fp last; /* last time seen */ int leak; /* leaky bucket accumulator */ @@ -804,7 +819,7 @@ struct mon_data { #define MDF_POOL 0x08 /* pool client solicitor */ #define MDF_ACAST 0x10 /* manycast client solicitor */ #define MDF_BCLNT 0x20 /* eph. broadcast/multicast client */ -#define MDF_UCLNT 0x40 /* preemptible manycast or pool client */ +#define MDF_PCLNT 0x40 /* preemptible pool client */ /* * In the context of struct peer in ntpd, three of the cast_flags bits * represent configured associations which never receive packets, and @@ -841,11 +856,10 @@ typedef struct restrict_u_tag restrict_u; struct restrict_u_tag { restrict_u * link; /* link to next entry */ u_int32 count; /* number of packets matched */ + u_int32 expire; /* valid until current_time */ u_short rflags; /* restrict (accesslist) flags */ - u_short mflags; /* match flags */ - short ippeerlimit; /* IP peer limit */ - int srvfuzrftpoll; /* server response: fuzz reftime */ - u_long expire; /* valid until time */ + u_int32 mflags; /* match flags */ + short ippeerlimit; /* limit of associations matching */ union { /* variant starting here */ res_addr4 v4; res_addr6 v6; @@ -856,16 +870,13 @@ struct restrict_u_tag { #define V6_SIZEOF_RESTRICT_U (offsetof(restrict_u, u) \ + sizeof(res_addr6)) +/* restrictions for (4) a given address */ typedef struct r4addr_tag r4addr; struct r4addr_tag { u_short rflags; /* match flags */ short ippeerlimit; /* IP peer limit */ }; -char *build_iflags(u_int32 flags); -char *build_mflags(u_short mflags); -char *build_rflags(u_short rflags); - /* * Restrict (Access) flags (rflags) */ @@ -876,10 +887,6 @@ char *build_rflags(u_short rflags); #define RES_NOPEER 0x0010 /* new association denied */ #define RES_NOEPEER 0x0020 /* new ephemeral association denied */ #define RES_LIMITED 0x0040 /* packet rate exceeded */ -#define RES_FLAGS (RES_IGNORE | RES_DONTSERVE |\ - RES_DONTTRUST | RES_VERSION |\ - RES_NOPEER | RES_NOEPEER | RES_LIMITED) - #define RES_NOQUERY 0x0080 /* mode 6/7 packet denied */ #define RES_NOMODIFY 0x0100 /* mode 6/7 modify denied */ #define RES_NOTRAP 0x0200 /* mode 6/7 set trap denied */ @@ -894,7 +901,10 @@ char *build_rflags(u_short rflags); #define RES_UNUSED 0x0000 /* Unused flag bits (none left) */ -#define RES_ALLFLAGS (RES_FLAGS | RES_NOQUERY | \ +#define RES_ALLFLAGS (RES_IGNORE | RES_DONTSERVE | \ + RES_DONTTRUST | RES_VERSION | \ + RES_NOPEER | RES_NOEPEER | \ + RES_LIMITED | RES_NOQUERY | \ RES_NOMODIFY | RES_NOTRAP | \ RES_LPTRAP | RES_KOD | \ RES_MSSNTP | RES_FLAKE | \ @@ -948,4 +958,15 @@ struct endpoint { #define MRU_ROW_LIMIT 256 /* similar datagrams per response limit for ntpd */ #define MRU_FRAGS_LIMIT 128 + +/* found on POSIX systems in sysexit.h */ +#ifndef EX_SOFTWARE +# define EX_SOFTWARE 70 /* internal software error */ +#endif + +#define BYTESWAP32(u32) \ + (((u_int32)(u32) & 0xff000000) >> 24 | \ + ((u_int32)(u32) & 0xff0000) >> 8 | \ + ((u_int32)(u32) & 0xff00) << 8 | \ + ((u_int32)(u32) & 0xff) << 24) #endif /* NTP_H */ diff --git a/contrib/ntp/include/ntp_config.h b/contrib/ntp/include/ntp_config.h index dbb64e3a2eee..2fce70945035 100644 --- a/contrib/ntp/include/ntp_config.h +++ b/contrib/ntp/include/ntp_config.h @@ -113,7 +113,9 @@ struct restrict_node_tag { address_node * addr; address_node * mask; attr_val_fifo * flag_tok_fifo; + int/*BOOL*/ remove; int line_no; + int column; short ippeerlimit; short srvfuzrft; }; @@ -317,10 +319,13 @@ void destroy_attr_val(attr_val *node); filegen_node *create_filegen_node(int filegen_token, attr_val_fifo *options); string_node *create_string_node(char *str); -restrict_node *create_restrict_node(address_node *addr, - address_node *mask, - short ippeerlimit, - attr_val_fifo *flags, int line_no); +restrict_node *create_restrict_node(address_node * addr, + address_node * mask, + short ippeerlimit, + attr_val_fifo * flag_tok_fifo, + int/*BOOL*/ remove, + int nline, + int ncol); int_node *create_int_node(int val); addr_opts_node *create_addr_opts_node(address_node *addr, attr_val_fifo *options); diff --git a/contrib/ntp/include/ntp_control.h b/contrib/ntp/include/ntp_control.h index 2fe0f30bbd78..91b85aa52df4 100644 --- a/contrib/ntp/include/ntp_control.h +++ b/contrib/ntp/include/ntp_control.h @@ -159,7 +159,7 @@ struct ntp_control { */ struct ctl_trap { sockaddr_u tr_addr; /* address of trap recipient */ - struct interface *tr_localaddr; /* interface to send this through */ + endpt *tr_localaddr; /* interface to send this through */ u_long tr_settime; /* time trap was set */ u_long tr_count; /* async messages sent to this guy */ u_long tr_origtime; /* time trap was originally set */ diff --git a/contrib/ntp/include/ntp_lists.h b/contrib/ntp/include/ntp_lists.h index d741974943ef..bed692ff294e 100644 --- a/contrib/ntp/include/ntp_lists.h +++ b/contrib/ntp/include/ntp_lists.h @@ -181,7 +181,7 @@ do { \ #define UNLINK_EXPR_SLIST(punlinked, listhead, expr, nextlink, \ entrytype) \ -do { \ +if (NULL != (listhead)) { \ entrytype **ppentry; \ \ ppentry = &(listhead); \ @@ -202,6 +202,8 @@ do { \ } else { \ (punlinked) = NULL; \ } \ +} else do { \ + (punlinked) = NULL; \ } while (FALSE) #define UNLINK_SLIST(punlinked, listhead, ptounlink, nextlink, \ diff --git a/contrib/ntp/include/ntp_md5.h b/contrib/ntp/include/ntp_md5.h index 8b5a7d0cbb49..22caff350cd9 100644 --- a/contrib/ntp/include/ntp_md5.h +++ b/contrib/ntp/include/ntp_md5.h @@ -6,6 +6,18 @@ #ifndef NTP_MD5_H #define NTP_MD5_H +/* Use the system MD5 or fall back on libisc's */ +# if defined HAVE_MD5_H && defined HAVE_MD5INIT +# include +# else +# include "isc/md5.h" + typedef isc_md5_t MD5_CTX; +# define MD5_DIGEST_LENGTH ISC_MD5_DIGESTLENGTH +# define MD5Init(c) isc_md5_init(c) +# define MD5Update(c, p, s) isc_md5_update(c, (const void *)p, s) +# define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */ +# endif + # define KEY_TYPE_MD5 NID_md5 #ifdef OPENSSL @@ -20,20 +32,11 @@ /* * Provide OpenSSL-alike MD5 API if we're not using OpenSSL */ -# if defined HAVE_MD5_H && defined HAVE_MD5INIT -# include -# else -# include "isc/md5.h" - typedef isc_md5_t MD5_CTX; -# define MD5Init(c) isc_md5_init(c) -# define MD5Update(c, p, s) isc_md5_update(c, p, s) -# define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */ -# endif typedef MD5_CTX EVP_MD_CTX; # define NID_md5 4 /* from openssl/objects.h */ -# define EVP_MAX_MD_SIZE 64 /* from openssl/evp.h */ +# define EVP_MAX_MD_SIZE MD5_DIGEST_LENGTH # define EVP_MD_CTX_free(c) free(c) # define EVP_MD_CTX_new() calloc(1, sizeof(MD5_CTX)) # define EVP_get_digestbynid(t) NULL @@ -47,7 +50,7 @@ # define EVP_DigestFinal(c, d, pdl) \ do { \ MD5Final((d), (c)); \ - *(pdl) = 16; \ + *(pdl) = MD5_LENGTH; \ } while (0) # endif /* !OPENSSL */ #endif /* NTP_MD5_H */ diff --git a/contrib/ntp/include/ntp_net.h b/contrib/ntp/include/ntp_net.h index 0577402bfb2c..09cc7f65f97b 100644 --- a/contrib/ntp/include/ntp_net.h +++ b/contrib/ntp/include/ntp_net.h @@ -195,7 +195,7 @@ typedef union { #define SOCK_UNSPEC_S(psau) \ (SOCK_UNSPEC(psau) && !SCOPE(psau)) -/* choose a default net interface (struct interface) for v4 or v6 */ +/* choose a default net interface (endpt) for v4 or v6 */ #define ANY_INTERFACE_BYFAM(family) \ ((AF_INET == family) \ ? any_interface \ @@ -227,6 +227,12 @@ typedef union { */ #define LOOPBACKADR 0x7f000001 #define LOOPNETMASK 0xff000000 +#ifdef WORDS_BIGENDIAN +# define LOOPBACKADR_N LOOPBACKADR +#else +# define LOOPBACKADR_N 0x0100007f +#endif + #define ISBADADR(srcadr) \ (IS_IPV4(srcadr) \ @@ -234,5 +240,10 @@ typedef union { == (LOOPBACKADR & LOOPNETMASK)) \ && SRCADR(srcadr) != LOOPBACKADR) +#define IS_LOOPBACK_ADDR(psau) \ + (IS_IPV4(psau) \ + ? LOOPBACKADR == SRCADR(psau) \ + : IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(psau)) \ + ) #endif /* NTP_NET_H */ diff --git a/contrib/ntp/include/ntp_psl.h b/contrib/ntp/include/ntp_psl.h index a0c2662d44c7..c3a6846f90d0 100644 --- a/contrib/ntp/include/ntp_psl.h +++ b/contrib/ntp/include/ntp_psl.h @@ -4,12 +4,15 @@ /* * Poll Skew List Item + * u_in32 is large enough for sub and qty so long as NTP_MAXPOLL < 31 */ - +#if NTP_MAXPOLL >= 31 +#include "psl_item structure needs larger type" +#endif typedef struct psl_item_tag { - int sub; /* int or short? unsigned is OK, but why? */ - int qty; /* int or short? unsigned is OK, but why? */ - int msk; /* int or short? unsigned is OK */ + u_int32 sub; + u_int32 qty; + u_int32 msk; } psl_item; int get_pollskew(int, psl_item *); diff --git a/contrib/ntp/include/ntp_stdlib.h b/contrib/ntp/include/ntp_stdlib.h index 446837e3adcb..6f667fbabed7 100644 --- a/contrib/ntp/include/ntp_stdlib.h +++ b/contrib/ntp/include/ntp_stdlib.h @@ -11,10 +11,12 @@ #include "declcond.h" /* ntpd uses ntpd/declcond.h, others include/ */ #include "l_stdlib.h" +#include "lib_strbuf.h" #include "ntp_md5.h" #include "ntp_net.h" #include "ntp_debug.h" #include "ntp_malloc.h" +#include "lib_strbuf.h" #include "ntp_string.h" #include "ntp_syslog.h" #include "ntp_keyacc.h" @@ -113,7 +115,7 @@ extern size_t MD5authencrypt (int type, const u_char *key, size_t klen, extern int MD5authdecrypt (int type, const u_char *key, size_t klen, u_int32 *pkt, size_t length, size_t size, keyid_t keyno); -extern u_int32 addr2refid(sockaddr_u *); +extern u_int32 addr2refid (sockaddr_u *); /* authkeys.c */ extern void MD5auth_setkey (keyid_t, int, const u_char *, size_t, @@ -180,7 +182,6 @@ extern const char * k_st_flags (u_int32); extern char * statustoa (int, int); extern sockaddr_u * netof (sockaddr_u *); extern char * numtoa (u_int32); -extern char * numtohost (u_int32); extern const char * socktoa (const sockaddr_u *); extern const char * sockporttoa(const sockaddr_u *); extern u_short sock_hash (const sockaddr_u *); @@ -242,18 +243,21 @@ extern pset_tod_using set_tod_using; #ifdef OPENSSL extern void ssl_init (void); extern void ssl_check_version (void); -extern int ssl_init_done; +extern EVP_MD_CTX* digest_ctx; /* also ssl_init_done */ #define INIT_SSL() \ do { \ - if (!ssl_init_done) \ + if (NULL == digest_ctx) { \ ssl_init(); \ - } while (0) + } \ + } while (FALSE) #else /* !OPENSSL follows */ +#define ssl_check_version() do {} while (0) #define INIT_SSL() do {} while (0) #endif -extern int keytype_from_text (const char *, size_t *); -extern const char *keytype_name (int); -extern char * getpass_keytype (int); +extern int keytype_from_text (const char *text, + size_t *pdigest_len); +extern const char *keytype_name (int type); +extern char * getpass_keytype (int type); /* strl-obsd.c */ #ifndef HAVE_STRLCPY /* + */ diff --git a/contrib/ntp/include/ntp_tty.h b/contrib/ntp/include/ntp_tty.h index 6dc48b6c71f1..56f75c115907 100644 --- a/contrib/ntp/include/ntp_tty.h +++ b/contrib/ntp/include/ntp_tty.h @@ -100,4 +100,9 @@ extern int ntp_tty_ioctl(int, u_int); # endif #endif +extern int symBaud2numBaud(int symBaud); +# if 0 +extern int numBaud2symBaud(int numBaud); +#endif + #endif /* NTP_TTY_H */ diff --git a/contrib/ntp/include/ntp_types.h b/contrib/ntp/include/ntp_types.h index c3cf2c196521..6553f01b8a97 100644 --- a/contrib/ntp/include/ntp_types.h +++ b/contrib/ntp/include/ntp_types.h @@ -254,16 +254,6 @@ aligned_ptr( return base + ALIGN_UNITS((minsize < 1) ? 1 : minsize); } -/* - * Macro to use in otherwise-empty source files to comply with ANSI C - * requirement that each translation unit (source file) contain some - * declaration. This has commonly been done by declaring an unused - * global variable of type int or char. An extern reference to abs() - * serves the same purpose without bloat. We once used exit() but - * that can produce warnings on systems that declare exit() noreturn. - */ -#define NONEMPTY_TRANSLATION_UNIT extern int abs(int); - /* * On Unix struct sock_timeval is equivalent to struct timeval. * On Windows built with 64-bit time_t, sock_timeval.tv_sec is a long diff --git a/contrib/ntp/include/ntpd.h b/contrib/ntp/include/ntpd.h index ad3e30fbb889..7de19d72de5a 100644 --- a/contrib/ntp/include/ntpd.h +++ b/contrib/ntp/include/ntpd.h @@ -47,6 +47,17 @@ # define DPRINTF(lvl, arg) do {} while (0) #endif +/* clear bitflag only on DEBUG builds */ +#ifdef DEBUG +# define CLEAR_BIT_IF_DEBUG(bit, flags) \ + do { \ + (flags) &= ~(bit); \ + } while (FALSE) +#else +# define CLEAR_BIT_IF_DEBUG(bit, flags) \ + do {} while (FALSE) +#endif + /* nt_clockstuff.c */ #ifdef SYS_WINNT @@ -60,15 +71,15 @@ extern char * saveconfigdir; /* ntpq saveconfig output directory */ extern void getconfig (int, char **); extern void ctl_clr_stats (void); -extern int ctlclrtrap (sockaddr_u *, struct interface *, int); +extern int ctlclrtrap (sockaddr_u *, endpt *, int); extern u_short ctlpeerstatus (struct peer *); -extern int ctlsettrap (sockaddr_u *, struct interface *, int, int); +extern int ctlsettrap (sockaddr_u *, endpt *, int, int); extern u_short ctlsysstatus (void); extern void init_control (void); extern void process_control (struct recvbuf *, int); extern void report_event (int, struct peer *, const char *); -extern int mprintf_event (int, struct peer *, const char *, ...) - NTP_PRINTF(3, 4); +extern int mprintf_event (int evcode, struct peer *p, + const char *fmt, ...) NTP_PRINTF(3, 4); /* ntp_control.c */ /* @@ -118,7 +129,9 @@ extern void enable_broadcast (endpt *, sockaddr_u *); extern void enable_multicast_if (endpt *, sockaddr_u *); extern void interface_update (interface_receiver_t, void *); #ifndef HAVE_IO_COMPLETION_PORT -extern void io_handler (void); +extern void io_handler (void); +#else +extern void WINAPI ip_interface_changed(ULONG_PTR ctx); #endif extern void init_io (void); extern void io_open_sockets (void); @@ -127,8 +140,10 @@ extern void io_setbclient (void); extern void io_unsetbclient (void); extern void io_multicast_add(sockaddr_u *); extern void io_multicast_del(sockaddr_u *); -extern void sendpkt (sockaddr_u *, struct interface *, int, struct pkt *, int); -#ifdef DEBUG +extern void sendpkt (sockaddr_u *dest, endpt * ep, int ttl, + struct pkt *pkt, int len); +extern isc_boolean_t is_linklocal(sockaddr_u *psau); +#ifdef DEBUG_TIMING extern void collect_timing (struct recvbuf *, const char *, int, l_fp *); #endif #ifdef HAVE_SIGNALED_IO @@ -141,8 +156,13 @@ extern void block_io_and_alarm (void); # define UNBLOCK_IO_AND_ALARM() do {} while (0) # define BLOCK_IO_AND_ALARM() do {} while (0) #endif -#define latoa(pif) localaddrtoa(pif) +#define eptoa(pif) localaddrtoa(pif) +#define latoa(pif) eptoa(pif) extern const char * localaddrtoa(endpt *); +#ifdef DEBUG +extern const char * iflags_str(u_int32 iflags); +#endif + /* ntp_loopfilter.c */ extern void init_loopfilter(void); @@ -198,7 +218,7 @@ extern int crypto_xmit (struct peer *, struct pkt *, struct exten *, keyid_t); extern keyid_t session_key (sockaddr_u *, sockaddr_u *, keyid_t, keyid_t, u_long); -extern int make_keylist (struct peer *, struct interface *); +extern int make_keylist (struct peer *, endpt *); extern void key_expire (struct peer *); extern void crypto_update (void); extern void crypto_update_taichange(void); @@ -226,7 +246,7 @@ extern void clock_select (void); extern void set_sys_leap (u_char); extern u_long leapsec; /* seconds to next leap (proximity class) */ -extern int leapdif; /* TAI difference step at next leap second*/ +extern int leapdif; /* TAI difference step at next leap second */ extern int sys_orphan; extern double sys_mindisp; extern double sys_maxdist; @@ -258,18 +278,27 @@ extern void reset_auth_stats(void); /* ntp_restrict.c */ extern void init_restrict (void); extern void restrictions (sockaddr_u *, r4addr *); -extern void hack_restrict (restrict_op, sockaddr_u *, sockaddr_u *, - short, u_short, u_short, u_long); -extern void restrict_source (sockaddr_u *, int, u_long); +extern int/*BOOL*/hack_restrict(restrict_op op, sockaddr_u *resaddr, + sockaddr_u *resmask, short ippeerlimit, + u_short mflags, u_short rflags, + u_int32 expire); +extern void restrict_source (sockaddr_u *addr, int/*BOOL*/ remove, + u_int32 lifetime); +#ifdef DEBUG extern void dump_restricts (void); +extern const char *resop_str (restrict_op op); +extern const char *rflags_str (u_short rflags); +extern const char *mflags_str (u_short mflags); +#endif + /* ntp_timer.c */ extern void init_timer (void); extern void reinit_timer (void); extern void timer (void); extern void timer_clr_stats (void); -extern void timer_interfacetimeout (u_long); -extern volatile int interface_interval; +extern int endpt_scan_period; /* -U option default 301s */ +extern u_long endpt_scan_timer; /* next scan current_time */ extern u_long orphwait; /* orphan wait time */ #ifdef AUTOKEY extern char *sys_hostname; /* host name */ @@ -288,17 +317,29 @@ extern void record_proto_stats (char *); extern void record_loop_stats (double, double, double, double, int); extern void record_clock_stats (sockaddr_u *, const char *); extern int mprintf_clock_stats(sockaddr_u *, const char *, ...) - NTP_PRINTF(2, 3); -extern void record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, u_int32 refid, int len, u_char *extra); + NTP_PRINTF(2, 3); +extern void record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, + l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, + int leap, int version, int mode, + int stratum, int ppoll, int precision, + double root_delay, double root_dispersion, + u_int32 refid, int len, u_char *extra); extern void check_leap_file (int is_daily_check, u_int32 ntptime, const time_t * systime); extern void record_crypto_stats (sockaddr_u *, const char *); #ifdef DEBUG extern void record_timing_stats (const char *); +extern void append_flagstr(char *flagstr, size_t sz, const char *text); #endif extern char * fstostr(time_t); /* NTP timescale seconds */ /* ntpd.c */ extern void parse_cmdline_opts(int *, char ***); + +/* ntservice.c */ +#ifndef SYS_WINNT +# define ntservice_isup() do {} while (FALSE) +#endif + /* * Signals we catch for debugging. */ @@ -381,7 +422,10 @@ extern volatile u_long handler_pkts; /* number of pkts received by handler */ extern u_long io_timereset; /* time counters were reset */ /* ntp_io.c */ -extern int disable_dynamic_updates; +extern int no_periodic_scan; /* no periodic net addr scans */ +extern int scan_addrs_once; /* no net addr rescans */ +extern int nonlocal_v4_addr_up; /* should we try IPv4 pool? */ +extern int nonlocal_v6_addr_up; /* should we try IPv6 pool? */ extern u_int sys_ifnum; /* next .ifnum to assign */ extern endpt * any_interface; /* IPv4 wildcard */ extern endpt * any6_interface; /* IPv6 wildcard */ diff --git a/contrib/ntp/include/vint64ops.h b/contrib/ntp/include/vint64ops.h index 888d342781fb..50a8c4016264 100644 --- a/contrib/ntp/include/vint64ops.h +++ b/contrib/ntp/include/vint64ops.h @@ -23,6 +23,6 @@ extern vint64 subv64i32(const vint64 * lhs, int32_t rhs); extern vint64 subv64u32(const vint64 * lhs, uint32_t rhs); /* parsing. works like strtoul() or strtoull() */ -extern vint64 strtouv64(char const * begp, char const ** const endp, int base); +extern vint64 strtouv64(char * begp, char ** endp, int base); #endif /*!defined(VINT64OPS_H)*/ diff --git a/contrib/ntp/kernel/Makefile.in b/contrib/ntp/kernel/Makefile.in index f0cf22e84381..40374fd18544 100644 --- a/contrib/ntp/kernel/Makefile.in +++ b/contrib/ntp/kernel/Makefile.in @@ -383,6 +383,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ diff --git a/contrib/ntp/kernel/sys/Makefile.in b/contrib/ntp/kernel/sys/Makefile.in index 447e32e2cc8e..a09b0a1f39d4 100644 --- a/contrib/ntp/kernel/sys/Makefile.in +++ b/contrib/ntp/kernel/sys/Makefile.in @@ -344,6 +344,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ diff --git a/contrib/ntp/libntp/Makefile.am b/contrib/ntp/libntp/Makefile.am index 99ce273d4cd1..85ac6e3f9b92 100644 --- a/contrib/ntp/libntp/Makefile.am +++ b/contrib/ntp/libntp/Makefile.am @@ -192,7 +192,6 @@ libntp_a_SRCS = \ ntp_rfc2553.c \ ntp_worker.c \ numtoa.c \ - numtohost.c \ octtoint.c \ prettydate.c \ refidsmear.c \ diff --git a/contrib/ntp/libntp/Makefile.in b/contrib/ntp/libntp/Makefile.in index 75d6b2abf8bc..69805f7ddca2 100644 --- a/contrib/ntp/libntp/Makefile.in +++ b/contrib/ntp/libntp/Makefile.in @@ -175,12 +175,12 @@ am__libntp_a_SOURCES_DIST = systime.c a_md5encrypt.c adjtime.c \ mktime.c modetoa.c mstolfp.c msyslog.c netof.c ntp_calendar.c \ ntp_calgps.c ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \ ntp_lineedit.c ntp_random.c ntp_realpath.c ntp_rfc2553.c \ - ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \ - refidsmear.c recvbuff.c refnumtoa.c snprintf.c socket.c \ - socktoa.c socktohost.c ssl_init.c statestr.c strdup.c \ - strl_obsd.c syssignal.c timespecops.c timetoa.c timevalops.c \ - timexsup.c uglydate.c vint64ops.c work_fork.c work_thread.c \ - xsbprintf.c ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \ + ntp_worker.c numtoa.c octtoint.c prettydate.c refidsmear.c \ + recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \ + socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \ + syssignal.c timespecops.c timetoa.c timevalops.c timexsup.c \ + uglydate.c vint64ops.c work_fork.c work_thread.c xsbprintf.c \ + ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \ lib/isc/backtrace-emptytbl.c lib/isc/backtrace.c \ lib/isc/unix/dir.c lib/isc/error.c lib/isc/unix/errno2result.c \ lib/isc/event.c lib/isc/unix/file.c lib/isc/inet_ntop.c \ @@ -238,15 +238,15 @@ am__objects_5 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \ ntp_libopts.$(OBJEXT) ntp_lineedit.$(OBJEXT) \ ntp_random.$(OBJEXT) ntp_realpath.$(OBJEXT) \ ntp_rfc2553.$(OBJEXT) ntp_worker.$(OBJEXT) numtoa.$(OBJEXT) \ - numtohost.$(OBJEXT) octtoint.$(OBJEXT) prettydate.$(OBJEXT) \ - refidsmear.$(OBJEXT) recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) \ - snprintf.$(OBJEXT) socket.$(OBJEXT) socktoa.$(OBJEXT) \ - socktohost.$(OBJEXT) ssl_init.$(OBJEXT) statestr.$(OBJEXT) \ - strdup.$(OBJEXT) strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) \ - timespecops.$(OBJEXT) timetoa.$(OBJEXT) timevalops.$(OBJEXT) \ - timexsup.$(OBJEXT) uglydate.$(OBJEXT) vint64ops.$(OBJEXT) \ - work_fork.$(OBJEXT) work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) \ - ymd2yd.$(OBJEXT) $(am__objects_4) $(am__objects_1) + octtoint.$(OBJEXT) prettydate.$(OBJEXT) refidsmear.$(OBJEXT) \ + recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) snprintf.$(OBJEXT) \ + socket.$(OBJEXT) socktoa.$(OBJEXT) socktohost.$(OBJEXT) \ + ssl_init.$(OBJEXT) statestr.$(OBJEXT) strdup.$(OBJEXT) \ + strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) timespecops.$(OBJEXT) \ + timetoa.$(OBJEXT) timevalops.$(OBJEXT) timexsup.$(OBJEXT) \ + uglydate.$(OBJEXT) vint64ops.$(OBJEXT) work_fork.$(OBJEXT) \ + work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) ymd2yd.$(OBJEXT) \ + $(am__objects_4) $(am__objects_1) am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_5) libntp_a_OBJECTS = $(am_libntp_a_OBJECTS) libntpsim_a_AR = $(AR) $(ARFLAGS) @@ -261,12 +261,12 @@ am__libntpsim_a_SOURCES_DIST = systime_s.c a_md5encrypt.c adjtime.c \ mktime.c modetoa.c mstolfp.c msyslog.c netof.c ntp_calendar.c \ ntp_calgps.c ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \ ntp_lineedit.c ntp_random.c ntp_realpath.c ntp_rfc2553.c \ - ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \ - refidsmear.c recvbuff.c refnumtoa.c snprintf.c socket.c \ - socktoa.c socktohost.c ssl_init.c statestr.c strdup.c \ - strl_obsd.c syssignal.c timespecops.c timetoa.c timevalops.c \ - timexsup.c uglydate.c vint64ops.c work_fork.c work_thread.c \ - xsbprintf.c ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \ + ntp_worker.c numtoa.c octtoint.c prettydate.c refidsmear.c \ + recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \ + socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \ + syssignal.c timespecops.c timetoa.c timevalops.c timexsup.c \ + uglydate.c vint64ops.c work_fork.c work_thread.c xsbprintf.c \ + ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \ lib/isc/backtrace-emptytbl.c lib/isc/backtrace.c \ lib/isc/unix/dir.c lib/isc/error.c lib/isc/unix/errno2result.c \ lib/isc/event.c lib/isc/unix/file.c lib/isc/inet_ntop.c \ @@ -321,21 +321,20 @@ am__depfiles_remade = ./$(DEPDIR)/a_md5encrypt.Po \ ./$(DEPDIR)/ntp_libopts.Po ./$(DEPDIR)/ntp_lineedit.Po \ ./$(DEPDIR)/ntp_random.Po ./$(DEPDIR)/ntp_realpath.Po \ ./$(DEPDIR)/ntp_rfc2553.Po ./$(DEPDIR)/ntp_worker.Po \ - ./$(DEPDIR)/numtoa.Po ./$(DEPDIR)/numtohost.Po \ - ./$(DEPDIR)/octtoint.Po ./$(DEPDIR)/prettydate.Po \ - ./$(DEPDIR)/recvbuff.Po ./$(DEPDIR)/refidsmear.Po \ - ./$(DEPDIR)/refnumtoa.Po ./$(DEPDIR)/snprintf.Po \ - ./$(DEPDIR)/socket.Po ./$(DEPDIR)/socktoa.Po \ - ./$(DEPDIR)/socktohost.Po ./$(DEPDIR)/ssl_init.Po \ - ./$(DEPDIR)/statestr.Po ./$(DEPDIR)/strdup.Po \ - ./$(DEPDIR)/strl_obsd.Po ./$(DEPDIR)/syssignal.Po \ - ./$(DEPDIR)/systime.Po ./$(DEPDIR)/systime_s.Po \ - ./$(DEPDIR)/timespecops.Po ./$(DEPDIR)/timetoa.Po \ - ./$(DEPDIR)/timevalops.Po ./$(DEPDIR)/timexsup.Po \ - ./$(DEPDIR)/uglydate.Po ./$(DEPDIR)/vint64ops.Po \ - ./$(DEPDIR)/work_fork.Po ./$(DEPDIR)/work_thread.Po \ - ./$(DEPDIR)/xsbprintf.Po ./$(DEPDIR)/ymd2yd.Po \ - lib/isc/$(DEPDIR)/assertions.Po \ + ./$(DEPDIR)/numtoa.Po ./$(DEPDIR)/octtoint.Po \ + ./$(DEPDIR)/prettydate.Po ./$(DEPDIR)/recvbuff.Po \ + ./$(DEPDIR)/refidsmear.Po ./$(DEPDIR)/refnumtoa.Po \ + ./$(DEPDIR)/snprintf.Po ./$(DEPDIR)/socket.Po \ + ./$(DEPDIR)/socktoa.Po ./$(DEPDIR)/socktohost.Po \ + ./$(DEPDIR)/ssl_init.Po ./$(DEPDIR)/statestr.Po \ + ./$(DEPDIR)/strdup.Po ./$(DEPDIR)/strl_obsd.Po \ + ./$(DEPDIR)/syssignal.Po ./$(DEPDIR)/systime.Po \ + ./$(DEPDIR)/systime_s.Po ./$(DEPDIR)/timespecops.Po \ + ./$(DEPDIR)/timetoa.Po ./$(DEPDIR)/timevalops.Po \ + ./$(DEPDIR)/timexsup.Po ./$(DEPDIR)/uglydate.Po \ + ./$(DEPDIR)/vint64ops.Po ./$(DEPDIR)/work_fork.Po \ + ./$(DEPDIR)/work_thread.Po ./$(DEPDIR)/xsbprintf.Po \ + ./$(DEPDIR)/ymd2yd.Po lib/isc/$(DEPDIR)/assertions.Po \ lib/isc/$(DEPDIR)/backtrace-emptytbl.Po \ lib/isc/$(DEPDIR)/backtrace.Po lib/isc/$(DEPDIR)/buffer.Po \ lib/isc/$(DEPDIR)/error.Po lib/isc/$(DEPDIR)/event.Po \ @@ -581,6 +580,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -822,7 +822,6 @@ libntp_a_SRCS = \ ntp_rfc2553.c \ ntp_worker.c \ numtoa.c \ - numtohost.c \ octtoint.c \ prettydate.c \ refidsmear.c \ @@ -1093,7 +1092,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_rfc2553.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_worker.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtoa.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtohost.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octtoint.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prettydate.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvbuff.Po@am__quote@ # am--include-marker @@ -1380,7 +1378,6 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/ntp_rfc2553.Po -rm -f ./$(DEPDIR)/ntp_worker.Po -rm -f ./$(DEPDIR)/numtoa.Po - -rm -f ./$(DEPDIR)/numtohost.Po -rm -f ./$(DEPDIR)/octtoint.Po -rm -f ./$(DEPDIR)/prettydate.Po -rm -f ./$(DEPDIR)/recvbuff.Po @@ -1535,7 +1532,6 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/ntp_rfc2553.Po -rm -f ./$(DEPDIR)/ntp_worker.Po -rm -f ./$(DEPDIR)/numtoa.Po - -rm -f ./$(DEPDIR)/numtohost.Po -rm -f ./$(DEPDIR)/octtoint.Po -rm -f ./$(DEPDIR)/prettydate.Po -rm -f ./$(DEPDIR)/recvbuff.Po diff --git a/contrib/ntp/libntp/a_md5encrypt.c b/contrib/ntp/libntp/a_md5encrypt.c index 7a372969123f..a571405a5d87 100644 --- a/contrib/ntp/libntp/a_md5encrypt.c +++ b/contrib/ntp/libntp/a_md5encrypt.c @@ -21,7 +21,6 @@ typedef struct { size_t len; } rwbuffT; - #if defined(OPENSSL) && defined(ENABLE_CMAC) static size_t cmac_ctx_size( @@ -40,6 +39,37 @@ cmac_ctx_size( #endif /* OPENSSL && ENABLE_CMAC */ +/* + * Allocate and initialize a digest context. As a speed optimization, + * take an idea from ntpsec and cache the context to avoid malloc/free + * overhead in time-critical paths. ntpsec also caches the algorithms + * with each key. + * This is not thread-safe, but that is + * not a problem at present. + */ +static EVP_MD_CTX * +get_md_ctx( + int nid + ) +{ +#ifndef OPENSSL + static MD5_CTX md5_ctx; + + DEBUG_INSIST(NID_md5 == nid); + MD5Init(&md5_ctx); + + return &md5_ctx; +#else + if (!EVP_DigestInit(digest_ctx, EVP_get_digestbynid(nid))) { + msyslog(LOG_ERR, "%s init failed", OBJ_nid2sn(nid)); + return NULL; + } + + return digest_ctx; +#endif /* OPENSSL */ +} + + static size_t make_mac( const rwbuffT * digest, @@ -99,26 +129,13 @@ make_mac( CMAC_CTX_free(ctx); } else -# endif /*ENABLE_CMAC*/ +# endif /* ENABLE_CMAC */ { /* generic MAC handling */ - EVP_MD_CTX * ctx = EVP_MD_CTX_new(); + EVP_MD_CTX * ctx; u_int uilen = 0; - if ( ! ctx) { - msyslog(LOG_ERR, "MAC encrypt: MAC %s Digest CTX new failed.", - OBJ_nid2sn(ktype)); - goto mac_fail; - } - - #ifdef EVP_MD_CTX_FLAG_NON_FIPS_ALLOW - /* make sure MD5 is allowd */ - EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); - #endif - /* [Bug 3457] DON'T use plain EVP_DigestInit! It would - * kill the flags! */ - if (!EVP_DigestInit_ex(ctx, EVP_get_digestbynid(ktype), NULL)) { - msyslog(LOG_ERR, "MAC encrypt: MAC %s Digest Init failed.", - OBJ_nid2sn(ktype)); + ctx = get_md_ctx(ktype); + if (NULL == ctx) { goto mac_fail; } if ((size_t)EVP_MD_CTX_size(ctx) > digest->len) { @@ -143,39 +160,25 @@ make_mac( } mac_fail: retlen = (size_t)uilen; - - if (ctx) - EVP_MD_CTX_free(ctx); } #else /* !OPENSSL follows */ - if (ktype == NID_md5) - { - EVP_MD_CTX * ctx = EVP_MD_CTX_new(); - u_int uilen = 0; + if (NID_md5 == ktype) { + EVP_MD_CTX * ctx; - if (digest->len < 16) { + ctx = get_md_ctx(ktype); + if (digest->len < MD5_LENGTH) { msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 buf too small."); + } else { + MD5Init(ctx); + MD5Update(ctx, (const void *)key->buf, key->len); + MD5Update(ctx, (const void *)msg->buf, msg->len); + MD5Final(digest->buf, ctx); + retlen = MD5_LENGTH; } - else if ( ! ctx) { - msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 Digest CTX new failed."); - } - else if (!EVP_DigestInit(ctx, EVP_get_digestbynid(ktype))) { - msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 Digest INIT failed."); - } - else { - EVP_DigestUpdate(ctx, key->buf, key->len); - EVP_DigestUpdate(ctx, msg->buf, msg->len); - EVP_DigestFinal(ctx, digest->buf, &uilen); - } - if (ctx) - EVP_MD_CTX_free(ctx); - retlen = (size_t)uilen; - } - else - { - msyslog(LOG_ERR, "MAC encrypt: invalid key type %d" , ktype); + } else { + msyslog(LOG_ERR, "MAC encrypt: invalid key type %d", ktype); } #endif /* !OPENSSL */ @@ -187,7 +190,7 @@ make_mac( /* * MD5authencrypt - generate message digest * - * Returns length of MAC including key ID and digest. + * Returns 0 on failure or length of MAC including key ID. */ size_t MD5authencrypt( @@ -202,13 +205,14 @@ MD5authencrypt( rwbuffT digb = { digest, sizeof(digest) }; robuffT keyb = { key, klen }; robuffT msgb = { pkt, length }; - size_t dlen = 0; + size_t dlen; dlen = make_mac(&digb, type, &keyb, &msgb); - /* If the MAC is longer than the MAX then truncate it. */ - if (dlen > MAX_MDG_LEN) - dlen = MAX_MDG_LEN; - memcpy((u_char *)pkt + length + KEY_MAC_LEN, digest, dlen); + if (0 == dlen) { + return 0; + } + memcpy((u_char *)pkt + length + KEY_MAC_LEN, digest, + min(dlen, MAX_MDG_LEN)); return (dlen + KEY_MAC_LEN); } @@ -236,15 +240,11 @@ MD5authdecrypt( size_t dlen = 0; dlen = make_mac(&digb, type, &keyb, &msgb); - - /* If the MAC is longer than the MAX then truncate it. */ - if (dlen > MAX_MDG_LEN) - dlen = MAX_MDG_LEN; - if (size != (size_t)dlen + KEY_MAC_LEN) { + if (0 == dlen || size != dlen + KEY_MAC_LEN) { msyslog(LOG_ERR, - "MAC decrypt: MAC length error: len=%u key=%d", - (u_int)size, keyno); - return (0); + "MAC decrypt: MAC length error: %u not %u for key %u", + (u_int)size, (u_int)(dlen + KEY_MAC_LEN), keyno); + return FALSE; } return !isc_tsmemcmp(digest, (u_char *)pkt + length + KEY_MAC_LEN, dlen); @@ -254,39 +254,36 @@ MD5authdecrypt( * Calculate the reference id from the address. If it is an IPv4 * address, use it as is. If it is an IPv6 address, do a md5 on * it and use the bottom 4 bytes. - * The result is in network byte order. + * The result is in network byte order for IPv4 addreseses. For + * IPv6, ntpd long differed in the hash calculated on big-endian + * vs. little-endian because the first four bytes of the MD5 hash + * were used as a u_int32 without any byte swapping. This broke + * the refid-based loop detection between mixed-endian systems. + * In order to preserve behavior on the more-common little-endian + * systems, the hash is now byte-swapped on big-endian systems to + * match the little-endian hash. This is ugly but it seems better + * than changing the IPv6 refid calculation on the more-common + * systems. + * This is not thread safe, not a problem so far. */ u_int32 addr2refid(sockaddr_u *addr) { - u_char digest[EVP_MAX_MD_SIZE]; - u_int32 addr_refid; - EVP_MD_CTX *ctx; - u_int len; + static MD5_CTX md5_ctx; + union u_tag { + u_char digest[MD5_DIGEST_LENGTH]; + u_int32 addr_refid; + } u; - if (IS_IPV4(addr)) + if (IS_IPV4(addr)) { return (NSRCADR(addr)); - - INIT_SSL(); - - ctx = EVP_MD_CTX_new(); -# ifdef EVP_MD_CTX_FLAG_NON_FIPS_ALLOW - /* MD5 is not used as a crypto hash here. */ - EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); -# endif - /* [Bug 3457] DON'T use plain EVP_DigestInit! It would kill the - * flags! */ - if (!EVP_DigestInit_ex(ctx, EVP_md5(), NULL)) { - msyslog(LOG_ERR, - "MD5 init failed"); - EVP_MD_CTX_free(ctx); /* pedantic... but safe */ - exit(1); } - - EVP_DigestUpdate(ctx, (u_char *)PSOCK_ADDR6(addr), - sizeof(struct in6_addr)); - EVP_DigestFinal(ctx, digest, &len); - EVP_MD_CTX_free(ctx); - memcpy(&addr_refid, digest, sizeof(addr_refid)); - return (addr_refid); + /* MD5 is not used for authentication here. */ + MD5Init(&md5_ctx); + MD5Update(&md5_ctx, (void *)&SOCK_ADDR6(addr), sizeof(SOCK_ADDR6(addr))); + MD5Final(u.digest, &md5_ctx); +#ifdef WORDS_BIGENDIAN + u.addr_refid = BYTESWAP32(u.addr_refid); +#endif + return u.addr_refid; } diff --git a/contrib/ntp/libntp/adjtime.c b/contrib/ntp/libntp/adjtime.c index b536cc555d9a..57accd68642d 100644 --- a/contrib/ntp/libntp/adjtime.c +++ b/contrib/ntp/libntp/adjtime.c @@ -381,6 +381,6 @@ adjtime (struct timeval *delta, struct timeval *olddelta) return 0; } # else /* no special adjtime() needed */ -int adjtime_bs; +NONEMPTY_TRANSLATION_UNIT # endif #endif diff --git a/contrib/ntp/libntp/audio.c b/contrib/ntp/libntp/audio.c index f404cc078bdc..2cbae7a30a11 100644 --- a/contrib/ntp/libntp/audio.c +++ b/contrib/ntp/libntp/audio.c @@ -517,5 +517,5 @@ audio_show(void) #endif /* not PCM_STYLE_SOUND */ } #else -int audio_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* HAVE_{SYS_AUDIOIO,SUN_AUDIOIO,MACHINE_SOUNDCARD,SYS_SOUNDCARD}_H */ diff --git a/contrib/ntp/libntp/authkeys.c b/contrib/ntp/libntp/authkeys.c index d28b4b932b84..29671ac922bb 100644 --- a/contrib/ntp/libntp/authkeys.c +++ b/contrib/ntp/libntp/authkeys.c @@ -611,6 +611,9 @@ authhavekey( /* * The key is found and trusted. Initialize the key cache. + * The cache really should be a struct savekey to streamline + * this code. Using a sk pointer would be even faster but more + * fragile around pointing to freed memory. */ cache_keyid = sk->keyid; cache_type = sk->type; @@ -927,6 +930,7 @@ authdecrypt( pkt, length, size, keyno); } + /* password decoding helpers */ static size_t pwdecode_plain( diff --git a/contrib/ntp/libntp/authreadkeys.c b/contrib/ntp/libntp/authreadkeys.c index fa2f5b540de4..e4aee723d33a 100644 --- a/contrib/ntp/libntp/authreadkeys.c +++ b/contrib/ntp/libntp/authreadkeys.c @@ -218,14 +218,14 @@ authreadkeys( keytype = keytype_from_text(token, NULL); if (keytype == 0) { log_maybe(NULL, - "authreadkeys: invalid type for key %d", - keyno); + "authreadkeys: unsupported type %s for key %d", + token, keyno); # ifdef ENABLE_CMAC } else if (NID_cmac != keytype && EVP_get_digestbynid(keytype) == NULL) { log_maybe(NULL, - "authreadkeys: no algorithm for key %d", - keyno); + "authreadkeys: no algorithm for %s key %d", + token, keyno); keytype = 0; # endif /* ENABLE_CMAC */ } @@ -270,11 +270,13 @@ authreadkeys( "authreadkeys: passwd has bad char for key %d", keyno); break; +#ifdef DEBUG default: log_maybe(&nerr, - "authreadkeys: unknown errno %d for key %d", + "authreadkeys: unexpected errno %d for key %d: %m", errno, keyno); break; +#endif } continue; } diff --git a/contrib/ntp/libntp/bsd_strerror.c b/contrib/ntp/libntp/bsd_strerror.c index 5ace9aa48542..23888a2d1437 100644 --- a/contrib/ntp/libntp/bsd_strerror.c +++ b/contrib/ntp/libntp/bsd_strerror.c @@ -45,5 +45,5 @@ strerror( return ebuf; } #else -int strerror_bs; +NONEMPTY_TRANSLATION_UNIT #endif diff --git a/contrib/ntp/libntp/clocktypes.c b/contrib/ntp/libntp/clocktypes.c index de7f6b4f3854..1b44546ee172 100644 --- a/contrib/ntp/libntp/clocktypes.c +++ b/contrib/ntp/libntp/clocktypes.c @@ -6,7 +6,6 @@ #include "ntp_fp.h" #include "ntp.h" -#include "lib_strbuf.h" #include "ntp_refclock.h" #include "ntp_stdlib.h" diff --git a/contrib/ntp/libntp/dofptoa.c b/contrib/ntp/libntp/dofptoa.c index c21d1455e7f0..a3f7c9e710dd 100644 --- a/contrib/ntp/libntp/dofptoa.c +++ b/contrib/ntp/libntp/dofptoa.c @@ -5,8 +5,6 @@ #include #include "ntp_fp.h" -#include "lib_strbuf.h" -#include "ntp_string.h" #include "ntp_stdlib.h" char * diff --git a/contrib/ntp/libntp/dolfptoa.c b/contrib/ntp/libntp/dolfptoa.c index 00e1faf793bc..2fa3cc5502d6 100644 --- a/contrib/ntp/libntp/dolfptoa.c +++ b/contrib/ntp/libntp/dolfptoa.c @@ -5,8 +5,6 @@ #include #include "ntp_fp.h" -#include "lib_strbuf.h" -#include "ntp_string.h" #include "ntp_stdlib.h" char * diff --git a/contrib/ntp/libntp/humandate.c b/contrib/ntp/libntp/humandate.c index d9d5e89df017..94b3e6023e17 100644 --- a/contrib/ntp/libntp/humandate.c +++ b/contrib/ntp/libntp/humandate.c @@ -6,7 +6,6 @@ #include "ntp_fp.h" #include "ntp_unixtime.h" /* includes and */ -#include "lib_strbuf.h" #include "ntp_stdlib.h" diff --git a/contrib/ntp/libntp/lib/isc/win32/strerror.c b/contrib/ntp/libntp/lib/isc/win32/strerror.c index 40c5da002f8c..21bdad97778e 100644 --- a/contrib/ntp/libntp/lib/isc/win32/strerror.c +++ b/contrib/ntp/libntp/lib/isc/win32/strerror.c @@ -29,6 +29,8 @@ #include #include +#include "lib_strbuf.h" + /* * Forward declarations */ @@ -88,19 +90,47 @@ isc__strerror(int num, char *buf, size_t size) { */ char * FormatError(int error) { - LPVOID lpMsgBuf = NULL; + char *lpMsgBuf = NULL; + char *pch; + const char boiler[] = + " For information about network troubleshooting, see Windows Help."; + size_t last; + FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, + (FORMAT_MESSAGE_MAX_WIDTH_MASK - 1), NULL, error, /* Default language */ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &lpMsgBuf, + (LPTSTR)(PVOID)&lpMsgBuf, 0, NULL); + /* remove useless boilerplate */ + pch = strstr(lpMsgBuf, boiler); + if (pch != NULL) { + *pch = '\0'; + } + + /* strip any trailing CR/LF and spaces */ + if (lpMsgBuf != NULL) { + last = strlen(lpMsgBuf); + if (last > 0) { + --last; + } + while ('\n' == lpMsgBuf[last] || + '\r' == lpMsgBuf[last] || + ' ' == lpMsgBuf[last]) { + + lpMsgBuf[last] = '\0'; + if (last > 0) { + --last; + } + } + } + return (lpMsgBuf); } @@ -113,27 +143,31 @@ char * NTstrerror(int err, BOOL *bfreebuf) { char *retmsg = NULL; - /* Copy the error value first in case of other errors */ - DWORD errval = err; - *bfreebuf = FALSE; /* Get the Winsock2 error messages */ - if (errval >= WSABASEERR && errval <= (WSABASEERR + 1999)) { - retmsg = GetWSAErrorMessage(errval); - if (retmsg != NULL) - return (retmsg); + /* DLH this may not be needed, FormatError/FormatMessage may handle Winsock error codes */ + if (err >= WSABASEERR && err <= (WSABASEERR + 1999)) { + retmsg = GetWSAErrorMessage(err); } /* * If it's not one of the standard Unix error codes, * try a system error message */ - if (errval > (DWORD) _sys_nerr) { - *bfreebuf = TRUE; - return (FormatError(errval)); - } else { - return (strerror(errval)); + if (NULL == retmsg) { + if (err > _sys_nerr) { + *bfreebuf = TRUE; + retmsg = FormatError(err); + } else { + retmsg = lib_getbuf(); + if (0 != strerror_s(retmsg, LIB_BUFLENGTH, err)) { + snprintf(retmsg, LIB_BUFLENGTH, + "Unknown error number %d/0x%x", + err, err); + } + } } + return retmsg; } /* diff --git a/contrib/ntp/libntp/lib_strbuf.c b/contrib/ntp/libntp/lib_strbuf.c index 76f70163de98..225c430f7e02 100644 --- a/contrib/ntp/libntp/lib_strbuf.c +++ b/contrib/ntp/libntp/lib_strbuf.c @@ -1,10 +1,11 @@ /* - * lib_strbuf - library string storage + * lib_strbuf.c - init_lib() and library string storage */ #ifdef HAVE_CONFIG_H #include #endif +#include #include #include @@ -12,17 +13,18 @@ #include "ntp_stdlib.h" #include "lib_strbuf.h" +#define LIB_NUMBUF 10 /* * Storage declarations */ -int debug; -libbufstr lib_stringbuf[LIB_NUMBUF]; -int lib_nextbuf; -int ipv4_works; -int ipv6_works; -int lib_inited; - +static char lib_stringbuf_storage[LIB_NUMBUF][LIB_BUFLENGTH]; +static char * lib_stringbuf[LIB_NUMBUF]; +int lib_inited; +static isc_mutex_t lib_mutex; +int ipv4_works; +int ipv6_works; +int debug; /* * initialization routine. Might be needed if the code is ROMized. @@ -30,10 +32,41 @@ int lib_inited; void init_lib(void) { - if (lib_inited) + u_int u; + + if (lib_inited) { return; + } ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4()); ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6()); init_systime(); + /* + * Avoid -Wrestrict warnings by keeping a pointer to each buffer + * so the compiler can see copying from one buffer to another is + * not violating restrict qualifiers on, e.g. memcpy() args. + */ + for (u = 0; u < COUNTOF(lib_stringbuf); u++) { + lib_stringbuf[u] = lib_stringbuf_storage[u]; + } + isc_mutex_init(&lib_mutex); lib_inited = TRUE; } + + +char * +lib_getbuf(void) +{ + static int lib_nextbuf; + int mybuf; + + if (!lib_inited) { + init_lib(); + } + isc_mutex_lock(&lib_mutex); + mybuf = lib_nextbuf; + lib_nextbuf = (1 + mybuf) % COUNTOF(lib_stringbuf); + isc_mutex_unlock(&lib_mutex); + zero_mem(lib_stringbuf[mybuf], LIB_BUFLENGTH); + + return lib_stringbuf[mybuf]; +} \ No newline at end of file diff --git a/contrib/ntp/libntp/machines.c b/contrib/ntp/libntp/machines.c index 7a29ac07ea5f..163abf15c6db 100644 --- a/contrib/ntp/libntp/machines.c +++ b/contrib/ntp/libntp/machines.c @@ -13,17 +13,16 @@ #include "ntp_syslog.h" #include "ntp_stdlib.h" #include "ntp_unixtime.h" -#include "lib_strbuf.h" #include "ntp_debug.h" +#include "ntp_tty.h" #ifdef HAVE_UNISTD_H #include #endif #ifdef SYS_WINNT -int _getch(void); /* Declare the one function rather than include conio.h */ +#include #else - #ifdef SYS_VXWORKS #include "taskLib.h" #include "sysLib.h" @@ -531,3 +530,58 @@ getpass(const char * prompt) return password; } #endif /* SYS_WINNT */ + + +static const int baudTable[][2] = { + {B0, 0}, + {B50, 50}, + {B75, 75}, + {B110, 110}, + {B134, 134}, + {B150, 150}, + {B200, 200}, + {B300, 300}, + {B600, 600}, + {B1200, 1200}, + {B1800, 1800}, + {B2400, 2400}, + {B4800, 4800}, + {B9600, 9600}, + {B19200, 19200}, + {B38400, 38400}, +# ifdef B57600 + {B57600, 57600 }, +# endif +# ifdef B115200 + {B115200, 115200}, +# endif + {-1, -1} +}; + + +int symBaud2numBaud(int symBaud) +{ + int i; + + for (i = 0; baudTable[i][1] >= 0; ++i) { + if (baudTable[i][0] == symBaud) { + break; + } + } + return baudTable[i][1]; +} + + +#if 0 /* unused */ +int numBaud2symBaud(int numBaud) +{ + int i; + + for (i = 0; baudTable[i][1] >= 0; ++i) { + if (baudTable[i][1] == numBaud) { + break; + } + } + return baudTable[i][0]; +} +#endif /* unused fn */ diff --git a/contrib/ntp/libntp/modetoa.c b/contrib/ntp/libntp/modetoa.c index 6f13d20580bf..de14c9edd34c 100644 --- a/contrib/ntp/libntp/modetoa.c +++ b/contrib/ntp/libntp/modetoa.c @@ -4,7 +4,6 @@ #include #include -#include "lib_strbuf.h" #include "ntp_stdlib.h" const char * diff --git a/contrib/ntp/libntp/msyslog.c b/contrib/ntp/libntp/msyslog.c index a1ba72792595..b72d5c8dc379 100644 --- a/contrib/ntp/libntp/msyslog.c +++ b/contrib/ntp/libntp/msyslog.c @@ -348,15 +348,14 @@ msyslog( ... ) { - char buf[1024]; va_list ap; va_start(ap, fmt); - mvsnprintf(buf, sizeof(buf), fmt, ap); + mvsyslog(level, fmt, ap); va_end(ap); - addto_syslog(level, buf); } + void mvsyslog( int level, @@ -365,6 +364,7 @@ mvsyslog( ) { char buf[1024]; + mvsnprintf(buf, sizeof(buf), fmt, ap); addto_syslog(level, buf); } diff --git a/contrib/ntp/libntp/netof.c b/contrib/ntp/libntp/netof.c index c8831c3dd9cd..5f1e3662de78 100644 --- a/contrib/ntp/libntp/netof.c +++ b/contrib/ntp/libntp/netof.c @@ -1,5 +1,5 @@ /* - * netof - return the net address part of an ip address in a sockaddr_storage structure + * netof - return the net address part of an ip address in a sockaddr_u structure * (zero out host part) */ #include @@ -11,12 +11,19 @@ #include "ntp_stdlib.h" #include "ntp.h" +/* + * Return the network portion of a host address. Used by ntp_io.c + * findbcastinter() to find a multicast/broadcast interface for + * a given remote address. Note static storage is used, with room + * for only two addresses, which is all that is needed at present. + * + */ sockaddr_u * netof( sockaddr_u *hostaddr ) { - static sockaddr_u netofbuf[8]; + static sockaddr_u netofbuf[2]; static int next_netofbuf; u_int32 netnum; sockaddr_u * netaddr; @@ -27,20 +34,11 @@ netof( memcpy(netaddr, hostaddr, sizeof(*netaddr)); if (IS_IPV4(netaddr)) { - netnum = SRCADR(netaddr); - /* - * We live in a modern CIDR world where the basement nets, which - * used to be class A, are now probably associated with each - * host address. So, for class-A nets, all bits are significant. + * We live in a modern classless IPv4 world. Assume /24. */ - if (IN_CLASSC(netnum)) - netnum &= IN_CLASSC_NET; - else if (IN_CLASSB(netnum)) - netnum &= IN_CLASSB_NET; - + netnum = SRCADR(netaddr) & IN_CLASSC_NET; SET_ADDR4(netaddr, netnum); - } else if (IS_IPV6(netaddr)) /* assume the typical /64 subnet size */ zero_mem(&NSRCADR6(netaddr)[8], 8); diff --git a/contrib/ntp/libntp/ntp_calendar.c b/contrib/ntp/libntp/ntp_calendar.c index 9fc0b48229f2..b850a9db59b8 100644 --- a/contrib/ntp/libntp/ntp_calendar.c +++ b/contrib/ntp/libntp/ntp_calendar.c @@ -56,7 +56,6 @@ #include "ntp_unixtime.h" #include "ntpd.h" -#include "lib_strbuf.h" /* For now, let's take the conservative approach: if the target property * macros are not defined, check a few well-known compiler/architecture diff --git a/contrib/ntp/libntp/ntp_intres.c b/contrib/ntp/libntp/ntp_intres.c index 9fc3815ef007..29546147db8a 100644 --- a/contrib/ntp/libntp/ntp_intres.c +++ b/contrib/ntp/libntp/ntp_intres.c @@ -84,12 +84,6 @@ # include # endif # include -# ifdef HAVE_INT32_ONLY_WITH_DNS -# define HAVE_INT32 -# endif -# ifdef HAVE_U_INT32_ONLY_WITH_DNS -# define HAVE_U_INT32 -# endif #endif #include "ntp.h" diff --git a/contrib/ntp/libntp/ntp_realpath.c b/contrib/ntp/libntp/ntp_realpath.c index 116542945153..90e5a0d59e75 100644 --- a/contrib/ntp/libntp/ntp_realpath.c +++ b/contrib/ntp/libntp/ntp_realpath.c @@ -103,7 +103,7 @@ realpath1(const char *path, char *resolved) size_t left_len, resolved_len, next_token_len; unsigned symlinks; ssize_t slen; - char left[NTP_PATH_MAX], next_token[NTP_PATH_MAX], symlink[NTP_PATH_MAX]; + char left[NTP_PATH_MAX], next_token[NTP_PATH_MAX], link_tgt[NTP_PATH_MAX]; symlinks = 0; if (path[0] == '/') { @@ -157,7 +157,7 @@ realpath1(const char *path, char *resolved) resolved[resolved_len++] = '/'; resolved[resolved_len] = '\0'; } - if (next_token[0] == '\0') { + if ('\0' == next_token[0]) { /* Handle consequential slashes. */ continue; } else if (strcmp(next_token, ".") == 0) { @@ -187,23 +187,24 @@ realpath1(const char *path, char *resolved) if (lstat(resolved, &sb) != 0) return (NULL); if (S_ISLNK(sb.st_mode)) { - if (symlinks++ > NTP_MAXSYMLINKS) { + if (++symlinks > NTP_MAXSYMLINKS) { errno = ELOOP; return (NULL); } - slen = readlink(resolved, symlink, sizeof(symlink)); - if (slen <= 0 || slen >= (ssize_t)sizeof(symlink)) { - if (slen < 0) - ; /* keep errno from readlink(2) call */ - else if (slen == 0) + slen = readlink(resolved, link_tgt, sizeof(link_tgt)); + if (slen <= 0 || slen >= (ssize_t)sizeof(link_tgt)) { + if (slen < 0) { + /* keep errno from readlink(2) call */ + } else if (slen == 0) { errno = ENOENT; - else + } else { errno = ENAMETOOLONG; + } return (NULL); } - symlink[slen] = '\0'; - if (symlink[0] == '/') { - resolved[1] = 0; + link_tgt[slen] = '\0'; + if (link_tgt[0] == '/') { + resolved[1] = '\0'; resolved_len = 1; } else { /* Strip the last path component. */ @@ -214,26 +215,26 @@ realpath1(const char *path, char *resolved) /* * If there are any path components left, then - * append them to symlink. The result is placed + * append them to link_tgt. The result is placed * in `left'. */ if (p != NULL) { - if (symlink[slen - 1] != '/') { - if (slen + 1 >= (ssize_t)sizeof(symlink)) { + if (link_tgt[slen - 1] != '/') { + if (slen + 1 >= (ssize_t)sizeof(link_tgt)) { errno = ENAMETOOLONG; return (NULL); } - symlink[slen] = '/'; - symlink[slen + 1] = 0; + link_tgt[slen] = '/'; + link_tgt[slen + 1] = 0; } - left_len = strlcat(symlink, left, - sizeof(symlink)); - if (left_len >= sizeof(symlink)) { + left_len = strlcat(link_tgt, left, + sizeof(link_tgt)); + if (left_len >= sizeof(link_tgt)) { errno = ENAMETOOLONG; return (NULL); } } - left_len = strlcpy(left, symlink, sizeof(left)); + left_len = strlcpy(left, link_tgt, sizeof(left)); } else if (!S_ISDIR(sb.st_mode) && p != NULL) { errno = ENOTDIR; return (NULL); diff --git a/contrib/ntp/libntp/numtoa.c b/contrib/ntp/libntp/numtoa.c index 51645de01c30..ac8978ee5e58 100644 --- a/contrib/ntp/libntp/numtoa.c +++ b/contrib/ntp/libntp/numtoa.c @@ -12,7 +12,6 @@ #include #include "ntp_fp.h" -#include "lib_strbuf.h" #include "ntp_stdlib.h" char * @@ -34,7 +33,11 @@ numtoa( } -/* Convert a refid & stratum to a string */ +/* + * Convert a refid & stratum to a string. If stratum is negative and the + * refid consists entirely of graphic chars, up to an optional + * terminating zero, display as text similar to stratum 0 & 1. + */ const char * refid_str( u_int32 refid, @@ -43,33 +46,44 @@ refid_str( { char * text; size_t tlen; - char * cp; - - if (stratum > 1) - return numtoa(refid); - - LIB_GETBUF(text); - text[0] = '.'; - /* What if any non-NUL char is not printable? */ - memcpy(&text[1], &refid, sizeof(refid)); - text[1 + sizeof(refid)] = '\0'; - tlen = strlen(text); - text[tlen] = '.'; - text[tlen + 1] = '\0'; + char * cp; + int printable; /* - * Now make sure the contents are 'graphic'. - * - * This refid is expected to be up to 4 ascii graphics. - * If any character is not a graphic, replace it with a space. - * This will at least alert the viewer of a problem. + * ntpd can have stratum = 0 and refid 127.0.0.1 in orphan mode. + * https://bugs.ntp.org/3854. Mirror the refid logic in timer(). */ - for (cp = text + 1; *cp; ++cp) { - if (!isgraph((int)*cp)) { - *cp = ' '; + if (0 == stratum && LOOPBACKADR_N == refid) { + return ".ORPH."; + } + printable = FALSE; + if (stratum < 2) { + text = lib_getbuf(); + text[0] = '.'; + memcpy(&text[1], &refid, sizeof(refid)); + text[1 + sizeof(refid)] = '\0'; + tlen = strlen(text); + text[tlen] = '.'; + text[tlen + 1] = '\0'; + /* + * Now make sure the contents are 'graphic'. + * + * This refid is expected to be up to 4 printable ASCII. + * isgraph() is similar to isprint() but excludes space. + * If any character is not graphic, replace it with a '?'. + * This will at least alert the viewer of a problem. + */ + for (cp = text + 1; '\0' != *cp; ++cp) { + if (!isgraph((int)*cp)) { + printable = FALSE; + *cp = '?'; + } + } + if ( (stratum < 0 && printable) + || stratum < 2) { + return text; } } - - return text; + return numtoa(refid); } diff --git a/contrib/ntp/libntp/numtohost.c b/contrib/ntp/libntp/numtohost.c deleted file mode 100644 index 6b250d602de0..000000000000 --- a/contrib/ntp/libntp/numtohost.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * numtohost - convert network number to host name. - */ -#include - -#include -#ifdef HAVE_NETINET_IN_H -#include /* ntohl */ -#endif - -#include "ntp_fp.h" -#include "ntp_stdlib.h" -#include "lib_strbuf.h" - -#define LOOPBACKNET 0x7f000000 -#define LOOPBACKHOST 0x7f000001 -#define LOOPBACKNETMASK 0xff000000 - -char * -numtohost( - u_int32 netnum - ) -{ - char *bp; - struct hostent *hp; - - /* - * This is really gross, but saves lots of hanging looking for - * hostnames for the radio clocks. Don't bother looking up - * addresses on the loopback network except for the loopback - * host itself. - */ - if ((((ntohl(netnum) & LOOPBACKNETMASK) == LOOPBACKNET) - && (ntohl(netnum) != LOOPBACKHOST)) - || ((hp = gethostbyaddr((char *)&netnum, sizeof netnum, AF_INET)) - == 0)) - return numtoa(netnum); - - LIB_GETBUF(bp); - strlcpy(bp, hp->h_name, LIB_BUFLENGTH); - - return bp; -} diff --git a/contrib/ntp/libntp/prettydate.c b/contrib/ntp/libntp/prettydate.c index deacc26bbe2b..060f79e5e327 100644 --- a/contrib/ntp/libntp/prettydate.c +++ b/contrib/ntp/libntp/prettydate.c @@ -6,7 +6,6 @@ #include "ntp_fp.h" #include "ntp_unixtime.h" /* includes */ -#include "lib_strbuf.h" #include "ntp_stdlib.h" #include "ntp_assert.h" #include "ntp_calendar.h" diff --git a/contrib/ntp/libntp/recvbuff.c b/contrib/ntp/libntp/recvbuff.c index d84a87d68501..6e7cda5d373d 100644 --- a/contrib/ntp/libntp/recvbuff.c +++ b/contrib/ntp/libntp/recvbuff.c @@ -93,41 +93,54 @@ initialise_buffer(recvbuf_t *buff) static void create_buffers( - size_t nbufs) + size_t nbufs +) { + static const u_int chunk = # ifndef DEBUG - static const u_int chunk = RECV_INC; + RECV_INC; # else /* Allocate each buffer individually so they can be free()d * during ntpd shutdown on DEBUG builds to keep them out of heap * leak reports. */ - static const u_int chunk = 1; + 1; # endif - - register recvbuf_t *bufp; - u_int i; - size_t abuf; + static int/*BOOL*/ doneonce; + recvbuf_t * bufp; + u_int i; + size_t abuf; /*[bug 3666]: followup -- reset shortfalls in all cases */ abuf = nbufs + buffer_shortfall; buffer_shortfall = 0; - if (limit_recvbufs <= total_recvbufs) + if (limit_recvbufs <= total_recvbufs) { + if (!doneonce) { + msyslog(LOG_CRIT, "Unable to allocate receive" + " buffer, %lu/%lu", + total_recvbufs, limit_recvbufs); + doneonce = TRUE; + } return; - - if (abuf < nbufs || abuf > RECV_BATCH) + } + + if (abuf < nbufs || abuf > RECV_BATCH) { abuf = RECV_BATCH; /* clamp on overflow */ - else + } else { abuf += (~abuf + 1) & (RECV_INC - 1); /* round up */ - - if (abuf > (limit_recvbufs - total_recvbufs)) + } + if (abuf > (limit_recvbufs - total_recvbufs)) { abuf = limit_recvbufs - total_recvbufs; + } abuf += (~abuf + 1) & (chunk - 1); /* round up */ while (abuf) { bufp = calloc(chunk, sizeof(*bufp)); if (!bufp) { + msyslog(LOG_CRIT, "Out of memory, allocating " + "%u recvbufs, %lu bytes", + chunk, (u_long)sizeof(*bufp) * chunk); limit_recvbufs = total_recvbufs; break; } diff --git a/contrib/ntp/libntp/refnumtoa.c b/contrib/ntp/libntp/refnumtoa.c index cfebefe1ed18..1e1aa4e06b4c 100644 --- a/contrib/ntp/libntp/refnumtoa.c +++ b/contrib/ntp/libntp/refnumtoa.c @@ -5,7 +5,6 @@ #include #include "ntp_net.h" -#include "lib_strbuf.h" #include "ntp_stdlib.h" const char * diff --git a/contrib/ntp/libntp/snprintf.c b/contrib/ntp/libntp/snprintf.c index f4685e1ad4b6..52ec17a04eb2 100644 --- a/contrib/ntp/libntp/snprintf.c +++ b/contrib/ntp/libntp/snprintf.c @@ -1587,7 +1587,7 @@ rpl_asprintf(va_alist) va_dcl } #endif /* HW_WANT_RPL_ASPRINTF */ #else /* Dummy declaration to avoid empty translation unit warnings. */ -int main(void); +NONEMPTY_TRANSLATION_UNIT #endif /* HW_WANT_RPL_SNPRINTF || HW_WANT_RPL_VSNPRINTF || HW_WANT_RPL_ASPRINTF || [...] */ #if TEST_SNPRINTF diff --git a/contrib/ntp/libntp/socket.c b/contrib/ntp/libntp/socket.c index 11fb004690c4..08e6ffbebb6a 100644 --- a/contrib/ntp/libntp/socket.c +++ b/contrib/ntp/libntp/socket.c @@ -195,11 +195,11 @@ open_socket( ) void sendpkt( - sockaddr_u * dest, - struct interface * ep, - int ttl, - struct pkt * pkt, - int len + sockaddr_u * dest, + endpt * ep, + int ttl, + struct pkt * pkt, + int len ) static inline int @@ -207,9 +207,9 @@ read_refclock_packet(SOCKET fd, struct refclockio *rp, l_fp ts) static inline int read_network_packet( - SOCKET fd, - struct interface * itf, - l_fp ts + SOCKET fd, + endpt * itf, + l_fp ts ) void diff --git a/contrib/ntp/libntp/socktoa.c b/contrib/ntp/libntp/socktoa.c index 4071b0a45be0..f83f78b87981 100644 --- a/contrib/ntp/libntp/socktoa.c +++ b/contrib/ntp/libntp/socktoa.c @@ -21,7 +21,6 @@ #include #include "ntp_fp.h" -#include "lib_strbuf.h" #include "ntp_stdlib.h" #include "ntp.h" diff --git a/contrib/ntp/libntp/socktohost.c b/contrib/ntp/libntp/socktohost.c index fdf9adb9e2e6..3ea5b56004d8 100644 --- a/contrib/ntp/libntp/socktohost.c +++ b/contrib/ntp/libntp/socktohost.c @@ -15,7 +15,6 @@ #include #include "ntp_fp.h" -#include "lib_strbuf.h" #include "ntp_stdlib.h" #include "ntp.h" #include "ntp_debug.h" diff --git a/contrib/ntp/libntp/ssl_init.c b/contrib/ntp/libntp/ssl_init.c index 925893257b7f..6de8a0b5fccc 100644 --- a/contrib/ntp/libntp/ssl_init.c +++ b/contrib/ntp/libntp/ssl_init.c @@ -23,67 +23,60 @@ # define CMAC_LENGTH 16 # define CMAC "AES128CMAC" # endif /*HAVE_OPENSSL_CMAC_H*/ -int ssl_init_done; -#if OPENSSL_VERSION_NUMBER < 0x10100000L +EVP_MD_CTX *digest_ctx; + static void atexit_ssl_cleanup(void) { - if (!ssl_init_done) { + if (NULL == digest_ctx) { return; } - - ssl_init_done = FALSE; + EVP_MD_CTX_free(digest_ctx); + digest_ctx = NULL; +#if OPENSSL_VERSION_NUMBER < 0x10100000L EVP_cleanup(); ERR_free_strings(); +#endif /* OpenSSL < 1.1 */ } + void ssl_init(void) { init_lib(); - if ( ! ssl_init_done) { - ERR_load_crypto_strings(); - OpenSSL_add_all_algorithms(); - atexit(&atexit_ssl_cleanup); - ssl_init_done = TRUE; + if (NULL == digest_ctx) { +#if OPENSSL_VERSION_NUMBER < 0x10100000L + ERR_load_crypto_strings(); + OpenSSL_add_all_algorithms(); +#endif /* OpenSSL < 1.1 */ + digest_ctx = EVP_MD_CTX_new(); + INSIST(digest_ctx != NULL); + atexit(&atexit_ssl_cleanup); } } -#else /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ - -void -ssl_init(void) -{ - init_lib(); - ssl_init_done = TRUE; -} - -#endif /* OPENSSL_VERSION_NUMBER */ - void ssl_check_version(void) { u_long v; + char * buf; v = OpenSSL_version_num(); if ((v ^ OPENSSL_VERSION_NUMBER) & ~0xff0L) { - msyslog(LOG_WARNING, - "OpenSSL version mismatch. Built against %lx, you have %lx", - (u_long)OPENSSL_VERSION_NUMBER, v); - fprintf(stderr, - "OpenSSL version mismatch. Built against %lx, you have %lx\n", - (u_long)OPENSSL_VERSION_NUMBER, v); + LIB_GETBUF(buf); + snprintf(buf, LIB_BUFLENGTH, + "OpenSSL version mismatch." + "Built against %lx, you have %lx\n", + (u_long)OPENSSL_VERSION_NUMBER, v); + msyslog(LOG_WARNING, "%s", buf); + fputs(buf, stderr); } - INIT_SSL(); } - -#else /* !OPENSSL */ -# define MD5_LENGTH 16 #endif /* OPENSSL */ @@ -102,7 +95,7 @@ keytype_from_text( int key_type; u_int digest_len; #ifdef OPENSSL /* --*-- OpenSSL code --*-- */ - const u_long max_digest_len = MAX_MAC_LEN - sizeof(keyid_t); + const u_long max_digest_len = MAX_MDG_LEN; char * upcased; char * pch; EVP_MD const * md; @@ -204,7 +197,7 @@ keytype_from_text( */ const char * keytype_name( - int nid + int type ) { static const char unknown_type[] = "(unknown key type)"; @@ -212,23 +205,18 @@ keytype_name( #ifdef OPENSSL INIT_SSL(); - name = OBJ_nid2sn(nid); + name = OBJ_nid2sn(type); # ifdef ENABLE_CMAC - if (NID_cmac == nid) { + if (NID_cmac == type) { name = CMAC; - - if (debug) { - fprintf(stderr, "%s:%d:%s():%s:nid\n", - __FILE__, __LINE__, __func__, CMAC); - } } else # endif /*ENABLE_CMAC*/ if (NULL == name) { name = unknown_type; } #else /* !OPENSSL follows */ - if (NID_md5 == nid) + if (NID_md5 == type) name = "MD5"; else name = unknown_type; @@ -251,13 +239,13 @@ keytype_name( */ char * getpass_keytype( - int keytype + int type ) { char pass_prompt[64 + 11 + 1]; /* 11 for " Password: " */ snprintf(pass_prompt, sizeof(pass_prompt), - "%.64s Password: ", keytype_name(keytype)); + "%.64s Password: ", keytype_name(type)); return getpass(pass_prompt); } diff --git a/contrib/ntp/libntp/statestr.c b/contrib/ntp/libntp/statestr.c index e712dc87e32d..bde1f50e7e74 100644 --- a/contrib/ntp/libntp/statestr.c +++ b/contrib/ntp/libntp/statestr.c @@ -8,7 +8,6 @@ #include "ntp_stdlib.h" #include "ntp_fp.h" #include "ntp.h" -#include "lib_strbuf.h" #include "ntp_refclock.h" #include "ntp_control.h" #include "ntp_string.h" diff --git a/contrib/ntp/libntp/systime.c b/contrib/ntp/libntp/systime.c index 76fba7fe1608..8d10b2e43f82 100644 --- a/contrib/ntp/libntp/systime.c +++ b/contrib/ntp/libntp/systime.c @@ -16,7 +16,6 @@ #include "timevalops.h" #include "timespecops.h" #include "ntp_calendar.h" -#include "lib_strbuf.h" #ifdef HAVE_SYS_PARAM_H # include diff --git a/contrib/ntp/libntp/timexsup.c b/contrib/ntp/libntp/timexsup.c index 979a7c4aea8e..21f7738d3e5f 100644 --- a/contrib/ntp/libntp/timexsup.c +++ b/contrib/ntp/libntp/timexsup.c @@ -6,14 +6,27 @@ */ #include "config.h" -#include "timexsup.h" #include #include +#ifdef HAVE_SYS_TIME_H +# include +#else +# ifdef HAVE_TIME_H +# include +# endif +#endif #ifdef HAVE_SYS_TIMEX_H # include +#else +# ifdef HAVE_TIMEX_H +# include +# endif #endif +#include "ntp_types.h" +#include "timexsup.h" + #if defined(MOD_NANO) != defined(STA_NANO) # warning inconsistent definitions of MOD_NANO vs STA_NANO #endif @@ -41,10 +54,11 @@ dbl_from_var_long( ) { #ifdef STA_NANO - if (status & STA_NANO) + if (STA_NANO & status) { return (double)lval * 1e-9; + } #else - (void)status; + UNUSED_ARG(status); #endif return (double)lval * 1e-6; } @@ -67,7 +81,7 @@ var_long_from_dbl( *modes |= MOD_NANO; dval *= 1e+9; #else - (void)modes; + UNUSED_ARG(modes); dval *= 1e+6; #endif return clamp_rounded(dval); diff --git a/contrib/ntp/libntp/uglydate.c b/contrib/ntp/libntp/uglydate.c index 66b5139096b4..165578674185 100644 --- a/contrib/ntp/libntp/uglydate.c +++ b/contrib/ntp/libntp/uglydate.c @@ -7,7 +7,6 @@ #include "ntp_fp.h" #include "ntp_unixtime.h" -#include "lib_strbuf.h" #include "ntp_stdlib.h" diff --git a/contrib/ntp/libntp/vint64ops.c b/contrib/ntp/libntp/vint64ops.c index 1d5087d95438..23c9f26dcfac 100644 --- a/contrib/ntp/libntp/vint64ops.c +++ b/contrib/ntp/libntp/vint64ops.c @@ -15,24 +15,25 @@ #include "ntp_types.h" #include "ntp_fp.h" +#include "ntp_malloc.h" #include "vint64ops.h" /* -------------------------------------------------------------------------*/ vint64 strtouv64( - char const * begp, - char const ** const endp, - int base + char * begp, + char ** endp, + int base ) { - vint64 res; - u_char digit; - int sig, num; - const u_char *src; + vint64 res; + u_char digit; + int sig, num; + u_char *src; num = sig = 0; - src = (const u_char*)begp; + src = (u_char *)begp; while (isspace(*src)) src++; @@ -61,7 +62,7 @@ strtouv64( return res; } - memset(&res, 0, sizeof(res)); + ZERO(res); while (*src) { if (isdigit(*src)) digit = *src - '0'; @@ -97,7 +98,7 @@ strtouv64( if (!num) errno = EINVAL; if (endp) - *endp = (const char *)src; + *endp = (char *)src; if (sig) M_NEG(res.D_s.hi, res.D_s.lo); return res; diff --git a/contrib/ntp/libntp/work_thread.c b/contrib/ntp/libntp/work_thread.c index c1fe5c20c995..0d15c6e36e6f 100644 --- a/contrib/ntp/libntp/work_thread.c +++ b/contrib/ntp/libntp/work_thread.c @@ -376,8 +376,12 @@ send_blocking_resp_internal( { # ifdef WORK_PIPE if (1 != write(c->resp_write_pipe, "", 1)) - msyslog(LOG_WARNING, "async resolver: %s", - "failed to notify main thread!"); + msyslog(LOG_WARNING, "async resolver: blocking_get%sinfo" + " failed to notify main thread!", + (BLOCKING_GETNAMEINFO == resp->rtype) + ? "name" + : "addr" + ); # else tickle_sem(c->responses_pending); # endif @@ -489,7 +493,7 @@ start_blocking_thread( /* -------------------------------------------------------------------- * Create a worker thread. There are several differences between POSIX - * and Windows, of course -- most notably the Windows thread is no + * and Windows, of course -- most notably the Windows thread is a * detached thread, and we keep the handle around until we want to get * rid of the thread. The notification scheme also differs: Windows * makes use of semaphores in both directions, POSIX uses a pipe for @@ -520,9 +524,12 @@ start_blocking_thread_internal( } /* remember the thread priority is only within the process class */ if (!SetThreadPriority(c->thr_table[0].thnd, - THREAD_PRIORITY_BELOW_NORMAL)) + THREAD_PRIORITY_BELOW_NORMAL)) { msyslog(LOG_ERR, "Error lowering blocking thread priority: %m"); - + } + if (NULL != pSetThreadDescription) { + (*pSetThreadDescription)(c->thr_table[0].thnd, L"ntp_worker"); + } resumed = ResumeThread(c->thr_table[0].thnd); DEBUG_INSIST(resumed); c->thread_ref = &c->thr_table[0]; diff --git a/contrib/ntp/libparse/Makefile.am b/contrib/ntp/libparse/Makefile.am index a4a3ed264f2f..f88e3b2af36d 100644 --- a/contrib/ntp/libparse/Makefile.am +++ b/contrib/ntp/libparse/Makefile.am @@ -94,14 +94,9 @@ AM_LDFLAGS = $(NTP_HARD_LDFLAGS) EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed - sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new - sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new - mv -f info_trimble.new $@ - -#$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed -# sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new -# sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new -# mv -f info_trimble.new $@ + $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new + $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new + $(AM_V_at)mv -f info_trimble.new $@ kieee754io.o: $(srcdir)/ieee754io.c $(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@ @@ -165,11 +160,11 @@ parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a parsesolaris.o: sys/systm.h -# [Bug3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the +# [Bug 3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the # ones from 'systm.h'. sys/systm.h: -mkdir sys - sed -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h + $(SED) -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h ## check-libparse is invoked by ntpd/Makefile.am check-libparse: $(noinst_LIBRARIES) diff --git a/contrib/ntp/libparse/Makefile.in b/contrib/ntp/libparse/Makefile.in index 70fb2d0a5fea..88a42a6f12c7 100644 --- a/contrib/ntp/libparse/Makefile.in +++ b/contrib/ntp/libparse/Makefile.in @@ -90,6 +90,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = parsestreams$(EXEEXT) parsesolaris$(EXEEXT) +@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp subdir = libparse ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \ @@ -423,6 +424,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -522,9 +524,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ NULL = -BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER) check-libntp \ - .deps-ver -CLEANFILES = check-libntp .deps-ver +BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER) \ + $(am__append_1) .deps-ver +CLEANFILES = .deps-ver DISTCLEANFILES = $(DEPDIR)/deps-ver noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@ EXTRA_LIBRARIES = libparse.a libparse_kernel.a @@ -998,14 +1000,9 @@ vphack_after: ) info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed - sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new - sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new - mv -f info_trimble.new $@ - -#$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed -# sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new -# sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new -# mv -f info_trimble.new $@ + $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new + $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new + $(AM_V_at)mv -f info_trimble.new $@ kieee754io.o: $(srcdir)/ieee754io.c $(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@ @@ -1069,20 +1066,19 @@ parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a parsesolaris.o: sys/systm.h -# [Bug3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the +# [Bug 3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the # ones from 'systm.h'. sys/systm.h: -mkdir sys - sed -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h + $(SED) -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h check-libparse: $(noinst_LIBRARIES) @: do-nothing action to avoid default SCCS get -check-libntp: $(top_builddir)/libntp/libntp.a - @: avoid default SCCS get by some make implementations +.PHONY: check-libntp -$(top_builddir)/libntp/libntp.a: - cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a +@LIBNTP_SUBMAKES_TRUE@check-libntp: +@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver @[ -f $@ ] || \ cp $(top_srcdir)/deps-ver $@ diff --git a/contrib/ntp/libparse/clk_computime.c b/contrib/ntp/libparse/clk_computime.c index 7273ac762e37..10ec9a7c1c97 100644 --- a/contrib/ntp/libparse/clk_computime.c +++ b/contrib/ntp/libparse/clk_computime.c @@ -182,7 +182,7 @@ inp_computime( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */ -int clk_computime_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */ /* diff --git a/contrib/ntp/libparse/clk_dcf7000.c b/contrib/ntp/libparse/clk_dcf7000.c index 0621cd5649e4..4aeb4c39ba9f 100644 --- a/contrib/ntp/libparse/clk_dcf7000.c +++ b/contrib/ntp/libparse/clk_dcf7000.c @@ -176,7 +176,7 @@ inp_dcf7000( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */ -int clk_dcf7000_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */ /* diff --git a/contrib/ntp/libparse/clk_hopf6021.c b/contrib/ntp/libparse/clk_hopf6021.c index a747581b75dc..436c92cb3b88 100644 --- a/contrib/ntp/libparse/clk_hopf6021.c +++ b/contrib/ntp/libparse/clk_hopf6021.c @@ -20,7 +20,7 @@ # include #endif -#include +#include "ntp_types.h" #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_HOPF6021) diff --git a/contrib/ntp/libparse/clk_meinberg.c b/contrib/ntp/libparse/clk_meinberg.c index e4ebf0acc605..1aa839bfd15a 100644 --- a/contrib/ntp/libparse/clk_meinberg.c +++ b/contrib/ntp/libparse/clk_meinberg.c @@ -733,7 +733,7 @@ gps_input( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */ -int clk_meinberg_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */ /* diff --git a/contrib/ntp/libparse/clk_rawdcf.c b/contrib/ntp/libparse/clk_rawdcf.c index 3fa74997c9bf..9b6eeafb163f 100644 --- a/contrib/ntp/libparse/clk_rawdcf.c +++ b/contrib/ntp/libparse/clk_rawdcf.c @@ -742,7 +742,7 @@ inp_rawdcf( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */ -int clk_rawdcf_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */ /* diff --git a/contrib/ntp/libparse/clk_rcc8000.c b/contrib/ntp/libparse/clk_rcc8000.c index 11d52acc5a24..e9bb115da4f5 100644 --- a/contrib/ntp/libparse/clk_rcc8000.c +++ b/contrib/ntp/libparse/clk_rcc8000.c @@ -163,7 +163,7 @@ inp_rcc8000( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */ -int clk_rcc8000_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */ /* diff --git a/contrib/ntp/libparse/clk_schmid.c b/contrib/ntp/libparse/clk_schmid.c index d85b1a5da512..5dd52047aa0f 100644 --- a/contrib/ntp/libparse/clk_schmid.c +++ b/contrib/ntp/libparse/clk_schmid.c @@ -222,7 +222,7 @@ inp_schmid( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */ -int clk_schmid_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */ /* diff --git a/contrib/ntp/libparse/clk_sel240x.c b/contrib/ntp/libparse/clk_sel240x.c index b1390b4cefb1..f27b662491f1 100644 --- a/contrib/ntp/libparse/clk_sel240x.c +++ b/contrib/ntp/libparse/clk_sel240x.c @@ -168,5 +168,5 @@ cvt_sel240x( unsigned char *buffer, } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */ -int clk_sel240x_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */ diff --git a/contrib/ntp/libparse/clk_trimtaip.c b/contrib/ntp/libparse/clk_trimtaip.c index a60d01ec1870..ce930952ffa2 100644 --- a/contrib/ntp/libparse/clk_trimtaip.c +++ b/contrib/ntp/libparse/clk_trimtaip.c @@ -181,7 +181,7 @@ inp_trimtaip( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */ -int clk_trimtaip_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */ /* diff --git a/contrib/ntp/libparse/clk_trimtsip.c b/contrib/ntp/libparse/clk_trimtsip.c index 8cf5660657cc..5af69d349eea 100644 --- a/contrib/ntp/libparse/clk_trimtsip.c +++ b/contrib/ntp/libparse/clk_trimtsip.c @@ -388,7 +388,7 @@ cvt_trimtsip( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */ -int clk_trimtsip_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */ /* diff --git a/contrib/ntp/libparse/clk_varitext.c b/contrib/ntp/libparse/clk_varitext.c index 0d830354d799..a4c6d31b797a 100644 --- a/contrib/ntp/libparse/clk_varitext.c +++ b/contrib/ntp/libparse/clk_varitext.c @@ -252,7 +252,7 @@ inp_varitext( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */ -int clk_varitext_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */ /* diff --git a/contrib/ntp/libparse/clk_wharton.c b/contrib/ntp/libparse/clk_wharton.c index e1ef61d55bdb..2df425bc67b7 100644 --- a/contrib/ntp/libparse/clk_wharton.c +++ b/contrib/ntp/libparse/clk_wharton.c @@ -9,7 +9,7 @@ #include #endif -#include +#include "ntp_types.h" #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_WHARTON_400A) /* diff --git a/contrib/ntp/libparse/ieee754io.c b/contrib/ntp/libparse/ieee754io.c index 61bc8533b0d7..b41a96c2170e 100644 --- a/contrib/ntp/libparse/ieee754io.c +++ b/contrib/ntp/libparse/ieee754io.c @@ -50,8 +50,6 @@ static void put_byte (unsigned char *, offsets_t, int *, unsigned char); #ifdef LIBDEBUG -#include "lib_strbuf.h" - static char * fmt_blong( unsigned long val, @@ -396,7 +394,22 @@ fetch_ieee754( } } } - + +/* + * DLH: This function is currently unused in ntpd. If you think about + * using it, be sure it does what you intend. I notice the bufpp arg + * is never referenced, and the calculated mantissa_high & mantissa_low + * are only referenced in debug output. It seems they're supposed to + * be composed into an ieee754-format float and stored at *bufpp or + * possibly **bufpp. Brought to my attention by this: + * + * ieee754io.c:414:10: warning: variable 'mantissa_low' set but not used + * [-Wunused-but-set-variable] + * + * To quiet it I'm #ifdef'ing the function away for now, here and below + * the call to it in main(). + */ +#ifdef PUT_IEEE754_UNUSED_FUNC int put_ieee754( unsigned char **bufpp, @@ -536,6 +549,7 @@ put_ieee754( } return IEEE_OK; } +#endif /* PUT_IEEE754_UNUSED_FUNC */ #if defined(DEBUG) && defined(LIBDEBUG) @@ -562,8 +576,11 @@ int main( printf("fetch from %f = %d\n", f, fetch_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off)); printf("fp [%s %s] = %s\n", fmt_blong(fp.l_ui, 32), fmt_blong(fp.l_uf, 32), mfptoa(fp.l_ui, fp.l_uf, 15)); f_p = &f; +#ifdef PUT_IEEE754_UNUSED_FUNC put_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off); - +/* there should be a check on *f_p (f) having the expected result here */ +#endif /* PUT_IEEE754_UNUSED_FUNC */ + return 0; } diff --git a/contrib/ntp/libparse/parse.c b/contrib/ntp/libparse/parse.c index 69395ac4a560..56f2c3702bd8 100644 --- a/contrib/ntp/libparse/parse.c +++ b/contrib/ntp/libparse/parse.c @@ -875,7 +875,7 @@ parse_setcs( } #else /* not (REFCLOCK && CLOCK_PARSE) */ -int parse_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE) */ /* diff --git a/contrib/ntp/libparse/parse_conf.c b/contrib/ntp/libparse/parse_conf.c index 37871c9de887..ad7a47aa937f 100644 --- a/contrib/ntp/libparse/parse_conf.c +++ b/contrib/ntp/libparse/parse_conf.c @@ -148,7 +148,7 @@ clockformat_t *clockformats[] = unsigned short nformats = sizeof(clockformats) / sizeof(clockformats[0]) - 1; #else /* not (REFCLOCK && CLOCK_PARSE) */ -int parse_conf_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE) */ /* diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in index 5b92df6c0906..57a7d30143fa 100644 --- a/contrib/ntp/ntpd/Makefile.in +++ b/contrib/ntp/ntpd/Makefile.in @@ -97,6 +97,7 @@ build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = check_y2k$(EXEEXT) keyword-gen$(EXEEXT) ntpd$(EXEEXT) \ ntpdsim$(EXEEXT) +@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp subdir = ntpd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \ @@ -551,6 +552,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -688,8 +690,8 @@ B_S_DIST = \ $(NULL) BUILT_SOURCES = $(VPHACK) $(LIBPARSE) ntp_parser.c ntp_parser.h \ - $(VPHACK_AFTER) $(B_S_DIST) $(NULL) check-libopts check-libntp \ - .deps-ver + $(VPHACK_AFTER) $(B_S_DIST) $(NULL) check-libopts \ + $(am__append_1) .deps-ver man1_MANS = man5_MANS = ntp.conf.5 ntp.keys.5 man8_MANS = @@ -708,7 +710,7 @@ CLEANFILES = check-psl0 check-psl1 check-psl2 check-pslsaveconfig \ psl0save.conf psl0save.conf+ psl1save.conf psl1save.conf+ \ psl2save.conf psl2save.conf+ .version version.c ntpd-version.c \ sim-version.c $(EXTRA_PROGRAMS) $(NULL) check-libopts \ - check-libntp .deps-ver + .deps-ver EXTRA_DIST = \ complete.conf.in \ invoke-ntp.conf.menu \ @@ -2124,18 +2126,16 @@ check-libopts: ../sntp/libopts/libopts.la ../sntp/libopts/libopts.la: -cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la -check-libntp: $(top_builddir)/libntp/libntp.a - @: avoid default SCCS get by some make implementations +.PHONY: check-libntp -$(top_builddir)/libntp/libntp.a: - cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a +@LIBNTP_SUBMAKES_TRUE@check-libntp: +@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a $(top_srcdir)/sntp/scm-rev: FRC.scm-rev $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev +.PHONY: FRC.scm-rev FRC.scm-rev: - @: FRC.scm-rev "force" depends on nothing and is not a file, so is \ - always out-of-date causing targets which depend on it to also \ - be outdated so their rules to fire each time they are built. + @: FRC.scm-rev is always out of date, triggering the check every make invocation. $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver @[ -f $@ ] || \ cp $(top_srcdir)/deps-ver $@ diff --git a/contrib/ntp/ntpd/cmd_args.c b/contrib/ntp/ntpd/cmd_args.c index aa461cb4dbe6..a604feb00b54 100644 --- a/contrib/ntp/ntpd/cmd_args.c +++ b/contrib/ntp/ntpd/cmd_args.c @@ -178,16 +178,14 @@ getCmdOpts( if (HAVE_OPT( UPDATEINTERVAL )) { long val = OPT_VALUE_UPDATEINTERVAL; + const char errfmt[] = + "-U/--updateinterval %ld must be >= 0\n"; - if (val >= 0) - interface_interval = val; - else { - fprintf(stderr, - "command line interface update interval %ld must not be negative\n", - val); - msyslog(LOG_ERR, - "command line interface update interval %ld must not be negative", - val); + if (val >= 0) { + endpt_scan_period = val; + } else { + fprintf(stderr, errfmt, val); + msyslog(LOG_ERR, errfmt, val); errflg++; } } diff --git a/contrib/ntp/ntpd/complete.conf.in b/contrib/ntp/ntpd/complete.conf.in index 77b619773fbf..adda4e4fa921 100644 --- a/contrib/ntp/ntpd/complete.conf.in +++ b/contrib/ntp/ntpd/complete.conf.in @@ -33,40 +33,45 @@ tinker allan 1500 dispersion 15 freq 0 huffpuff 7200 panic 1000 step 0.128 stepo broadcastclient server 127.127.1.0 mode 4294967295 prefer true fudge 127.127.1.0 time1 0 time2 1.1 stratum 7 refid Abcd minjitter 0.2 -pool 0.north-america.pool.ntp.org. iburst preempt -server 1.north-america.pool.ntp.org. iburst -server -4 2.north-america.pool.ntp.org. minpoll 6 maxpoll 10 iburst -server -6 ntp.davehart.net. minpoll 6 maxpoll 10 version 5 burst iburst -peer -6 davehart.broker.freenet6.net. ident "autokey-group" xleave autokey -peer -4 192.168.192.168 key 1 noselect +pool 2.ubuntu.pool.ntp.org. iburst preempt +pool 2.freebsd.pool.ntp.org. iburst +server -6 2.debian.pool.ntp.org. minpoll 6 maxpoll 10 iburst +server -4 ntp.davehart.net. minpoll 6 maxpoll 10 version 5 burst iburst +peer -6 ntp.md. ident "autokey-group" xleave autokey +peer -4 198.51.100.123 key 1 noselect server [fe80::123%1] xmtnonce -broadcast 192.168.192.255 -manycastclient 224.0.1.1 -manycastclient ff05::101 +broadcast 192.0.2.255 +manycastclient 224.0.1.1 key 14 iburst +manycastclient ff05::101 maxpoll 6 key 1 manycastserver 224.0.1.1 ff05::101 multicastclient 224.0.1.1 ff05::101 mru maxage 64 mindepth 600 initalloc 600 initmem 16 incalloc 99 incmem 4 maxdepth 1024 maxmem 4096 discard minimum 1 average 3 monitor 3000 pollskewlist 3 1|2 4 3|4 default 6|7 -restrict default ippeerlimit -1 -restrict default ippeerlimit 0 nomodify limited kod noserve nomrulist +restrict default +restrict default ippeerlimit 0 nomodify limited kod nopeer noserve nomrulist restrict source ippeerlimit 1 restrict source ippeerlimit 2 nomodify limited kod -restrict trusted.host.name.example.com. ippeerlimit -1 nomodify -restrict [fe80::1] mask [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff] ippeerlimit -1 -restrict 127.0.0.1 mask 255.255.255.255 ippeerlimit -1 -restrict 127.0.0.2 ippeerlimit -1 serverresponse fuzz -restrict ::1 ippeerlimit -1 +restrict trusted.host.name.example.com. nomodify +delrestrict trusted.host.name.example.com. +restrict 192.0.2.66 epeer flake lowpriotrap mssntp noepeer noquery notrap notrust ntpport version +delrestrict source 192.0.2.123 +delrestrict source [2001:db8::123] +restrict fe80::1 +restrict 127.0.0.1 +restrict ::1 +restrict 198.51.100.123 serverresponse fuzz +restrict fec0:: mask [ffff::] ignore interface drop ipv6 interface ignore ipv4 interface drop wildcard interface listen eth0 interface listen ipv6 -interface listen 192.168.192.0/24 -interface listen 192.168.193.1 +interface listen 203.0.113.0/24 +interface listen 192.0.2.123 phone "ATDT13034944774" "ATDT12027621594" setvar varnondef = "this variable does not have default after the value" setvar vanity = "name plate" default trap 127.0.0.1 interface 127.0.0.1 port 1234 -trap 127.0.0.2 +trap 192.0.2.2 reset allpeers auth ctl io mem sys timer diff --git a/contrib/ntp/ntpd/invoke-ntp.conf.texi b/contrib/ntp/ntpd/invoke-ntp.conf.texi index 86a039ea6f49..1f232a313f57 100644 --- a/contrib/ntp/ntpd/invoke-ntp.conf.texi +++ b/contrib/ntp/ntpd/invoke-ntp.conf.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi) # -# It has been AutoGen-ed June 6, 2023 at 04:37:38 AM by AutoGen 5.18.16 +# It has been AutoGen-ed May 25, 2024 at 12:03:56 AM by AutoGen 5.18.16 # From the definitions ntp.conf.def # and the template file agtexi-file.tpl @end ignore @@ -251,27 +251,15 @@ include authentication fields encrypted using the autokey scheme described in @ref{Authentication Options}. @item @code{burst} -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -@code{calldelay} -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the @code{server} command and s addresses. @item @code{iburst} When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -@code{calldelay} -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the @code{server} @@ -833,7 +821,7 @@ The argument is the key identifier for a trusted key, where the value can be in the range 1 to 65,535, inclusive. -@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{sign} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]} +@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]} This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature @@ -890,14 +878,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -@item @code{sign} @kbd{file} -Specifies the location of the optional sign key file. -This overrides -the link -@file{ntpkey_sign_}@kbd{hostname} -in the keys directory. -If this file is -not found, the host key is also the sign key. @end table @item @code{keys} @kbd{keyfile} Specifies the complete path and location of the MD5 key file @@ -1477,25 +1457,26 @@ by default the probability of replacing it with an entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. -@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]} +@item @code{restrict} @kbd{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]} The @kbd{address} argument expressed in -dotted-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the @kbd{address} -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +@kbd{mask} +is ignored and an individual host mask is +used for each entry. The @kbd{mask} -argument expressed in dotted-quad form defaults to -@code{255.255.255.255}, -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the @kbd{address} is treated as the address of an individual host. -A default entry (address -@code{0.0.0.0}, -mask -@code{0.0.0.0}) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string @code{default}, @@ -1532,12 +1513,12 @@ and @code{ntpdc(1ntpdcmdoc)} queries. @item @code{kod} -If this flag is set when an access violation occurs, a kiss-o'-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss-o'-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +@code{discard} @code{average} +defaulting to 8s. Otherwise, no response is sent. @item @code{limited} Deny service if the packet spacing violates the lower limits specified in the @@ -1627,15 +1608,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies @code{ntpport} -and -@code{non-ntpport} -may -be specified. +and the other does not. The @code{ntpport} -is considered more specific and +entry is considered more specific and is sorted later in the list. @item @code{serverresponse fuzz} When reponding to server requests, @@ -1647,12 +1626,28 @@ Deny packets that do not match the current NTP version. Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +@code{manycastclient} +when +@code{manycast} +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +@item @code{delrestrict} @code{[source]} @kbd{address} +Remove a previously-set restriction. This is useful for +runtime configuration via +@code{ntpq(1ntpqmdoc)} +. If +@code{source} +is specified, a dynamic restriction created from the +@code{restrict} @code{source} +template at the time +an association was added is removed. Without +@code{source} +a static restriction is removed. @end table @node Automatic NTP Configuration Options @subsection Automatic NTP Configuration Options @@ -2357,10 +2352,6 @@ Typically (for Ethernet), a number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. -@item @code{calldelay} @kbd{delay} -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. @item @code{driftfile} @kbd{driftfile} This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. diff --git a/contrib/ntp/ntpd/invoke-ntp.keys.texi b/contrib/ntp/ntpd/invoke-ntp.keys.texi index 3926518de3a2..189829f8516d 100644 --- a/contrib/ntp/ntpd/invoke-ntp.keys.texi +++ b/contrib/ntp/ntpd/invoke-ntp.keys.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi) # -# It has been AutoGen-ed June 6, 2023 at 04:37:41 AM by AutoGen 5.18.16 +# It has been AutoGen-ed May 25, 2024 at 12:03:59 AM by AutoGen 5.18.16 # From the definitions ntp.keys.def # and the template file agtexi-file.tpl @end ignore diff --git a/contrib/ntp/ntpd/invoke-ntpd.texi b/contrib/ntp/ntpd/invoke-ntpd.texi index 471bca5b86c8..ae05d92be524 100644 --- a/contrib/ntp/ntpd/invoke-ntpd.texi +++ b/contrib/ntp/ntpd/invoke-ntpd.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi) # -# It has been AutoGen-ed June 6, 2023 at 04:37:42 AM by AutoGen 5.18.16 +# It has been AutoGen-ed May 25, 2024 at 12:04:00 AM by AutoGen 5.18.16 # From the definitions ntpd-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -142,7 +142,7 @@ with a status code of 0. @exampleindent 0 @example -ntpd - NTP daemon program - Ver. 4.2.8p17 +ntpd - NTP daemon program - Ver. 4.2.8p18 Usage: ntpd [ - [] | --[@{=| @}] ]... \ [ ... ] Flg Arg Option-Name Description diff --git a/contrib/ntp/ntpd/keyword-gen-utd b/contrib/ntp/ntpd/keyword-gen-utd index 0eb94005b839..60bc132ce064 100644 --- a/contrib/ntp/ntpd/keyword-gen-utd +++ b/contrib/ntp/ntpd/keyword-gen-utd @@ -1 +1 @@ - * Generated 2022-03-27 14:17:11 UTC diff_ignore_line + * Generated 2023-09-25 05:34:02 UTC diff_ignore_line diff --git a/contrib/ntp/ntpd/keyword-gen.c b/contrib/ntp/ntpd/keyword-gen.c index 104d95e8b3e1..014227a2ba08 100644 --- a/contrib/ntp/ntpd/keyword-gen.c +++ b/contrib/ntp/ntpd/keyword-gen.c @@ -23,7 +23,6 @@ #include #include -#include #include "ntp_scanner.h" #include "ntp_parser.h" @@ -45,6 +44,7 @@ struct key_tok ntp_keywords[] = { { "broadcastdelay", T_Broadcastdelay, FOLLBY_TOKEN }, { "checkhash", T_Checkhash, FOLLBY_TOKEN }, { "ctl", T_Ctl, FOLLBY_TOKEN }, +{ "delrestrict", T_Delrestrict, FOLLBY_TOKEN }, { "device", T_Device, FOLLBY_STRING }, { "disable", T_Disable, FOLLBY_TOKEN }, { "driftfile", T_Driftfile, FOLLBY_STRING }, diff --git a/contrib/ntp/ntpd/ntp.conf.5man b/contrib/ntp/ntpd/ntp.conf.5man index 4e7a47ab83ef..d5a82190c0b0 100644 --- a/contrib/ntp/ntpd/ntp.conf.5man +++ b/contrib/ntp/ntpd/ntp.conf.5man @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntp.conf 5man "06 Jun 2023" "4.2.8p17" "File Formats" +.TH ntp.conf 5man "25 May 2024" "4.2.8p18" "File Formats" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:45 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:04:03 AM by AutoGen 5.18.16 .\" From the definitions ntp.conf.def .\" and the template file agman-cmd.tpl .SH NAME @@ -291,28 +291,16 @@ described in \fIAuthentication\f[] \fIOptions\f[]. .TP 7 .NOP \f\*[B-Font]burst\f[] -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -\f\*[B-Font]calldelay\f[] -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the \f\*[B-Font]server\f[] command and s addresses. .TP 7 .NOP \f\*[B-Font]iburst\f[] When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -\f\*[B-Font]calldelay\f[] -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the \f\*[B-Font]server\f[] @@ -938,7 +926,7 @@ argument is the key identifier for a trusted key, where the value can be in the range 1 to 65,535, inclusive. .TP 7 -.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]] +.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]] This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature @@ -1003,15 +991,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -.TP 7 -.NOP \f\*[B-Font]sign\f[] \f\*[I-Font]file\f[] -Specifies the location of the optional sign key file. -This overrides -the link -\fIntpkey_sign_\f[]\f\*[I-Font]hostname\f[] -in the keys directory. -If this file is -not found, the host key is also the sign key. .RE .TP 7 .NOP \f\*[B-Font]keys\f[] \f\*[I-Font]keyfile\f[] @@ -1679,25 +1658,26 @@ entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. .TP 7 -.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]] +.NOP \f\*[B-Font]restrict\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]] The \f\*[I-Font]address\f[] argument expressed in -dotted-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the \f\*[I-Font]address\f[] -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +\f\*[I-Font]mask\f[] +is ignored and an individual host mask is +used for each entry. The \f\*[I-Font]mask\f[] -argument expressed in dotted-quad form defaults to -\f\*[B-Font]255.255.255.255\f[], -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the \f\*[I-Font]address\f[] is treated as the address of an individual host. -A default entry (address -\f\*[B-Font]0.0.0.0\f[], -mask -\f\*[B-Font]0.0.0.0\f[]) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string \f\*[B-Font]default\f[], @@ -1736,12 +1716,12 @@ and queries. .TP 7 .NOP \f\*[B-Font]kod\f[] -If this flag is set when an access violation occurs, a kiss-o'-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss-o'-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +\f\*[B-Font]discard\f[] \f\*[B-Font]average\f[] +defaulting to 8s. Otherwise, no response is sent. .TP 7 .NOP \f\*[B-Font]limited\f[] Deny service if the packet spacing violates the lower limits specified @@ -1841,15 +1821,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies \f\*[B-Font]ntpport\f[] -and -\f\*[B-Font]non-ntpport\f[] -may -be specified. +and the other does not. The \f\*[B-Font]ntpport\f[] -is considered more specific and +entry is considered more specific and is sorted later in the list. .TP 7 .NOP \f\*[B-Font]serverresponse fuzz\f[] @@ -1865,12 +1843,29 @@ Deny packets that do not match the current NTP version. Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +\f\*[B-Font]manycastclient\f[] +when +\f\*[B-Font]manycast\f[] +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +.TP 7 +.NOP \f\*[B-Font]delrestrict\f[] [source] \f\*[I-Font]address\f[] +Remove a previously-set restriction. This is useful for +runtime configuration via +\fCntpq\f[]\fR(1ntpqmdoc)\f[] +. If +\f\*[B-Font]source\f[] +is specified, a dynamic restriction created from the +\f\*[B-Font]restrict\f[] \f\*[B-Font]source\f[] +template at the time +an association was added is removed. Without +\f\*[B-Font]source\f[] +a static restriction is removed. .PP .SH Automatic NTP Configuration Options .SS Manycasting @@ -2635,11 +2630,6 @@ number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. .TP 7 -.NOP \f\*[B-Font]calldelay\f[] \f\*[I-Font]delay\f[] -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. -.TP 7 .NOP \f\*[B-Font]driftfile\f[] \f\*[I-Font]driftfile\f[] This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. @@ -3461,7 +3451,7 @@ RFC5905 .SH "AUTHORS" The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, . .SH BUGS The syntax checking is not picky; some combinations of diff --git a/contrib/ntp/ntpd/ntp.conf.5mdoc b/contrib/ntp/ntpd/ntp.conf.5mdoc index 951f33da4faa..b950e92cdeb9 100644 --- a/contrib/ntp/ntpd/ntp.conf.5mdoc +++ b/contrib/ntp/ntpd/ntp.conf.5mdoc @@ -1,9 +1,9 @@ -.Dd June 6 2023 +.Dd May 25 2024 .Dt NTP_CONF 5mdoc File Formats .Os .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:32 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:03:50 AM by AutoGen 5.18.16 .\" From the definitions ntp.conf.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -294,27 +294,15 @@ include authentication fields encrypted using the autokey scheme described in .Sx Authentication Options . .It Cm burst -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the .Ic server command and s addresses. .It Cm iburst When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the .Ic server @@ -889,7 +877,6 @@ range 1 to 65,535, inclusive. .Op Cm leap Ar file .Op Cm randfile Ar file .Op Cm host Ar file -.Op Cm sign Ar file .Op Cm gq Ar file .Op Cm gqpar Ar file .Op Cm iffpar Ar file @@ -952,14 +939,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -.It Cm sign Ar file -Specifies the location of the optional sign key file. -This overrides -the link -.Pa ntpkey_sign_ Ns Ar hostname -in the keys directory. -If this file is -not found, the host key is also the sign key. .El .It Ic keys Ar keyfile Specifies the complete path and location of the MD5 key file @@ -1546,7 +1525,8 @@ by default the probability of replacing it with an entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. -.It Xo Ic restrict address +.It Xo Ic restrict +.Ar address .Op Cm mask Ar mask .Op Cm ippeerlimit Ar int .Op Ar flag ... @@ -1554,21 +1534,22 @@ than 3000 seconds old, the probability is 100%. The .Ar address argument expressed in -dotted\-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the .Ar address -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +.Ar mask +is ignored and an individual host mask is +used for each entry. The .Ar mask -argument expressed in dotted\-quad form defaults to -.Cm 255.255.255.255 , -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the .Ar address is treated as the address of an individual host. -A default entry (address -.Cm 0.0.0.0 , -mask -.Cm 0.0.0.0 ) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string .Cm default , @@ -1605,12 +1586,12 @@ and .Xr ntpdc 1ntpdcmdoc queries. .It Cm kod -If this flag is set when an access violation occurs, a kiss\-o'\-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss\-o'\-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +.Cm discard average +defaulting to 8s. Otherwise, no response is sent. .It Cm limited Deny service if the packet spacing violates the lower limits specified in the @@ -1700,15 +1681,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies .Cm ntpport -and -.Cm non\-ntpport -may -be specified. +and the other does not. The .Cm ntpport -is considered more specific and +entry is considered more specific and is sorted later in the list. .It Ic "serverresponse fuzz" When reponding to server requests, @@ -1720,12 +1699,31 @@ Deny packets that do not match the current NTP version. .Pp Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +.Cm manycastclient +when +.Cm manycast +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +.It Xo Ic delrestrict +.Op source +.Ar address +.Xc +Remove a previously\-set restriction. This is useful for +runtime configuration via +.Xr ntpq 1ntpqmdoc +. If +.Cm source +is specified, a dynamic restriction created from the +.Cm restrict source +template at the time +an association was added is removed. Without +.Cm source +a static restriction is removed. .El .Sh Automatic NTP Configuration Options .Ss Manycasting @@ -2462,10 +2460,6 @@ Typically (for Ethernet), a number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. -.It Ic calldelay Ar delay -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. .It Ic driftfile Ar driftfile This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. @@ -3302,7 +3296,7 @@ A snapshot of this documentation is available in HTML format in .Sh "AUTHORS" The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, . .Sh BUGS The syntax checking is not picky; some combinations of diff --git a/contrib/ntp/ntpd/ntp.conf.def b/contrib/ntp/ntpd/ntp.conf.def index 03dd8b808099..444e3b35e351 100644 --- a/contrib/ntp/ntpd/ntp.conf.def +++ b/contrib/ntp/ntpd/ntp.conf.def @@ -296,27 +296,15 @@ include authentication fields encrypted using the autokey scheme described in .Sx Authentication Options . .It Cm burst -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the .Ic server command and s addresses. .It Cm iburst When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the .Ic server @@ -892,7 +880,6 @@ range 1 to 65,535, inclusive. .Op Cm leap Ar file .Op Cm randfile Ar file .Op Cm host Ar file -.Op Cm sign Ar file .Op Cm gq Ar file .Op Cm gqpar Ar file .Op Cm iffpar Ar file @@ -955,14 +942,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -.It Cm sign Ar file -Specifies the location of the optional sign key file. -This overrides -the link -.Pa ntpkey_sign_ Ns Ar hostname -in the keys directory. -If this file is -not found, the host key is also the sign key. .El .It Ic keys Ar keyfile Specifies the complete path and location of the MD5 key file @@ -1549,7 +1528,8 @@ by default the probability of replacing it with an entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. -.It Xo Ic restrict address +.It Xo Ic restrict +.Ar address .Op Cm mask Ar mask .Op Cm ippeerlimit Ar int .Op Ar flag ... @@ -1557,21 +1537,22 @@ than 3000 seconds old, the probability is 100%. The .Ar address argument expressed in -dotted-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the .Ar address -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +.Ar mask +is ignored and an individual host mask is +used for each entry. The .Ar mask -argument expressed in dotted-quad form defaults to -.Cm 255.255.255.255 , -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the .Ar address is treated as the address of an individual host. -A default entry (address -.Cm 0.0.0.0 , -mask -.Cm 0.0.0.0 ) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string .Cm default , @@ -1608,12 +1589,12 @@ and .Xr ntpdc 1ntpdcmdoc queries. .It Cm kod -If this flag is set when an access violation occurs, a kiss-o'-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss-o'-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +.Cm discard average +defaulting to 8s. Otherwise, no response is sent. .It Cm limited Deny service if the packet spacing violates the lower limits specified in the @@ -1703,15 +1684,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies .Cm ntpport -and -.Cm non-ntpport -may -be specified. +and the other does not. The .Cm ntpport -is considered more specific and +entry is considered more specific and is sorted later in the list. .It Ic "serverresponse fuzz" When reponding to server requests, @@ -1723,12 +1702,31 @@ Deny packets that do not match the current NTP version. .Pp Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +.Cm manycastclient +when +.Cm manycast +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +.It Xo Ic delrestrict +.Op source +.Ar address +.Xc +Remove a previously-set restriction. This is useful for +runtime configuration via +.Xr ntpq 1ntpqmdoc +. If +.Cm source +is specified, a dynamic restriction created from the +.Cm restrict source +template at the time +an association was added is removed. Without +.Cm source +a static restriction is removed. .El .Sh Automatic NTP Configuration Options .Ss Manycasting @@ -2465,10 +2463,6 @@ Typically (for Ethernet), a number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. -.It Ic calldelay Ar delay -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. .It Ic driftfile Ar driftfile This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. diff --git a/contrib/ntp/ntpd/ntp.conf.html b/contrib/ntp/ntpd/ntp.conf.html index f7f0b4bef931..ea82c6783a4b 100644 --- a/contrib/ntp/ntpd/ntp.conf.html +++ b/contrib/ntp/ntpd/ntp.conf.html @@ -50,7 +50,7 @@ Next: