Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Sep 2012 09:22:11 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r240193 - releng/9.1/sys/netinet6
Message-ID:  <201209070922.q879MB8l073297@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Fri Sep  7 09:22:11 2012
New Revision: 240193
URL: http://svn.freebsd.org/changeset/base/240193

Log:
  MFC r238877-238878:
   Fix a comment that we do not have an SA yet but need to acquire one.
   For consistency put the IPsec comment iside the #fidef section.
  
  MFC r238934
    Improve the should-never-hit printf to ease debugging in case we'd ever hit
    it again when doing the delayed IPv6 checksum calculations.
  
  Approved by:	re (kib)

Modified:
  releng/9.1/sys/netinet6/ip6_ipsec.c
  releng/9.1/sys/netinet6/ip6_output.c
Directory Properties:
  releng/9.1/sys/   (props changed)

Modified: releng/9.1/sys/netinet6/ip6_ipsec.c
==============================================================================
--- releng/9.1/sys/netinet6/ip6_ipsec.c	Fri Sep  7 09:00:25 2012	(r240192)
+++ releng/9.1/sys/netinet6/ip6_ipsec.c	Fri Sep  7 09:22:11 2012	(r240193)
@@ -263,7 +263,7 @@ ip6_ipsec_output(struct mbuf **m, struct
 			    mtag->m_tag_id != PACKET_TAG_IPSEC_OUT_CRYPTO_NEEDED)
 				continue;
 			/*
-			 * Check if policy has an SA associated with it.
+			 * Check if policy has no SA associated with it.
 			 * This can happen when an SP has yet to acquire
 			 * an SA; e.g. on first reference.  If it occurs,
 			 * then we let ipsec4_process_packet do its thing.

Modified: releng/9.1/sys/netinet6/ip6_output.c
==============================================================================
--- releng/9.1/sys/netinet6/ip6_output.c	Fri Sep  7 09:00:25 2012	(r240192)
+++ releng/9.1/sys/netinet6/ip6_output.c	Fri Sep  7 09:22:11 2012	(r240193)
@@ -195,8 +195,9 @@ in6_delayed_cksum(struct mbuf *m, uint32
 	offset += m->m_pkthdr.csum_data;	/* checksum offset */
 
 	if (offset + sizeof(u_short) > m->m_len) {
-		printf("%s: delayed m_pullup, m->len: %d off: %d\n",
-		    __func__, m->m_len, offset);
+		printf("%s: delayed m_pullup, m->len: %d plen %u off %u "
+		    "csum_flags=0x%04x\n", __func__, m->m_len, plen, offset,
+		    m->m_pkthdr.csum_flags);
 		/*
 		 * XXX this should not happen, but if it does, the correct
 		 * behavior may be to insert the checksum in the appropriate
@@ -292,11 +293,11 @@ ip6_output(struct mbuf *m0, struct ip6_p
 		MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2);
 	}
 
+#ifdef IPSEC
 	/*
 	 * IPSec checking which handles several cases.
 	 * FAST IPSEC: We re-injected the packet.
 	 */
-#ifdef IPSEC
 	switch(ip6_ipsec_output(&m, inp, &flags, &error, &ifp, &sp))
 	{
 	case 1:                 /* Bad packet */



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