Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec PR/52161: Ryota Ozaki: Fix AH tunnel ipsec for ...
details: https://anonhg.NetBSD.org/src/rev/13405edb4b7a
branches: trunk
changeset: 352926:13405edb4b7a
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 14 22:35:05 2017 +0000
description:
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 522e4d2a9dd0 -r 13405edb4b7a sys/netipsec/xform_ipip.c
--- a/sys/netipsec/xform_ipip.c Fri Apr 14 22:29:17 2017 +0000
+++ b/sys/netipsec/xform_ipip.c Fri Apr 14 22:35:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xform_ipip.c,v 1.43 2017/04/06 09:20:07 ozaki-r Exp $ */
+/* $NetBSD: xform_ipip.c,v 1.44 2017/04/14 22:35:05 christos 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.43 2017/04/06 09:20:07 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.44 2017/04/14 22:35:05 christos 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