]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2849] Systems with more than one default route may never synchronize. Brian...
authorHarlan Stenn <stenn@ntp.org>
Mon, 20 Jul 2015 07:20:04 +0000 (07:20 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 20 Jul 2015 07:20:04 +0000 (07:20 +0000)
bk: 55aca124TS5c5NXoYSxUXesjhKqJbw

ChangeLog
ntpd/ntp_peer.c

index 3f19b77b6803c6e259a5febf774d7351b36a62c2..17780ebdf19b3a0dedba94d78c13481ee3bb60ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 ---
 
 * [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
index 448441715e5c0262a4c377edceb1827fe8e32d28..b4766c032f3f6791fac3144242cef95c37e68b24 100644 (file)
@@ -718,9 +718,13 @@ refresh_all_peerinterfaces(void)
        /*
         * this is called when the interface list has changed
         * give all peers a chance to find a better interface
+        * but only if either they don't have an address already
+        * or if the one they have hasn't worked for a while.
         */
-       for (p = peer_list; p != NULL; p = p->p_link)
-               peer_refresh_interface(p);
+       for (p = peer_list; p != NULL; p = p->p_link) {
+               if (!(p->dstadr && (p->reach & 0x3)))   // Bug 2849 XOR 2043
+                       peer_refresh_interface(p);
+       }
 }