Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/icmp6.c
Show First 20 Lines • Show All 2,097 Lines • ▼ Show 20 Lines | #endif | ||||
* The IN6_IFF_NOTREADY case should be VERY rare, but is possible | * The IN6_IFF_NOTREADY case should be VERY rare, but is possible | ||||
* (for example) when we encounter an error while forwarding procedure | * (for example) when we encounter an error while forwarding procedure | ||||
* destined to a duplicated address of ours. | * destined to a duplicated address of ours. | ||||
*/ | */ | ||||
if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { | if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { | ||||
ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false); | ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false); | ||||
if (ia != NULL && !(ia->ia6_flags & | if (ia != NULL && !(ia->ia6_flags & | ||||
(IN6_IFF_ANYCAST|IN6_IFF_NOTREADY))) { | (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY))) { | ||||
struct nd_ifinfo *ndi = nd6_ifinfo(m->m_pkthdr.rcvif); | |||||
src6 = ia->ia_addr.sin6_addr; | src6 = ia->ia_addr.sin6_addr; | ||||
srcp = &src6; | srcp = &src6; | ||||
if (m->m_pkthdr.rcvif != NULL) { | if (ndi != NULL) { | ||||
/* XXX: This may not be the outgoing interface */ | /* XXX: This may not be the outgoing interface */ | ||||
hlim = ND_IFINFO(m->m_pkthdr.rcvif)->chlim; | hlim = ndi->chlim; | ||||
} else | } else | ||||
hlim = V_ip6_defhlim; | hlim = V_ip6_defhlim; | ||||
} | } | ||||
} | } | ||||
if (srcp == NULL) { | if (srcp == NULL) { | ||||
int error; | int error; | ||||
struct in6_addr dst6; | struct in6_addr dst6; | ||||
▲ Show 20 Lines • Show All 683 Lines • Show Last 20 Lines |