From: Dave Hart Date: Tue, 11 May 2010 05:06:04 +0000 (+0000) Subject: Merge shiny.ad.hartbrothers.com:C:/ntp/ntp-stable-1325-1459 X-Git-Tag: NTP_4_2_7P31~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61f2d45ddc09a40870d756b947eea052acc74777;p=thirdparty%2Fntp.git Merge shiny.ad.hartbrothers.com:C:/ntp/ntp-stable-1325-1459 into shiny.ad.hartbrothers.com:C:/ntp/ntp-dev-1325-1459 bk: 4be8e5bcBpp4FrUp2bUr7EXp8dqpEQ --- 61f2d45ddc09a40870d756b947eea052acc74777 diff --cc ChangeLog index cf10ca1b4,3aa579d04..c780563a9 --- a/ChangeLog +++ b/ChangeLog @@@ -1,251 -1,7 +1,265 @@@ ++* [Bug 1325] from 4.2.6p2-RC3: unreachable code sntp recv_bcst_data(). ++* [Bug 1459] from 4.2.6p2-RC3: sntp MD5 authentication does not work ++ with ntpd. ++* [Bug 1541] from 4.2.6p2-RC3: Fix wrong keyword for "maxclock". ++* [Bug 1552] from 4.2.6p2-RC3: update and complete broadcast and crypto ++ features in sntp. ++* [Bug 1553] from 4.2.6p2-RC3: sntp/configure.ac OpenSSL support. ++* from 4.2.6p2-RC3: Escape unprintable characters in a refid in ntpq -p ++ billboard. ++* from 4.2.6p2-RC3: Simplify hash client code by providing OpenSSL ++ EVP_*() API when built without OpenSSL. (already in 4.2.7) ++* from 4.2.6p2-RC3: Do not depend on ASCII in sntp. +(4.2.7p30) 2010/05/06 Released by Harlan Stenn +* [Bug 1526] ntpd DNS pipe read EINTR with no network at startup. +* Update the ChangeLog entries when merging items from -stable. +(4.2.7p29) 2010/05/04 Released by Harlan Stenn +* [Bug 1542] ntpd mrulist response may have incorrect last.older. +* [Bug 1543] ntpq mrulist must refresh nonce when retrying. +* [Bug 1544] ntpq mrulist sscanf timestamp format mismatch on 64-bit. +* Windows compiling hints/winnt.html update from Sunil Tej S. +(4.2.7p28) 2010/05/03 Released by Harlan Stenn +* [Bug 1512] from 4.2.6p2-RC3: ntpsnmpd should connect to net-snmpd + via a unix-domain socket by default. + Provide a command-line 'socket name' option. +* [Bug 1538] from 4.2.6p2-RC3: update refclock_nmea.c's call to + getprotobyname(). +* [Bug 1541] from 4.2.6p2-RC3: Fix wrong keyword for "maxclock". +(4.2.7p27) 2010/04/27 Released by Harlan Stenn +(4.2.7p26) 2010/04/24 Released by Harlan Stenn +* [Bug 1465] from 4.2.6p2-RC2: Make sure time from TS2100 is not + invalid (backport from -dev). +* [Bug 1528] from 4.2.6p2-RC2: Fix EDITLINE_LIBS link order for ntpq + and ntpdc. +* [Bug 1531] Require nonce with mrulist requests. +* [Bug 1532] Remove ntpd support for ntpdc's monlist in favor of ntpq's +mrulist. +* [Bug 1534] from 4.2.6p2-RC2: conflicts with VC++ 2010 errno.h. +* [Bug 1535] from 4.2.6p2-RC2: "restrict -4 default" and "restrict + -6 default" ignored. +(4.2.7p25) 2010/04/20 Released by Harlan Stenn +* [Bug 1528] from 4.2.6p2-RC2: Remove --with-arlib from br-flock. +* [Bug 1503] [Bug 1504] [Bug 1518] [Bug 1522] from 4.2.6p2-RC2: + all of which were fixed in 4.2.7 previously. +(4.2.7p24) 2010/04/13 Released by Harlan Stenn +* [Bug 1390] Control PPS on the Oncore M12. +* [Bug 1518] Windows ntpd should lock to one processor more + conservatively. +* [Bug 1520] '%u' formats for size_t gives warnings with 64-bit builds. +* [Bug 1522] Enable range syntax "trustedkey (301 ... 399)". +* Documentation updates for 4.2.7p22 changes and additions, updating + ntpdc.html, ntpq.html, accopt.html, confopt.html, manyopt.html, + miscopt.html, and miscopt.txt. +* accopt.html: non-ntpport doc changes from Dave Mills. +* Modify full MRU list preemption when full to match "discard monitor" + documentation, by removing exception for count == 1. +(4.2.7p23) 2010/04/04 Released by Harlan Stenn +* [Bug 1516] unpeer by IP address fails, DNS name works. +* [Bug 1517] ntpq and ntpdc should verify reverse DNS before use. + ntpq and ntpdc now use the following format for showing purported + DNS names from IP address "reverse" DNS lookups when the DNS name + does not exist or does not include the original IP address among + the results: "192.168.1.2 (fake.dns.local)". +(4.2.7p22) 2010/04/02 Released by Harlan Stenn +* [Bug 1432] Don't set inheritable flag for linux capabilities. +* [Bug 1465] Make sure time from TS2100 is not invalid. +* [Bug 1483] AI_NUMERICSERV undefined in 4.2.7p20. +* [Bug 1497] fudge is broken by getnetnum() change. +* [Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong. +* [Bug 1504] ntpdate tickles ntpd "discard minimum 1" rate limit if + "restrict ... limited" is used. +* ntpdate: stop querying source after KoD packet response, log it. +* ntpdate: rate limit each server to 2s between packets. +* From J. N. Perlinger: avoid pointer wraparound warnings in dolfptoa(), + printf format mismatches with 64-bit size_t. +* Broadcast client (ephemeral) associations should be demobilized only + if they are not heard from for 10 consecutive polls, regardless of + surviving the clock selection. Fix from David Mills. +* Add "ntpq -c ifstats" similar to "ntpdc -c ifstats". +* Add "ntpq -c sysstats" similar to "ntpdc -c sysstats". +* Add "ntpq -c monstats" to show monlist knobs and stats. +* Add "ntpq -c mrulist" similar to "ntpdc -c monlist" but not + limited to 600 rows, and with filtering and sorting options: + ntpq -c "mrulist mincount=2 laddr=192.168.1.2 sort=-avgint" + ntpq -c "mrulist sort=addr" + ntpq -c "mrulist mincount=2 sort=count" + ntpq -c "mrulist sort=-lstint" +* Modify internal representation of MRU list to use l_fp fixed-point + NTP timestamps instead of seconds since startup. This increases the + resolution and substantially improves accuracy of sorts involving + timestamps, at the cost of flushing all MRU entries when the clock is + stepped, to ensure the timestamps can be compared with the current + get_systime() results. +* Add ntp.conf "mru" directive to configure MRU parameters, such as + "mru mindepth 600 maxage 64 maxdepth 5000 maxmem 1024" or + "mru initalloc 0 initmem 16 incalloc 99 incmem 4". Several pairs are + equivalent with one in units of MRU entries and its twin in units of + kilobytes of memory, so the last one used in ntp.conf controls: + maxdepth/maxmem, initalloc/initmem, incalloc/incmem. With the above + values, ntpd will preallocate 16kB worth of MRU entries, allocating + 4kB worth each time more are needed, with a hard limit of 1MB of MRU + entries. Until there are more than 600 entries none would be reused. + Then only entries for addresses last seen 64 seconds or longer ago are + reused. +* Limit "ntpdc -c monlist" response in ntpd to 600 entries, the previous + overall limit on the MRU list depth which was driven by the monlist + implementation limit of one request with a single multipacket + response. +* New "pool" directive implementation modeled on manycastclient. +* Do not abort on non-ASCII characters in ntp.conf, ignore them. +* ntpq: increase response reassembly limit from 24 to 32 packets, add + discussion in comment regarding results with even larger MAXFRAGS. +* ntpq: handle "passwd MYPASSWORD" (without prompting) as with ntpdc. +* ntpdc: do not examine argument to "passwd" if not supplied. +* configure: remove check for pointer type used with qsort(), we + require ANSI C which mandates void *. +* Reset sys_kodsent to 0 in proto_clr_stats(). +* Add sptoa()/sockporttoa() similar to stoa()/socktoa() adding :port. +* Use memcpy() instead of memmove() when buffers can not overlap. +* Remove sockaddr_storage from our sockaddr_u union of sockaddr, + sockaddr_in, and sockaddr_in6, shaving about 100 bytes from its size + and substantially decreasing MRU entry memory consumption. +* Extend ntpq readvar (alias rv) to allow fetching up to three named + variables in one operation: ntpq -c "rv 0 version offset frequency". +* ntpq: use srchost variable to show .POOL. prototype associations' + hostname instead of address 0.0.0.0. +* "restrict source ..." configures override restrictions for time + sources, allows tight default restrictions to be used with the pool + directive (where server addresses are not known in advance). +* Ignore "preempt" modifier on manycastclient and pool prototype + associations. The resulting associations are preemptible, but the + prototype must not be. +* Maintain and use linked list of associations (struct peer) in ntpd, + avoiding walking 128 hash table entries to iterate over peers. +* Remove more workarounds unneeded since we require ISO C90 AKA ANSI C: + - remove fallback implementations for memmove(), memset, strstr(). + - do not test for atexit() or memcpy(). +* Collapse a bunch of code duplication in ntpd/ntp_restrict.c added with + support for IPv6. +* Correct some corner case failures in automatically enabling the MRU + list if any "restrict ... limited" is in effect, and in disabling MRU + maintenance. (ntp_monitor.c, ntp_restrict.c) +* Reverse the internal sort order of the address restriction lists, but + preserve the same behavior. This allows removal of special-case code + related to the default restrictions and more straightforward lookups + of restrictions for a given address (now, stop on first match). +* Move ntp_restrict.c MRU doubly-linked list maintenance code into + ntp_lists.h macros, allowing more duplicated source excision. +* Repair ntpdate.c to no longer test HAVE_TIMER_SETTIME. +* Do not reference peer_node/unpeer_node after freeing when built with + --disable-saveconfig and using DNS. +(4.2.7p21) 2010/03/31 Released by Harlan Stenn +* [Bug 1514] from 4.2.6p1-RC6: Typo in ntp_proto.c: fabs(foo < .4) + should be fabs(foo) < .4. +* [Bug 1464] from 4.2.6p1-RC6: synchronization source wrong for + refclocks ARCRON_MSF (27) and SHM (28). +* From 4.2.6p1-RC6: Correct Windows port's refclock_open() to + return 0 on failure not -1. +* From 4.2.6p1-RC6: Correct CHU, dumbclock, and WWVB drivers to + check for 0 returned from refclock_open() on failure. +* From 4.2.6p1-RC6: Correct "SIMUL=4 ./flock-build -1" to + prioritize -1/--one. +* [Bug 1306] constant conditionals in audio_gain(). +(4.2.7p20) 2010/02/13 Released by Harlan Stenn +* [Bug 1483] hostname in ntp.conf "restrict" parameter rejected. +* Use all addresses for each restrict by hostname. +* Use async DNS to resolve trap directive hostnames. +(4.2.7p19) 2010/02/09 Released by Harlan Stenn +* [Bug 1338] Update the association type codes in ntpq.html. +* [Bug 1478] from 4.2.6p1-RC5: linking fails: EVP_MD_pkey_type. +* [Bug 1479] from 4.2.6p1-RC5: not finding readline headers. +* [Bug 1484] from 4.2.6p1-RC5: ushort is not defined in QNX6. +(4.2.7p18) 2010/02/07 Released by Harlan Stenn +* [Bug 1480] from 4.2.6p1-RC5: snprintf() cleanup caused + unterminated refclock IDs. +* Stop using getaddrinfo() to convert numeric address strings to on-wire + addresses in favor of is_ip_address() alone. +(4.2.7p17) 2010/02/05 Released by Harlan Stenn +* [Bug 1477] from 4.2.6p1-RC5: First non-gmake make in clone + w/VPATH can't make COPYRIGHT. +* Attempts to cure CID 108 CID 118 CID 119 TAINTED_SCALAR warnings. +* Broaden ylwrap workaround VPATH_HACK to all non-GNU make. +(4.2.7p16) 2010/02/04 Released by Harlan Stenn +* [Bug 1474] from 4.2.6p1-RC4: ntp_keygen LCRYPTO after libntp.a. +* Include 4.2.6p1-RC4: Remove arlib. +(4.2.7p15) 2010/02/03 Released by Harlan Stenn +* [Bug 1455] from 4.2.6p1: ntpd does not try /etc/ntp.audio. +* Include 4.2.6p1: Convert many sprintf() calls to snprintf(), also + strcpy(), strcat(). +* Include 4.2.6p1: Fix widely cut-n-pasted bug in refclock shutdown + after failed start. +* Include 4.2.6p1: Remove some dead code checking for emalloc() + returning NULL. +(4.2.7p14) 2010/02/02 Released by Harlan Stenn +* [Bug 1338] ntpq displays incorrect association type codes. +* [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build. +* [Bug 1470] from 4.2.6p1: "make distdir" compiles keyword-gen. +* [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family. +* [Bug 1472] CID 116 CID 117 minor warnings in new DNS code. +* [Bug 1473] from 4.2.6p1: "make distcheck" version.m4 error. +(4.2.7p13) 2010/01/31 Released by Harlan Stenn +* [Bug 1467] from 4.2.6p1: Fix bogus rebuild of sntp/sntp.html. +(4.2.7p12) 2010/01/30 Released by Harlan Stenn +* [Bug 1468] 'make install' broken for root on default NFS mount. +(4.2.7p11) 2010/01/28 Released by Harlan Stenn +* [Bug 47] Debugging and logging do not work after a fork. +* [Bug 1010] getaddrinfo() could block and thus should not be called by + the main thread/process. +* New async DNS resolver in ntpd allows nonblocking queries anytime, + instead of only once at startup. +(4.2.7p10) 2010/01/24 Released by Harlan Stenn +* [Bug 1140] from 4.2.6p1-RC5: Clean up debug.html, decode.html, + and ntpq.html. +* Include 4.2.6p1-RC3: Use TZ=UTC instead of TZ= when calling date in + scripts/mkver.in . +* [Bug 1448] from 4.2.6p1-RC3: Some macros not correctly conditionally + or absolutely defined on Windows. +* [Bug 1449] from 4.2.6p1-RC3: ntpsim.h in ntp_config.c should be used + conditionally. +* [Bug 1450] from 4.2.6p1-RC3: Option to exclude warnings not + unconditionally defined on Windows. +(4.2.7p9) 2010/01/13 Released by Harlan Stenn +(4.2.7p8) 2010/01/12 Released by Harlan Stenn +* [Bug 702] ntpd service logic should use libopts to examine cmdline. +* [Bug 1451] from 4.2.6p1-RC3: sntp leaks KoD entry updating. +* [Bug 1453] from 4.2.6p1-RC3: Use $CC in config.cache filename. +(4.2.7p7) 2009/12/30 Released by Harlan Stenn +* [Bug 620] ntpdc getresponse() esize != *rsize s/b size != *rsize. +* [Bug 1446] 4.2.7p6 requires autogen, missing ntpd.1, *.texi, *.menu. +(4.2.7p6) 2009/12/28 Released by Harlan Stenn +* [Bug 1443] Remove unnecessary dependencies on ntp_io.h +* [Bug 1442] Move Windows functions into libntp files +* [Bug 1127] from 4.2.6p1-RC3: Check the return of X590_verify(). +* [Bug 1439] from 4.2.6p1-RC3: .texi gen after binary is linked. +* [Bug 1440] from 4.2.6p1-RC3: Update configure.ac to support kfreebsd. +* [Bug 1445] from 4.2.6p1-RC3: IRIX does not have -lcap or support + linux capabilities. +(4.2.7p5) 2009/12/25 Released by Harlan Stenn +* Include 4.2.6p1-RC2 +(4.2.7p4) 2009/12/24 Released by Harlan Stenn +* [Bug 1429] ntpd -4 option does not reliably force IPv4 resolution. +* [Bug 1431] System headers must come before ntp headers in ntp_intres.c . +(4.2.7p3) 2009/12/22 Released by Harlan Stenn +* [Bug 1426] scripts/VersionName needs . on the search path. +* [Bug 1427] quote missing in ./build - shows up on NetBSD. +* [Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h +(4.2.7p2) 2009/12/20 Released by Harlan Stenn +* [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir. +* [Bug 1421] add util/tg2, a clone of tg that works on Linux, NetBSD, and + FreeBSD +(4.2.7p1) 2009/12/15 Released by Harlan Stenn +* [Bug 1348] ntpd Windows port should wait for sendto() completion. +* [Bug 1413] test OpenSSL headers regarding -Wno-strict-prototypes. +* [Bug 1418] building ntpd/ntpdc/ntpq statically with ssl fails. +(4.2.7p0) 2009/12/13 Released by Harlan Stenn +* [Bug 1412] m4/os_cflags.m4 caches results that depend on $CC. +* [Bug 1414] Enable "make distcheck" success with BSD make. +(4.2.7) 2009/12/09 Released by Harlan Stenn +* [Bug 1407] configure.ac: recent GNU Make -v does not include "version". --- + * [Bug 1325] unreachable code in sntp recv_bcst_data(). + * [Bug 1459] sntp MD5 authentication does not work with ntpd. * [Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option. * [Bug 1538] update refclock_nmea.c's call to getprotobyname(). diff --cc ntpq/ntpq-subs.c index 9777f8cb1,54d2fb633..143d55e85 --- a/ntpq/ntpq-subs.c +++ b/ntpq/ntpq-subs.c @@@ -1576,13 -1431,12 +1576,14 @@@ doprintpeers char *value = NULL; int i; int c; - + int len; sockaddr_u srcadr; sockaddr_u dstadr; + sockaddr_u dum_store; + long hmode = 0; u_long srcport = 0; char *dstadr_refid = "0.0.0.0"; + size_t drlen; u_long stratum = 0; long ppoll = 0; long hpoll = 0; diff --cc ntpq/ntpq.c index 1690aa22a,947ddd9d3..704eb3776 --- a/ntpq/ntpq.c +++ b/ntpq/ntpq.c @@@ -292,9 -293,8 +292,8 @@@ static void warning (const char *, con static void error (const char *, const char *, const char *); static u_long getkeyid (const char *); static void atoascii (const char *, size_t, char *, size_t); - static void makeascii (int, const char *, FILE *); -static void cookedprint (int, int, char *, int, int, FILE *); -static void rawprint (int, int, char *, int, int, FILE *); +static void cookedprint (int, int, const char *, int, int, FILE *); +static void rawprint (int, int, const char *, int, int, FILE *); static void startoutput (void); static void output (FILE *, char *, char *); static void endoutput (FILE *); diff --cc ntpq/ntpq.h index 4910ed6e4,e5ca4edc7..44f598e9e --- a/ntpq/ntpq.h +++ b/ntpq/ntpq.h @@@ -124,8 -89,9 +124,9 @@@ extern int doqueryex (int, associd_t, i extern char * nntohost (sockaddr_u *); extern int decodets (char *, l_fp *); extern int decodeuint (char *, u_long *); -extern int nextvar (int *, char **, char **, char **); +extern int nextvar (int *, const char **, char **, char **); extern int decodetime (char *, l_fp *); -extern void printvars (int, char *, int, int, int, FILE *); +extern void printvars (int, const char *, int, int, int, FILE *); extern int decodeint (char *, long *); extern int findvar (char *, struct ctl_var *, int code); + extern void makeascii (int, const char *, FILE *); diff --cc sntp/crypto.c index dfcb34f99,ce4748091..c90a1ecc6 --- a/sntp/crypto.c +++ b/sntp/crypto.c @@@ -1,5 -1,5 +1,6 @@@ +#include #include "crypto.h" + #include struct key *key_ptr; int key_cnt = 0;