diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index eda02d9c3293..d6679034a576 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -2900,14 +2900,6 @@ ip6_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in6 *dst) if (copym == NULL) return; } - -#ifdef DIAGNOSTIC - if (copym->m_len < sizeof(*ip6)) { - m_freem(copym); - return; - } -#endif - ip6 = mtod(copym, struct ip6_hdr *); /* * clear embedded scope identifiers if necessary. @@ -2915,7 +2907,11 @@ ip6_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in6 *dst) */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); - + if (copym->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + copym->m_pkthdr.csum_flags |= CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR; + copym->m_pkthdr.csum_data = 0xffff; + } (void)if_simloop(ifp, copym, dst->sin6_family, 0); }