Source-Changes-HG archive

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

src: Remove duplicate sysctls:



details:   https://anonhg.NetBSD.org/src/rev/7a189e9a69fa
branches:  trunk
changeset: 318317:7a189e9a69fa
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Apr 18 06:03:36 2018 +0000
description:
Remove duplicate sysctls:

        net.inet.esp.trans_deflev = net.inet.ipsec.esp_trans_deflev
        net.inet.esp.net_deflev   = net.inet.ipsec.esp_net_deflev
        net.inet.ah.cleartos      = net.inet.ipsec.ah_cleartos
        net.inet.ah.offsetmask    = net.inet.ipsec.ah_offsetmask
        net.inet.ah.trans_deflev  = net.inet.ipsec.ah_trans_deflev
        net.inet.ah.net_deflev    = net.inet.ipsec.ah_net_deflev

Use the convention on the right. Discussed a month ago on tech-net@.

diffstat:

 sys/netipsec/ipsec_netbsd.c |  40 ++--------------------------------------
 1 files changed, 2 insertions(+), 38 deletions(-)

diffs (68 lines):

diff -r 4762bfe8f1c9 -r 7a189e9a69fa sys/netipsec/ipsec_netbsd.c
--- a/sys/netipsec/ipsec_netbsd.c       Wed Apr 18 04:27:47 2018 +0000
+++ b/sys/netipsec/ipsec_netbsd.c       Wed Apr 18 06:03:36 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec_netbsd.c,v 1.47 2018/02/26 06:17:01 maxv Exp $   */
+/*     $NetBSD: ipsec_netbsd.c,v 1.48 2018/04/18 06:03:36 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.47 2018/02/26 06:17:01 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.48 2018/04/18 06:03:36 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -535,18 +535,6 @@
                       NULL, 0, NULL, 0,
                       CTL_NET, PF_INET, IPPROTO_ESP, CTL_EOL);
        sysctl_createv(clog, 0, NULL, NULL,
-                      CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-                      CTLTYPE_INT, "trans_deflev", NULL,
-                      sysctl_ipsec, 0, &ip4_esp_trans_deflev, 0,
-                      CTL_NET, PF_INET, IPPROTO_ESP,
-                      IPSECCTL_DEF_ESP_TRANSLEV, CTL_EOL);
-       sysctl_createv(clog, 0, NULL, NULL,
-                      CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-                      CTLTYPE_INT, "net_deflev", NULL,
-                      sysctl_ipsec, 0, &ip4_esp_net_deflev, 0,
-                      CTL_NET, PF_INET, IPPROTO_ESP,
-                      IPSECCTL_DEF_ESP_NETLEV, CTL_EOL);
-       sysctl_createv(clog, 0, NULL, NULL,
                       CTLFLAG_PERMANENT|CTLFLAG_READONLY,
                       CTLTYPE_STRUCT, "esp_stats", NULL,
                       sysctl_net_inet_esp_stats, 0, NULL, 0,
@@ -560,30 +548,6 @@
                       NULL, 0, NULL, 0,
                       CTL_NET, PF_INET, IPPROTO_AH, CTL_EOL);
        sysctl_createv(clog, 0, NULL, NULL,
-                      CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-                      CTLTYPE_INT, "cleartos", NULL,
-                      NULL, 0, &ip4_ah_cleartos, 0,
-                      CTL_NET, PF_INET, IPPROTO_AH,
-                      IPSECCTL_AH_CLEARTOS, CTL_EOL);
-       sysctl_createv(clog, 0, NULL, NULL,
-                      CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-                      CTLTYPE_INT, "offsetmask", NULL,
-                      NULL, 0, &ip4_ah_offsetmask, 0,
-                      CTL_NET, PF_INET, IPPROTO_AH,
-                      IPSECCTL_AH_OFFSETMASK, CTL_EOL);
-       sysctl_createv(clog, 0, NULL, NULL,
-                      CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-                      CTLTYPE_INT, "trans_deflev", NULL,
-                      sysctl_ipsec, 0, &ip4_ah_trans_deflev, 0,
-                      CTL_NET, PF_INET, IPPROTO_AH,
-                      IPSECCTL_DEF_AH_TRANSLEV, CTL_EOL);
-       sysctl_createv(clog, 0, NULL, NULL,
-                      CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-                      CTLTYPE_INT, "net_deflev", NULL,
-                      sysctl_ipsec, 0, &ip4_ah_net_deflev, 0,
-                      CTL_NET, PF_INET, IPPROTO_AH,
-                      IPSECCTL_DEF_AH_NETLEV, CTL_EOL);
-       sysctl_createv(clog, 0, NULL, NULL,
                       CTLFLAG_PERMANENT|CTLFLAG_READONLY,
                       CTLTYPE_STRUCT, "ah_stats", NULL,
                       sysctl_net_inet_ah_stats, 0, NULL, 0,



Home | Main Index | Thread Index | Old Index