[NETFILTER]: kill nf_sysctl.c
authorPatrick McHardy <kaber@trash.net>
Tue, 15 Jan 2008 07:48:39 +0000 (23:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:02:40 +0000 (15:02 -0800)
Since there now is generic support for shared sysctl paths, the only
remains are the net/netfilter and net/ipv4/netfilter paths. Move them
to net/netfilter/core.c and net/ipv4/netfilter.c and kill nf_sysctl.c.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter.c
net/netfilter/Makefile
net/netfilter/core.c
net/netfilter/nf_sysctl.c [deleted file]

index 0ed843ed420a9febbfe5c9278edcad7ce1abe782..63221553d26b785f97d85ce0778cf82007643478 100644 (file)
@@ -211,3 +211,13 @@ static void ipv4_netfilter_fini(void)
 
 module_init(ipv4_netfilter_init);
 module_exit(ipv4_netfilter_fini);
+
+#ifdef CONFIG_SYSCTL
+struct ctl_path nf_net_ipv4_netfilter_sysctl_path[] = {
+       { .procname = "net", .ctl_name = CTL_NET, },
+       { .procname = "ipv4", .ctl_name = NET_IPV4, },
+       { .procname = "netfilter", .ctl_name = NET_IPV4_NETFILTER, },
+       { }
+};
+EXPORT_SYMBOL_GPL(nf_net_ipv4_netfilter_sysctl_path);
+#endif /* CONFIG_SYSCTL */
index c910caee0d4f9bb0d15e4c9a7d58457523450fa2..ea7508387f957fcf7327d962ad2340867d8b03ce 100644 (file)
@@ -4,7 +4,6 @@ nf_conntrack-y  := nf_conntrack_core.o nf_conntrack_standalone.o nf_conntrack_exp
 nf_conntrack-$(CONFIG_NF_CONNTRACK_EVENTS) += nf_conntrack_ecache.o
 
 obj-$(CONFIG_NETFILTER) = netfilter.o
-obj-$(CONFIG_SYSCTL) += nf_sysctl.o
 
 obj-$(CONFIG_NETFILTER_NETLINK) += nfnetlink.o
 obj-$(CONFIG_NETFILTER_NETLINK_QUEUE) += nfnetlink_queue.o
index e0263445484afbb3d391ea3aaa2b6a7d7f4fe099..c4065b8f9a95f6abb66242a3c3a9f8a7990da552 100644 (file)
@@ -272,3 +272,12 @@ void __init netfilter_init(void)
        if (netfilter_log_init() < 0)
                panic("cannot initialize nf_log");
 }
+
+#ifdef CONFIG_SYSCTL
+struct ctl_path nf_net_netfilter_sysctl_path[] = {
+       { .procname = "net", .ctl_name = CTL_NET, },
+       { .procname = "netfilter", .ctl_name = NET_NETFILTER, },
+       { }
+};
+EXPORT_SYMBOL_GPL(nf_net_netfilter_sysctl_path);
+#endif /* CONFIG_SYSCTL */
diff --git a/net/netfilter/nf_sysctl.c b/net/netfilter/nf_sysctl.c
deleted file mode 100644 (file)
index d9fcc89..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* nf_sysctl.c netfilter sysctl registration/unregistation
- *
- * Copyright (c) 2006 Patrick McHardy <kaber@trash.net>
- */
-#include <linux/module.h>
-#include <linux/sysctl.h>
-#include <linux/string.h>
-#include <linux/slab.h>
-
-/* net/netfilter */
-struct ctl_path nf_net_netfilter_sysctl_path[] = {
-       { .procname = "net", .ctl_name = CTL_NET, },
-       { .procname = "netfilter", .ctl_name = NET_NETFILTER, },
-       { }
-};
-EXPORT_SYMBOL_GPL(nf_net_netfilter_sysctl_path);
-
-/* net/ipv4/netfilter */
-struct ctl_path nf_net_ipv4_netfilter_sysctl_path[] = {
-       { .procname = "net", .ctl_name = CTL_NET, },
-       { .procname = "ipv4", .ctl_name = NET_IPV4, },
-       { .procname = "netfilter", .ctl_name = NET_IPV4_NETFILTER, },
-       { }
-};
-EXPORT_SYMBOL_GPL(nf_net_ipv4_netfilter_sysctl_path);