]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1134] ntpd fails binding to tentative IPv6 addresses
authorHarlan Stenn <stenn@ntp.org>
Tue, 5 Jul 2011 07:39:02 +0000 (03:39 -0400)
committerHarlan Stenn <stenn@ntp.org>
Tue, 5 Jul 2011 07:39:02 +0000 (03:39 -0400)
bk: 4e12bf96-GmVdZaFMR4ULoiF5BHcVQ

ChangeLog
lib/isc/unix/interfaceiter.c

index 6621c7a2def9eed4e6d207bc9441f23614697bba..c883e8bb3789c17528622307f8e08a97ebe240df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+---
+
+* [Bug 1134] ntpd fails binding to tentative IPv6 addresses.
+
 ---
 (4.2.6p4-beta2) 2011/05/25 Released by Harlan Stenn <stenn@ntp.org>
 
index 3524a02c640ef3a715055e3b9f5c47a0bf7322b5..5f5ee981120491b393b6dcd9785222cbca57c9a0 100644 (file)
 #endif
 #include <net/if.h>
 
+#ifdef __linux
+# include <linux/if_addr.h>
+#endif
+
 /* Common utility functions */
 
 /*%
@@ -217,6 +221,13 @@ linux_if_inet6_current(isc_interfaceiter_t *iter) {
                              "/proc/net/if_inet6:strlen(%s) != 32", address);
                return (ISC_R_FAILURE);
        }
+       /*
+       ** Ignore DAD addresses --
+       ** we can't bind to them until they are resolved
+       */
+       if (flags & IFA_F_TENTATIVE)
+               return (ISC_R_IGNORE);
+
        for (i = 0; i < 16; i++) {
                unsigned char byte;
                static const char hex[] = "0123456789abcdef";