]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix IPv6 address announcements from kernel generated link-local addresses.
authorRoy Marples <roy@marples.name>
Fri, 3 Oct 2014 14:43:35 +0000 (14:43 +0000)
committerRoy Marples <roy@marples.name>
Fri, 3 Oct 2014 14:43:35 +0000 (14:43 +0000)
if-bsd.c

index 52fecc8699aec82fd6c81d8d7f3a4f3533688a8b..6403fb84285d99034a10e2e01fb76968ef3ae28f 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -913,6 +913,10 @@ if_managelink(struct dhcpcd_ctx *ctx)
                                sin6 = (struct sockaddr_in6*)(void *)
                                    rti_info[RTAX_IFA];
                                ia6 = sin6->sin6_addr;
+#ifdef __KAME__
+                               if (IN6_IS_ADDR_LINKLOCAL(&ia6))
+                                       ia6.s6_addr[2] = ia6.s6_addr[3] = '\0';
+#endif
                                if (rtm->rtm_type == RTM_NEWADDR) {
                                        ifa_flags = if_addrflags6(ifp->name,
                                            &ia6);