From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 09:22:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0AA911065678; Fri, 7 Sep 2012 09:22:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D099C8FC18; Fri, 7 Sep 2012 09:22:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q879MBMN073300; Fri, 7 Sep 2012 09:22:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q879MB8l073297; Fri, 7 Sep 2012 09:22:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201209070922.q879MB8l073297@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 7 Sep 2012 09:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240193 - releng/9.1/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 09:22:12 -0000 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 */