Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec Optimize: use ipsec_sp_hdrsiz instead of ipsec_...



details:   https://anonhg.NetBSD.org/src/rev/549fccb3ddc4
branches:  trunk
changeset: 359857:549fccb3ddc4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Tue Feb 27 08:05:19 2018 +0000

description:
Optimize: use ipsec_sp_hdrsiz instead of ipsec_hdrsiz, not to re-query
the SP.

ok ozaki-r@

diffstat:

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

diffs (27 lines):

diff -r 2f723f33b17c -r 549fccb3ddc4 sys/netipsec/ipsec.c
--- a/sys/netipsec/ipsec.c      Tue Feb 27 07:24:13 2018 +0000
+++ b/sys/netipsec/ipsec.c      Tue Feb 27 08:05:19 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.141 2018/02/26 10:36:24 maxv Exp $ */
+/* $NetBSD: ipsec.c,v 1.142 2018/02/27 08:05:19 maxv Exp $ */
 /* $FreeBSD: src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */
 /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
 
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.141 2018/02/26 10:36:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.142 2018/02/27 08:05:19 maxv Exp $");
 
 /*
  * IPsec controller part.
@@ -768,7 +768,7 @@
        }
 
        /* Count IPsec header size. */
-       ipsechdr = ipsec_hdrsiz(m, IPSEC_DIR_OUTBOUND, NULL);
+       ipsechdr = ipsec_sp_hdrsiz(sp, m);
 
        /*
         * Find the correct route for outer IPv4 header, compute tunnel MTU.



Home | Main Index | Thread Index | Old Index