Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Add [ah/esp/ipcomp]_enable sysctls, and remove ...
details: https://anonhg.NetBSD.org/src/rev/ab5aa38e8e55
branches: trunk
changeset: 359580:ab5aa38e8e55
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Feb 16 09:24:55 2018 +0000
description:
Add [ah/esp/ipcomp]_enable sysctls, and remove the FreeBSD #ifdefs.
Discussed with ozaki-r@.
diffstat:
sys/netipsec/ipsec_netbsd.c | 23 +++++++++++++++++++++--
sys/netipsec/xform_ah.c | 10 ++--------
sys/netipsec/xform_esp.c | 10 ++--------
sys/netipsec/xform_ipcomp.c | 10 ++--------
4 files changed, 27 insertions(+), 26 deletions(-)
diffs (141 lines):
diff -r 8b47cc3b51c3 -r ab5aa38e8e55 sys/netipsec/ipsec_netbsd.c
--- a/sys/netipsec/ipsec_netbsd.c Fri Feb 16 09:07:50 2018 +0000
+++ b/sys/netipsec/ipsec_netbsd.c Fri Feb 16 09:24:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_netbsd.c,v 1.45 2017/08/03 06:32:51 ozaki-r Exp $ */
+/* $NetBSD: ipsec_netbsd.c,v 1.46 2018/02/16 09:24:55 maxv Exp $ */
/* $KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $ */
/* $KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.45 2017/08/03 06:32:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.46 2018/02/16 09:24:55 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -698,10 +698,29 @@
CTL_CREATE, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+ CTLTYPE_INT, "ah_enable", NULL,
+ NULL, 0, &ah_enable, 0,
+ CTL_NET, PF_INET, ipproto_ipsec,
+ CTL_CREATE, CTL_EOL);
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+ CTLTYPE_INT, "esp_enable", NULL,
+ NULL, 0, &esp_enable, 0,
+ CTL_NET, PF_INET, ipproto_ipsec,
+ CTL_CREATE, CTL_EOL);
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+ CTLTYPE_INT, "ipcomp_enable", NULL,
+ NULL, 0, &ipcomp_enable, 0,
+ CTL_NET, PF_INET, ipproto_ipsec,
+ CTL_CREATE, CTL_EOL);
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "crypto_support", NULL,
NULL, 0, &crypto_support, 0,
CTL_NET, PF_INET, ipproto_ipsec,
CTL_CREATE, CTL_EOL);
+
#ifdef IPSEC_DEBUG
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
diff -r 8b47cc3b51c3 -r ab5aa38e8e55 sys/netipsec/xform_ah.c
--- a/sys/netipsec/xform_ah.c Fri Feb 16 09:07:50 2018 +0000
+++ b/sys/netipsec/xform_ah.c Fri Feb 16 09:24:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xform_ah.c,v 1.85 2018/02/16 09:07:50 maxv Exp $ */
+/* $NetBSD: xform_ah.c,v 1.86 2018/02/16 09:24:55 maxv Exp $ */
/* $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */
/* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
/*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.85 2018/02/16 09:07:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.86 2018/02/16 09:24:55 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -104,12 +104,6 @@
int ah_enable = 1; /* control flow of packets with AH */
int ip4_ah_cleartos = 1; /* clear ip_tos when doing AH calc */
-#ifdef __FreeBSD__
-SYSCTL_DECL(_net_inet_ah);
-SYSCTL_INT(_net_inet_ah, OID_AUTO,
- ah_enable, CTLFLAG_RW, &ah_enable, 0, "");
-#endif /* __FreeBSD__ */
-
static unsigned char ipseczeroes[256]; /* larger than an ip6 extension hdr */
int ah_max_authsize; /* max authsize over all algorithms */
diff -r 8b47cc3b51c3 -r ab5aa38e8e55 sys/netipsec/xform_esp.c
--- a/sys/netipsec/xform_esp.c Fri Feb 16 09:07:50 2018 +0000
+++ b/sys/netipsec/xform_esp.c Fri Feb 16 09:24:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xform_esp.c,v 1.78 2018/02/16 09:07:50 maxv Exp $ */
+/* $NetBSD: xform_esp.c,v 1.79 2018/02/16 09:24:55 maxv 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.78 2018/02/16 09:07:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.79 2018/02/16 09:24:55 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -89,12 +89,6 @@
int esp_enable = 1;
-#ifdef __FreeBSD__
-SYSCTL_DECL(_net_inet_esp);
-SYSCTL_INT(_net_inet_esp, OID_AUTO,
- esp_enable, CTLFLAG_RW, &esp_enable, 0, "");
-#endif /* __FreeBSD__ */
-
static int esp_max_ivlen; /* max iv length over all algorithms */
static int esp_input_cb(struct cryptop *op);
diff -r 8b47cc3b51c3 -r ab5aa38e8e55 sys/netipsec/xform_ipcomp.c
--- a/sys/netipsec/xform_ipcomp.c Fri Feb 16 09:07:50 2018 +0000
+++ b/sys/netipsec/xform_ipcomp.c Fri Feb 16 09:24:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xform_ipcomp.c,v 1.58 2018/02/16 09:07:50 maxv Exp $ */
+/* $NetBSD: xform_ipcomp.c,v 1.59 2018/02/16 09:24:55 maxv Exp $ */
/* $FreeBSD: src/sys/netipsec/xform_ipcomp.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */
/* $OpenBSD: ip_ipcomp.c,v 1.1 2001/07/05 12:08:52 jjbg Exp $ */
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ipcomp.c,v 1.58 2018/02/16 09:07:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipcomp.c,v 1.59 2018/02/16 09:24:55 maxv Exp $");
/* IP payload compression protocol (IPComp), see RFC 2393 */
#if defined(_KERNEL_OPT)
@@ -76,12 +76,6 @@
int ipcomp_enable = 1;
-#ifdef __FreeBSD__
-SYSCTL_DECL(_net_inet_ipcomp);
-SYSCTL_INT(_net_inet_ipcomp, OID_AUTO,
- ipcomp_enable, CTLFLAG_RW, &ipcomp_enable, 0, "");
-#endif /* __FreeBSD__ */
-
static int ipcomp_input_cb(struct cryptop *crp);
static int ipcomp_output_cb(struct cryptop *crp);
Home |
Main Index |
Thread Index |
Old Index