Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2015 11:47:18 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r282894 - stable/10/sys/netinet6
Message-ID:  <201505141147.t4EBlI2j075838@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Thu May 14 11:47:18 2015
New Revision: 282894
URL: https://svnweb.freebsd.org/changeset/base/282894

Log:
  MFC r282578:
    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

Modified:
  stable/10/sys/netinet6/ip6_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet6/ip6_output.c
==============================================================================
--- stable/10/sys/netinet6/ip6_output.c	Thu May 14 11:37:36 2015	(r282893)
+++ stable/10/sys/netinet6/ip6_output.c	Thu May 14 11:47:18 2015	(r282894)
@@ -2816,14 +2816,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.
@@ -2831,7 +2823,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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505141147.t4EBlI2j075838>