aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/xfrm6_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/xfrm6_policy.c')
-rw-r--r--net/ipv6/xfrm6_policy.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 611cffcf554f..8ec3d45cd1d9 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -306,6 +306,7 @@ static void xfrm6_policy_fini(void)
306 xfrm_policy_unregister_afinfo(&xfrm6_policy_afinfo); 306 xfrm_policy_unregister_afinfo(&xfrm6_policy_afinfo);
307} 307}
308 308
309#ifdef CONFIG_SYSCTL
309static struct ctl_table xfrm6_policy_table[] = { 310static struct ctl_table xfrm6_policy_table[] = {
310 { 311 {
311 .ctl_name = CTL_UNNUMBERED, 312 .ctl_name = CTL_UNNUMBERED,
@@ -319,6 +320,7 @@ static struct ctl_table xfrm6_policy_table[] = {
319}; 320};
320 321
321static struct ctl_table_header *sysctl_hdr; 322static struct ctl_table_header *sysctl_hdr;
323#endif
322 324
323int __init xfrm6_init(void) 325int __init xfrm6_init(void)
324{ 326{
@@ -345,9 +347,10 @@ int __init xfrm6_init(void)
345 */ 347 */
346 gc_thresh = FIB6_TABLE_HASHSZ * 8; 348 gc_thresh = FIB6_TABLE_HASHSZ * 8;
347 xfrm6_dst_ops.gc_thresh = (gc_thresh < 1024) ? 1024 : gc_thresh; 349 xfrm6_dst_ops.gc_thresh = (gc_thresh < 1024) ? 1024 : gc_thresh;
348 350#ifdef CONFIG_SYSCTL
349 sysctl_hdr = register_net_sysctl_table(&init_net, net_ipv6_ctl_path, 351 sysctl_hdr = register_net_sysctl_table(&init_net, net_ipv6_ctl_path,
350 xfrm6_policy_table); 352 xfrm6_policy_table);
353#endif
351out: 354out:
352 return ret; 355 return ret;
353out_policy: 356out_policy:
@@ -357,8 +360,10 @@ out_policy:
357 360
358void xfrm6_fini(void) 361void xfrm6_fini(void)
359{ 362{
363#ifdef CONFIG_SYSCTL
360 if (sysctl_hdr) 364 if (sysctl_hdr)
361 unregister_net_sysctl_table(sysctl_hdr); 365 unregister_net_sysctl_table(sysctl_hdr);
366#endif
362 //xfrm6_input_fini(); 367 //xfrm6_input_fini();
363 xfrm6_policy_fini(); 368 xfrm6_policy_fini();
364 xfrm6_state_fini(); 369 xfrm6_state_fini();