Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec Fix header size calculation of esp where sav is...



details:   https://anonhg.NetBSD.org/src/rev/400cae304c23
branches:  trunk
changeset: 355101:400cae304c23
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Jul 13 03:00:46 2017 +0000

description:
Fix header size calculation of esp where sav is NULL

diffstat:

 sys/netipsec/xform_esp.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 15ea6a42b968 -r 400cae304c23 sys/netipsec/xform_esp.c
--- a/sys/netipsec/xform_esp.c  Thu Jul 13 01:48:52 2017 +0000
+++ b/sys/netipsec/xform_esp.c  Thu Jul 13 03:00:46 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_esp.c,v 1.59 2017/07/10 07:17:12 ozaki-r Exp $   */
+/*     $NetBSD: xform_esp.c,v 1.60 2017/07/13 03:00:46 ozaki-r Exp $   */
 /*     $FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $  */
 /*     $OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.59 2017/07/10 07:17:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.60 2017/07/13 03:00:46 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -163,7 +163,8 @@
                 * + sizeof(next header field)
                 * + max icv supported.
                 */
-               size = sizeof(struct newesp) + esp_max_ivlen + 9 + 16;
+               size = sizeof(struct newesp) + esp_max_ivlen + 9 +
+                   ah_hdrsiz(NULL);
        }
        return size;
 }



Home | Main Index | Thread Index | Old Index