Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159310
b: refs/heads/master
c: f816700
h: refs/heads/master
v: v3
  • Loading branch information
Randy Dunlap authored and David S. Miller committed Aug 5, 2009
1 parent 9a09769 commit 9ace738
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4c4e448cf557921ffbbbd6d6ddac81fdceacb4f
refs/heads/master: f816700aa9ef1b1e2f984f638cb211e79dcab495
6 changes: 6 additions & 0 deletions trunk/net/ipv4/xfrm4_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ static struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
.fill_dst = xfrm4_fill_dst,
};

#ifdef CONFIG_SYSCTL
static struct ctl_table xfrm4_policy_table[] = {
{
.ctl_name = CTL_UNNUMBERED,
Expand All @@ -277,6 +278,7 @@ static struct ctl_table xfrm4_policy_table[] = {
};

static struct ctl_table_header *sysctl_hdr;
#endif

static void __init xfrm4_policy_init(void)
{
Expand All @@ -285,8 +287,10 @@ static void __init xfrm4_policy_init(void)

static void __exit xfrm4_policy_fini(void)
{
#ifdef CONFIG_SYSCTL
if (sysctl_hdr)
unregister_net_sysctl_table(sysctl_hdr);
#endif
xfrm_policy_unregister_afinfo(&xfrm4_policy_afinfo);
}

Expand All @@ -305,7 +309,9 @@ void __init xfrm4_init(int rt_max_size)
* and start cleaning when were 1/2 full
*/
xfrm4_dst_ops.gc_thresh = rt_max_size/2;
#ifdef CONFIG_SYSCTL
sysctl_hdr = register_net_sysctl_table(&init_net, net_ipv4_ctl_path,
xfrm4_policy_table);
#endif
}

0 comments on commit 9ace738

Please sign in to comment.