components/ntp/patches/40-norefresh.patch
author Craig Mohrman <craig.mohrman@oracle.com>
Tue, 16 Jun 2015 14:11:47 -0700
changeset 4494 f5b717124172
parent 4486 8a12763ec19a
permissions -rw-r--r--
20192108 problem in UTILITY/PHP 20231115 problem in UTILITY/PHP 20936509 problem in UTILITY/PHP 20804024 problem in UTILITY/PHP 20804061 problem in UTILITY/PHP 20804135 problem in UTILITY/PHP 20804363 problem in UTILITY/PHP 20804424 problem in UTILITY/PHP 20433657 problem in UTILITY/PHP 20803998 problem in UTILITY/PHP 20804391 problem in UTILITY/PHP

Don't change interfaces unless there is something wrong with the old one.
This is NTP bug [2043] and this patch should be removed after upgrading to
a version of NTP with a fix for that bug.

--- ntpd/ntp_peer.c
+++ ntpd/ntp_peer.c
@@ -718,9 +718,13 @@
 	/*
 	 * 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)))
+			peer_refresh_interface(p);
+	}
 }