aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_sysctl.c')
-rw-r--r--net/xfrm/xfrm_sysctl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/xfrm/xfrm_sysctl.c b/net/xfrm/xfrm_sysctl.c
index 2e6ffb66f06f..05640bc9594b 100644
--- a/net/xfrm/xfrm_sysctl.c
+++ b/net/xfrm/xfrm_sysctl.c
@@ -1,8 +1,9 @@
1#include <linux/sysctl.h> 1#include <linux/sysctl.h>
2#include <linux/slab.h>
2#include <net/net_namespace.h> 3#include <net/net_namespace.h>
3#include <net/xfrm.h> 4#include <net/xfrm.h>
4 5
5static void __xfrm_sysctl_init(struct net *net) 6static void __net_init __xfrm_sysctl_init(struct net *net)
6{ 7{
7 net->xfrm.sysctl_aevent_etime = XFRM_AE_ETIME; 8 net->xfrm.sysctl_aevent_etime = XFRM_AE_ETIME;
8 net->xfrm.sysctl_aevent_rseqth = XFRM_AE_SEQT_SIZE; 9 net->xfrm.sysctl_aevent_rseqth = XFRM_AE_SEQT_SIZE;
@@ -13,28 +14,24 @@ static void __xfrm_sysctl_init(struct net *net)
13#ifdef CONFIG_SYSCTL 14#ifdef CONFIG_SYSCTL
14static struct ctl_table xfrm_table[] = { 15static struct ctl_table xfrm_table[] = {
15 { 16 {
16 .ctl_name = NET_CORE_AEVENT_ETIME,
17 .procname = "xfrm_aevent_etime", 17 .procname = "xfrm_aevent_etime",
18 .maxlen = sizeof(u32), 18 .maxlen = sizeof(u32),
19 .mode = 0644, 19 .mode = 0644,
20 .proc_handler = proc_dointvec 20 .proc_handler = proc_dointvec
21 }, 21 },
22 { 22 {
23 .ctl_name = NET_CORE_AEVENT_RSEQTH,
24 .procname = "xfrm_aevent_rseqth", 23 .procname = "xfrm_aevent_rseqth",
25 .maxlen = sizeof(u32), 24 .maxlen = sizeof(u32),
26 .mode = 0644, 25 .mode = 0644,
27 .proc_handler = proc_dointvec 26 .proc_handler = proc_dointvec
28 }, 27 },
29 { 28 {
30 .ctl_name = CTL_UNNUMBERED,
31 .procname = "xfrm_larval_drop", 29 .procname = "xfrm_larval_drop",
32 .maxlen = sizeof(int), 30 .maxlen = sizeof(int),
33 .mode = 0644, 31 .mode = 0644,
34 .proc_handler = proc_dointvec 32 .proc_handler = proc_dointvec
35 }, 33 },
36 { 34 {
37 .ctl_name = CTL_UNNUMBERED,
38 .procname = "xfrm_acq_expires", 35 .procname = "xfrm_acq_expires",
39 .maxlen = sizeof(int), 36 .maxlen = sizeof(int),
40 .mode = 0644, 37 .mode = 0644,
@@ -68,7 +65,7 @@ out_kmemdup:
68 return -ENOMEM; 65 return -ENOMEM;
69} 66}
70 67
71void xfrm_sysctl_fini(struct net *net) 68void __net_exit xfrm_sysctl_fini(struct net *net)
72{ 69{
73 struct ctl_table *table; 70 struct ctl_table *table;
74 71