Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132154037
D1527.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1527.diff
View Options
Index: head/contrib/ntp/ntpd/ntp_io.c
===================================================================
--- head/contrib/ntp/ntpd/ntp_io.c
+++ head/contrib/ntp/ntpd/ntp_io.c
@@ -1176,12 +1176,13 @@
#ifdef INCLUDE_IPV6_SUPPORT
static isc_boolean_t
-is_anycast(struct sockaddr *sa, char *name)
+is_not_bindable(struct sockaddr *sa, char *name)
{
-#if defined(SIOCGIFAFLAG_IN6) && defined(IN6_IFF_ANYCAST)
+#if defined(SIOCGIFAFLAG_IN6) && \
+ (defined(IN6_IFF_ANYCAST) || defined(IN6_IFF_NOTREADY))
struct in6_ifreq ifr6;
int fd;
- u_int32_t flags6;
+ u_int32_t flags6, exclude = 0;
if (sa->sa_family != AF_INET6)
return ISC_FALSE;
@@ -1197,9 +1198,15 @@
}
close(fd);
flags6 = ifr6.ifr_ifru.ifru_flags6;
- if ((flags6 & IN6_IFF_ANYCAST) != 0)
+#if defined(IN6_IFF_ANYCAST)
+ exclude |= IN6_IFF_ANYCAST;
+#endif /* !IN6_IFF_ANYCAST */
+#if defined(IN6_IFF_NOTREADY)
+ exclude |= IN6_IFF_NOTREADY;
+#endif /* !IN6_IFF_NOTREADY */
+ if ((flags6 & exclude) != 0)
return ISC_TRUE;
-#endif /* !SIOCGIFAFLAG_IN6 || !IN6_IFF_ANYCAST */
+#endif /* !SIOCGIFAFLAG_IN6 || !(IN6_IFF_ANYCAST && IN6_IFF_NOTREADY) */
return ISC_FALSE;
}
#endif /* !INCLUDE_IPV6_SUPPORT */
@@ -1344,7 +1351,7 @@
continue;
#ifdef INCLUDE_IPV6_SUPPORT
- if (is_anycast((struct sockaddr *)&interface.sin, isc_if.name))
+ if (is_not_bindable((struct sockaddr *)&interface.sin, isc_if.name))
continue;
#endif /* !INCLUDE_IPV6_SUPPORT */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 15, 6:25 AM (20 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23745612
Default Alt Text
D1527.diff (1 KB)
Attached To
Mode
D1527: Fix "ntpd bind() failure: Can't assign requested address" for disabled IPv6 addresses.
Attached
Detach File
Event Timeline
Log In to Comment