]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/net/pf_if.c
xnu-6153.11.26.tar.gz
[apple/xnu.git] / bsd / net / pf_if.c
index fad147b5a988cd3397ffde325c4d775f88fcb6ce..4afbfed57817ba6d48d1633f7c6288ada1a439d0 100644 (file)
@@ -481,12 +481,19 @@ pfi_instance_add(struct ifnet *ifp, int net, int flags)
                        IFA_UNLOCK(ia);
                        continue;
                }
-               if ((flags & PFI_AFLAG_NETWORK) && af == AF_INET6 &&
+               if ((af == AF_INET6) &&
                    IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)
                    (void *)ia->ifa_addr)->sin6_addr)) {
                        IFA_UNLOCK(ia);
                        continue;
                }
+               if ((af == AF_INET6) &&
+                   (((struct in6_ifaddr *)ia)->ia6_flags &
+                   (IN6_IFF_ANYCAST | IN6_IFF_NOTREADY | IN6_IFF_DETACHED |
+                   IN6_IFF_CLAT46 | IN6_IFF_TEMPORARY | IN6_IFF_DEPRECATED))) {
+                       IFA_UNLOCK(ia);
+                       continue;
+               }
                if (flags & PFI_AFLAG_NOALIAS) {
                        if (af == AF_INET && got4) {
                                IFA_UNLOCK(ia);