svn commit: r282578 - head/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Wed May 13 04:41:36 UTC 2015


Author: ae
Date: Thu May  7 14:17:43 2015
New Revision: 282578
URL: https://svnweb.freebsd.org/changeset/base/282578

Log:
  Mark data checksum as valid for multicast packets, that we send back
  to myself via simloop.
  Also remove duplicate check under #ifdef DIAGNOSTIC.
  
  PR:		180065
  MFC after:	1 week

Modified:
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c	Thu May  7 12:54:27 2015	(r282577)
+++ head/sys/netinet6/ip6_output.c	Thu May  7 14:17:43 2015	(r282578)
@@ -2900,14 +2900,6 @@ ip6_mloopback(struct ifnet *ifp, struct 
 		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 
 	 */
 	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);
 }
 



More information about the svn-src-all mailing list