[pkg-ntp-maintainers] Bug#601519: patch to ignore ipv6 tentative address

Stephen Hemminger shemminger at vyatta.com
Tue Oct 26 23:49:29 UTC 2010


commit 67b71a1559883b33b446ee1e42ade6fa10260be2
Author: Stephen Hemminger <stephen.hemminger at vyatta.com>
Date:   Mon Mar 9 14:04:17 2009 -0700

    Ignore IPV6 Dynamic addresses
    
    During boot link-local addresses are generated dynamically.
    These addresses are in a tentative state until after resolution occurs.
    While in the tentative state, the address can not be bound to.
    NTP daemon will see the address become available later when it rescans.

diff --git a/libisc/ifiter_ioctl.c b/libisc/ifiter_ioctl.c
index e069560..45d4813 100644
--- a/libisc/ifiter_ioctl.c
+++ b/libisc/ifiter_ioctl.c
@@ -110,6 +110,7 @@ struct isc_interfaceiter {
 #  define IF_NAMESIZE 16
 # endif
 #endif
+#include <linux/if_addr.h>
 #endif
 
 static isc_result_t
@@ -479,6 +480,10 @@ linux_if_inet6_current(isc_interfaceiter_t *iter) {
 			      "/proc/net/if_inet6:strlen(%s) != 32", address);
 		return (ISC_R_FAILURE);
 	}
+	/* Ignore DAD addresses -- can't bind to them till resolved */
+	if (flags & IFA_F_TENTATIVE)
+		return (ISC_R_IGNORE);
+
 	for (i = 0; i < 16; i++) {
 		unsigned char byte;
 		static const char hex[] = "0123456789abcdef";





More information about the pkg-ntp-maintainers mailing list