From: Harlan Stenn Date: Tue, 29 Aug 2023 07:31:13 +0000 (-0700) Subject: Merge ntp-testbuild.tal1.ntfo.org:/home/nfs1.chi1/hart/ntp-stable-3859 X-Git-Tag: NTP_4_2_8P18_RC1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08323c6385b24fb34d5068060b0ca08c8cd10014;p=thirdparty%2Fntp.git Merge ntp-testbuild.tal1.ntfo.org:/home/nfs1.chi1/hart/ntp-stable-3859 into ntp-testbuild.tal1.ntfo.org:/home/nfs1.tal1/harlan/ntp/ntp-stable-3854 bk: 64ed9ec1cPrabk8fAkplPyf5zvUBAw --- 08323c6385b24fb34d5068060b0ca08c8cd10014 diff --cc ChangeLog index 3445452f3,2ef9d7d00..e7c8fc7d9 --- a/ChangeLog +++ b/ChangeLog @@@ -1,12 -1,6 +1,13 @@@ --- + * [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. +* [Bug 3856] Enable Edit & Continue debugging with Visual Studio. + +* [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. diff --cc libntp/lib_strbuf.c index e0c20e122,917bb0d73..69df900ba --- a/libntp/lib_strbuf.c +++ b/libntp/lib_strbuf.c @@@ -11,6 -11,7 +11,9 @@@ #include "ntp_fp.h" #include "ntp_stdlib.h" ++#include "lib_strbuf.h" ++ + /* * Storage declarations */ diff --cc ntpd/ntp_timer.c index 1e29cdace,c684f79d7..17c1024ca --- a/ntpd/ntp_timer.c +++ b/ntpd/ntp_timer.c @@@ -296,10 -296,10 +296,10 @@@ intres_timeout_req void timer(void) { - struct peer * p; - struct peer * next_peer; + struct peer* p; + struct peer* next_peer; l_fp now; - time_t tnow; + time_t tnow; /* * The basic timerevent is one second. This is used to adjust the @@@ -379,12 -381,10 +382,10 @@@ } sys_stratum = STRATUM_UNSPEC; } - if (sys_stratum > 1) { + if (sys_stratum > 1) sys_refid = htonl(LOOPBACKADR); - } - else { - memcpy(&sys_refid, "ORPH", min(4, sizeof(sys_refid))); - } + else - memcpy(&sys_refid, "LOOP", 4); ++ memcpy(&sys_refid, "ORPH", 4); sys_offset = 0; sys_rootdelay = 0; sys_rootdisp = 0; @@@ -398,18 -398,15 +399,17 @@@ * is imminent or every 8th second. */ if (leapsec > LSPROX_NOWARN || 0 == (current_time & 7)) -- check_leapsec(now.l_ui, &tnow, - (sys_leap == LEAP_NOTINSYNC)); - (sys_leap == LEAP_NOTINSYNC)); ++ check_leapsec( now.l_ui ++ , &tnow ++ , (sys_leap == LEAP_NOTINSYNC)); if (sys_leap != LEAP_NOTINSYNC) { if (leapsec >= LSPROX_ANNOUNCE && leapdif) { - if (leapdif > 0) + if (leapdif > 0) { set_sys_leap(LEAP_ADDSECOND); - } - else { - else ++ } else { set_sys_leap(LEAP_DELSECOND); + } - } - else { + } else { set_sys_leap(LEAP_NOWARNING); } } @@@ -442,12 -439,15 +442,17 @@@ #endif /* AUTOKEY */ /* - * Interface update timer + * Network interface rescan timer */ - if (interface_interval && interface_timer <= current_time) { - timer_interfacetimeout(current_time + - interface_interval); - DPRINTF(2, ("timer: interface update\n")); + if (endpt_scan_timer && endpt_scan_timer <= current_time) { + if (no_periodic_scan) { + endpt_scan_timer = 0; ++ DPRINTF(2, ("timer: network interface rescan disabled\n")); + } else { + endpt_scan_timer = current_time + + endpt_scan_period; ++ DPRINTF(2, ("timer: network interface rescan in %d seconds\n", endpt_scan_period)); + } interface_update(NULL, NULL); }