X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/99c3a10404e5d1ef94397ab4df5a8b74711fc4d3..db6096698656d32db7df630594bd9617ee54f828:/bsd/netinet6/nd6_nbr.c diff --git a/bsd/netinet6/nd6_nbr.c b/bsd/netinet6/nd6_nbr.c index be58f8dac..53d5367cf 100644 --- a/bsd/netinet6/nd6_nbr.c +++ b/bsd/netinet6/nd6_nbr.c @@ -177,7 +177,8 @@ nd6_llreach_alloc(struct rtentry *rt, struct ifnet *ifp, void *addr, struct llinfo_nd6 *ln = rt->rt_llinfo; if (nd6_llreach_base != 0 && - ln->ln_expire != 0 && rt->rt_ifp != lo_ifp && + (ln->ln_expire != 0 || (ifp->if_eflags & IFEF_IPV6_ND6ALT) != 0) && + rt->rt_ifp != lo_ifp && ifp->if_addrlen == IF_LLREACH_MAXLEN && /* Ethernet */ alen == ifp->if_addrlen) { struct if_llreach *lr; @@ -267,6 +268,11 @@ nd6_ns_input( struct sockaddr_dl proxydl; boolean_t advrouter; + if ((ifp->if_eflags & IFEF_IPV6_ND6ALT) != 0) { + nd6log((LOG_INFO, "nd6_ns_input: on ND6ALT interface!\n")); + return; + } + /* Expect 32-bit aligned data pointer on strict-align platforms */ MBUF_STRICT_DATA_ALIGNMENT_CHECK_32(m); @@ -853,6 +859,11 @@ nd6_na_input( union nd_opts ndopts; struct timeval timenow; + if ((ifp->if_eflags & IFEF_IPV6_ND6ALT) != 0) { + nd6log((LOG_INFO, "nd6_na_input: on ND6ALT interface!\n")); + return; + } + /* Expect 32-bit aligned data pointer on strict-align platforms */ MBUF_STRICT_DATA_ALIGNMENT_CHECK_32(m); @@ -2283,6 +2294,10 @@ nd6_alt_node_present(struct ifnet *ifp, struct sockaddr_in6 *sin6, log(LOG_ERR, "%s: failed to add/update host route to %s.\n", __func__, ip6_sprintf(&sin6->sin6_addr)); } + else { + nd6log((LOG_DEBUG, "%s: host route to %s [lr=%p]\n", __func__, + ip6_sprintf(&sin6->sin6_addr), lr)); + } } void @@ -2290,6 +2305,9 @@ nd6_alt_node_absent(struct ifnet *ifp, struct sockaddr_in6 *sin6) { struct rtentry *rt; + nd6log((LOG_DEBUG, "%s: host route to %s\n", __func__, + ip6_sprintf(&sin6->sin6_addr))); + lck_mtx_assert(rnh_lock, LCK_MTX_ASSERT_NOTOWNED); lck_mtx_lock(rnh_lock);