X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e:/bsd/net/pf_if.c diff --git a/bsd/net/pf_if.c b/bsd/net/pf_if.c index fad147b5a..4afbfed57 100644 --- a/bsd/net/pf_if.c +++ b/bsd/net/pf_if.c @@ -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);