summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-08-05 07:32:16 +0400
committerDavid S. Miller <davem@davemloft.net>2009-08-05 07:32:16 +0400
commitdb71789c01ae7b641f83c5aa64e7df25122f4b28 (patch)
treec4002d2ba104b0c7c0a88225c07bed975d2a3c10 /net/ipv6
parentf816700aa9ef1b1e2f984f638cb211e79dcab495 (diff)
downloadlinux-db71789c01ae7b641f83c5aa64e7df25122f4b28.tar.xz
xfrm6: Fix xfrm6_policy.c build when SYSCTL disabled.
Same as how Randy Dunlap fixed the ipv4 side of things. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-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)
xfrm_policy_unregister_afinfo(&xfrm6_policy_afinfo);
}
+#ifdef CONFIG_SYSCTL
static struct ctl_table xfrm6_policy_table[] = {
{
.ctl_name = CTL_UNNUMBERED,
@@ -319,6 +320,7 @@ static struct ctl_table xfrm6_policy_table[] = {
};
static struct ctl_table_header *sysctl_hdr;
+#endif
int __init xfrm6_init(void)
{
@@ -345,9 +347,10 @@ int __init xfrm6_init(void)
*/
gc_thresh = FIB6_TABLE_HASHSZ * 8;
xfrm6_dst_ops.gc_thresh = (gc_thresh < 1024) ? 1024 : gc_thresh;
-
+#ifdef CONFIG_SYSCTL
sysctl_hdr = register_net_sysctl_table(&init_net, net_ipv6_ctl_path,
xfrm6_policy_table);
+#endif
out:
return ret;
out_policy:
@@ -357,8 +360,10 @@ out_policy:
void xfrm6_fini(void)
{
+#ifdef CONFIG_SYSCTL
if (sysctl_hdr)
unregister_net_sysctl_table(sysctl_hdr);
+#endif
//xfrm6_input_fini();
xfrm6_policy_fini();
xfrm6_state_fini();