Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_input.c
Show First 20 Lines • Show All 567 Lines • ▼ Show 20 Lines | if (m->m_flags & M_EXT) { | ||||
else | else | ||||
IP6STAT_INC(ip6s_mext1); | IP6STAT_INC(ip6s_mext1); | ||||
} else { | } else { | ||||
if (m->m_next) { | if (m->m_next) { | ||||
struct ifnet *ifp = (m->m_flags & M_LOOP) ? V_loif : rcvif; | struct ifnet *ifp = (m->m_flags & M_LOOP) ? V_loif : rcvif; | ||||
int ifindex = ifp->if_index; | int ifindex = ifp->if_index; | ||||
if (ifindex >= IP6S_M2MMAX) | if (ifindex >= IP6S_M2MMAX) | ||||
ifindex = 0; | ifindex = 0; | ||||
IP6STAT_INC(ip6s_m2m[ifindex]); | IP6STAT_INC2(ip6s_m2m, ifindex); | ||||
} else | } else | ||||
IP6STAT_INC(ip6s_m1); | IP6STAT_INC(ip6s_m1); | ||||
} | } | ||||
in6_ifstat_inc(rcvif, ifs6_in_receive); | in6_ifstat_inc(rcvif, ifs6_in_receive); | ||||
IP6STAT_INC(ip6s_total); | IP6STAT_INC(ip6s_total); | ||||
/* | /* | ||||
Show All 27 Lines | #endif /* IPSEC */ | ||||
ip6 = mtod(m, struct ip6_hdr *); | ip6 = mtod(m, struct ip6_hdr *); | ||||
if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { | if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { | ||||
IP6STAT_INC(ip6s_badvers); | IP6STAT_INC(ip6s_badvers); | ||||
in6_ifstat_inc(rcvif, ifs6_in_hdrerr); | in6_ifstat_inc(rcvif, ifs6_in_hdrerr); | ||||
goto bad; | goto bad; | ||||
} | } | ||||
IP6STAT_INC(ip6s_nxthist[ip6->ip6_nxt]); | IP6STAT_INC2(ip6s_nxthist, ip6->ip6_nxt); | ||||
IP_PROBE(receive, NULL, NULL, ip6, rcvif, NULL, ip6); | IP_PROBE(receive, NULL, NULL, ip6, rcvif, NULL, ip6); | ||||
/* | /* | ||||
* Check against address spoofing/corruption. | * Check against address spoofing/corruption. | ||||
*/ | */ | ||||
if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src) || | if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src) || | ||||
IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst)) { | IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst)) { | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 1,095 Lines • Show Last 20 Lines |