[ntpsec commit] [Bug 2849] Systems with more than one default route may never synchronize.

Eric S. Raymond esr at ntpsec.org
Fri Oct 23 02:59:40 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    d3ebe62597da463071e5122cfe133c8d56028c2b
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=d3ebe62597da463071e5122cfe133c8d56028c2b

Author:    Brian Utterback <blu at jedi.east.sun.com>
Date:      Thu Oct 22 22:26:53 2015 -0400

[Bug 2849] Systems with more than one default route may never synchronize.

Note that this patch might need to be reverted once Bug 2043 has been fixed.

---

 ntpd/ntp_peer.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c
index d7dc146..aaa66f5 100644
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -717,9 +717,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);
+	}
 }
 
 



More information about the vc mailing list