ip6_input.c (ffeab76b68550c347abcd7c31c3b3dfcdea732b5) ip6_input.c (60d8dbbef075d3b39891ed35e124d0f7ef8e5fb9)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 559 unchanged lines hidden (view full) ---

568 else
569 IP6STAT_INC(ip6s_mext1);
570 } else {
571 if (m->m_next) {
572 struct ifnet *ifp = (m->m_flags & M_LOOP) ? V_loif : rcvif;
573 int ifindex = ifp->if_index;
574 if (ifindex >= IP6S_M2MMAX)
575 ifindex = 0;
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 559 unchanged lines hidden (view full) ---

568 else
569 IP6STAT_INC(ip6s_mext1);
570 } else {
571 if (m->m_next) {
572 struct ifnet *ifp = (m->m_flags & M_LOOP) ? V_loif : rcvif;
573 int ifindex = ifp->if_index;
574 if (ifindex >= IP6S_M2MMAX)
575 ifindex = 0;
576 IP6STAT_INC(ip6s_m2m[ifindex]);
576 IP6STAT_INC2(ip6s_m2m, ifindex);
577 } else
578 IP6STAT_INC(ip6s_m1);
579 }
580
581 in6_ifstat_inc(rcvif, ifs6_in_receive);
582 IP6STAT_INC(ip6s_total);
583
584 /*

--- 27 unchanged lines hidden (view full) ---

612
613 ip6 = mtod(m, struct ip6_hdr *);
614 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) {
615 IP6STAT_INC(ip6s_badvers);
616 in6_ifstat_inc(rcvif, ifs6_in_hdrerr);
617 goto bad;
618 }
619
577 } else
578 IP6STAT_INC(ip6s_m1);
579 }
580
581 in6_ifstat_inc(rcvif, ifs6_in_receive);
582 IP6STAT_INC(ip6s_total);
583
584 /*

--- 27 unchanged lines hidden (view full) ---

612
613 ip6 = mtod(m, struct ip6_hdr *);
614 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) {
615 IP6STAT_INC(ip6s_badvers);
616 in6_ifstat_inc(rcvif, ifs6_in_hdrerr);
617 goto bad;
618 }
619
620 IP6STAT_INC(ip6s_nxthist[ip6->ip6_nxt]);
620 IP6STAT_INC2(ip6s_nxthist, ip6->ip6_nxt);
621 IP_PROBE(receive, NULL, NULL, ip6, rcvif, NULL, ip6);
622
623 /*
624 * Check against address spoofing/corruption.
625 */
626 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src) ||
627 IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst)) {
628 /*

--- 1095 unchanged lines hidden ---
621 IP_PROBE(receive, NULL, NULL, ip6, rcvif, NULL, ip6);
622
623 /*
624 * Check against address spoofing/corruption.
625 */
626 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src) ||
627 IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst)) {
628 /*

--- 1095 unchanged lines hidden ---