]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Merge ntp-testbuild.tal1.ntfo.org:/home/nfs1.chi1/hart/ntp-stable-3859
authorHarlan Stenn <stenn@ntp.org>
Tue, 29 Aug 2023 07:31:13 +0000 (00:31 -0700)
committerHarlan Stenn <stenn@ntp.org>
Tue, 29 Aug 2023 07:31:13 +0000 (00:31 -0700)
into  ntp-testbuild.tal1.ntfo.org:/home/nfs1.tal1/harlan/ntp/ntp-stable-3854

bk: 64ed9ec1cPrabk8fAkplPyf5zvUBAw

1  2 
ChangeLog
include/ntp_net.h
include/ntp_stdlib.h
libntp/lib_strbuf.c
libntp/numtoa.c
ntpd/ntp_proto.c
ntpd/ntp_timer.c

diff --cc ChangeLog
index 3445452f3c864e5043e6618b143aad64a28c2d52,2ef9d7d009788236084262d1f5e0bb4c3feb5b83..e7c8fc7d97450f0e8b1aefd3452d71a7515564da
+++ b/ChangeLog
@@@ -1,12 -1,6 +1,13 @@@
  ---
  
+ * [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. <hart@ntp.org>
 +* [Bug 3856] Enable Edit & Continue debugging with Visual Studio.
 +             <hart@ntp.org>
 +* [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid.
 +             <hart@ntp.org>
 +* [Bug 3853] Clean up warnings with modern compilers. <hart@ntp.org>
 +* [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as
 +             intended. <hart@ntp.org>
  * [Bug 3851] Drop pool server when no local address can reach it.
               <hart@ntp.org>
  * [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid.
Simple merge
Simple merge
index e0c20e1221e7ce63a41f5354e884663c0d774a80,917bb0d734464a4a59067e334e7189c38076aca5..69df900bae70ab5b61e271e5f25e026b04580f62
@@@ -11,6 -11,7 +11,9 @@@
  #include "ntp_fp.h"
  #include "ntp_stdlib.h"
  
++#include "lib_strbuf.h"
++
  /*
   * Storage declarations
   */
diff --cc libntp/numtoa.c
Simple merge
Simple merge
index 1e29cdace66563e77ffd5db5355460a55fbf18fa,c684f79d7834c5be6ebb8f0ed1412be958ce4fa8..17c1024ca4d4f164fe8124623df4f04edc4c2a13
@@@ -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
                        }
                        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;
         * 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);
                }
        }
  #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);
        }