Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net reduce unnecessary reqid of NAT-T ipsecif(4), sugges...
details: https://anonhg.NetBSD.org/src/rev/8428c925629f
branches: trunk
changeset: 970110:8428c925629f
user: knakahara <knakahara%NetBSD.org@localhost>
date: Fri Mar 13 02:43:31 2020 +0000
description:
reduce unnecessary reqid of NAT-T ipsecif(4), suggested by ohishi@IIJ.
diffstat:
sys/net/if_ipsec.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 8a5a21f68333 -r 8428c925629f sys/net/if_ipsec.c
--- a/sys/net/if_ipsec.c Fri Mar 13 01:48:16 2020 +0000
+++ b/sys/net/if_ipsec.c Fri Mar 13 02:43:31 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ipsec.c,v 1.28 2020/03/10 10:35:14 knakahara Exp $ */
+/* $NetBSD: if_ipsec.c,v 1.29 2020/03/13 02:43:31 knakahara Exp $ */
/*
* Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.28 2020/03/10 10:35:14 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.29 2020/03/13 02:43:31 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1584,7 +1584,10 @@
xisr->sadb_x_ipsecrequest_proto = IPPROTO_ESP;
xisr->sadb_x_ipsecrequest_mode = IPSEC_MODE_TRANSPORT;
xisr->sadb_x_ipsecrequest_level = level;
- xisr->sadb_x_ipsecrequest_reqid = key_newreqid();
+ if (level == IPSEC_LEVEL_UNIQUE)
+ xisr->sadb_x_ipsecrequest_reqid = key_newreqid();
+ else
+ xisr->sadb_x_ipsecrequest_reqid = 0;
}
return size;
Home |
Main Index |
Thread Index |
Old Index