Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7-1]: src/sys/netipsec Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/2808d362ab2a
branches:  netbsd-7-1
changeset: 800855:2808d362ab2a
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Feb 15 14:41:57 2018 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1567):
        sys/netipsec/xform_ipip.c: revision 1.44
PR/52161: Ryota Ozaki: Fix AH tunnel ipsec for ipv6. Compute plen right,
don't forget to subtract the ipv6 header length.

diffstat:

 sys/netipsec/xform_ipip.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8495d8c26508 -r 2808d362ab2a sys/netipsec/xform_ipip.c
--- a/sys/netipsec/xform_ipip.c Thu Feb 15 08:05:41 2018 +0000
+++ b/sys/netipsec/xform_ipip.c Thu Feb 15 14:41:57 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ipip.c,v 1.31 2014/06/05 23:48:17 rmind Exp $    */
+/*     $NetBSD: xform_ipip.c,v 1.31.10.1 2018/02/15 14:41:57 martin Exp $      */
 /*     $FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */
 /*     $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.31 2014/06/05 23:48:17 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.31.10.1 2018/02/15 14:41:57 martin Exp $");
 
 /*
  * IP-inside-IP processing
@@ -562,7 +562,7 @@
                ip6o->ip6_flow = 0;
                ip6o->ip6_vfc &= ~IPV6_VERSION_MASK;
                ip6o->ip6_vfc |= IPV6_VERSION;
-               ip6o->ip6_plen = htons(m->m_pkthdr.len);
+               ip6o->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6o));
                ip6o->ip6_hlim = ip_defttl;
                ip6o->ip6_dst = saidx->dst.sin6.sin6_addr;
                ip6o->ip6_src = saidx->src.sin6.sin6_addr;



Home | Main Index | Thread Index | Old Index