-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 122231 b: refs/heads/master c: b27aead h: refs/heads/master i: 122229: ecd0ca9 122227: ac3b1c6 122223: 2d4f6fd v: v3
- Loading branch information
Alexey Dobriyan
authored and
David S. Miller
committed
Nov 26, 2008
1 parent
afdbd0f
commit 1bf4889
Showing
10 changed files
with
126 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: c68cd1a01ba56995d85a4a62b195b2b3f6415c64 | ||
refs/heads/master: b27aeadb5948d400df83db4d29590fb9862ba49d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#include <linux/sysctl.h> | ||
#include <net/net_namespace.h> | ||
#include <net/xfrm.h> | ||
|
||
static void __xfrm_sysctl_init(struct net *net) | ||
{ | ||
net->xfrm.sysctl_aevent_etime = XFRM_AE_ETIME; | ||
net->xfrm.sysctl_aevent_rseqth = XFRM_AE_SEQT_SIZE; | ||
net->xfrm.sysctl_larval_drop = 1; | ||
net->xfrm.sysctl_acq_expires = 30; | ||
} | ||
|
||
#ifdef CONFIG_SYSCTL | ||
static struct ctl_table xfrm_table[] = { | ||
{ | ||
.ctl_name = NET_CORE_AEVENT_ETIME, | ||
.procname = "xfrm_aevent_etime", | ||
.maxlen = sizeof(u32), | ||
.mode = 0644, | ||
.proc_handler = proc_dointvec | ||
}, | ||
{ | ||
.ctl_name = NET_CORE_AEVENT_RSEQTH, | ||
.procname = "xfrm_aevent_rseqth", | ||
.maxlen = sizeof(u32), | ||
.mode = 0644, | ||
.proc_handler = proc_dointvec | ||
}, | ||
{ | ||
.ctl_name = CTL_UNNUMBERED, | ||
.procname = "xfrm_larval_drop", | ||
.maxlen = sizeof(int), | ||
.mode = 0644, | ||
.proc_handler = proc_dointvec | ||
}, | ||
{ | ||
.ctl_name = CTL_UNNUMBERED, | ||
.procname = "xfrm_acq_expires", | ||
.maxlen = sizeof(int), | ||
.mode = 0644, | ||
.proc_handler = proc_dointvec | ||
}, | ||
{} | ||
}; | ||
|
||
int __net_init xfrm_sysctl_init(struct net *net) | ||
{ | ||
struct ctl_table *table; | ||
|
||
__xfrm_sysctl_init(net); | ||
|
||
table = kmemdup(xfrm_table, sizeof(xfrm_table), GFP_KERNEL); | ||
if (!table) | ||
goto out_kmemdup; | ||
table[0].data = &net->xfrm.sysctl_aevent_etime; | ||
table[1].data = &net->xfrm.sysctl_aevent_rseqth; | ||
table[2].data = &net->xfrm.sysctl_larval_drop; | ||
table[3].data = &net->xfrm.sysctl_acq_expires; | ||
|
||
net->xfrm.sysctl_hdr = register_net_sysctl_table(net, net_core_path, table); | ||
if (!net->xfrm.sysctl_hdr) | ||
goto out_register; | ||
return 0; | ||
|
||
out_register: | ||
kfree(table); | ||
out_kmemdup: | ||
return -ENOMEM; | ||
} | ||
|
||
void xfrm_sysctl_fini(struct net *net) | ||
{ | ||
struct ctl_table *table; | ||
|
||
table = net->xfrm.sysctl_hdr->ctl_table_arg; | ||
unregister_net_sysctl_table(net->xfrm.sysctl_hdr); | ||
kfree(table); | ||
} | ||
#else | ||
int __net_init xfrm_sysctl_init(struct net *net) | ||
{ | ||
__xfrm_sysctl_init(net); | ||
return 0; | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters