Skip to content

Commit 4f53652

Browse files
kaberdavem330
authored andcommitted
[NETFILTER]: kill nf_sysctl.c
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>
1 parent 86c0bf4 commit 4f53652

4 files changed

Lines changed: 19 additions & 26 deletions

File tree

‎net/ipv4/netfilter.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,13 @@ static void ipv4_netfilter_fini(void)
211211

212212
module_init(ipv4_netfilter_init);
213213
module_exit(ipv4_netfilter_fini);
214+
215+
#ifdef CONFIG_SYSCTL
216+
struct ctl_path nf_net_ipv4_netfilter_sysctl_path[] = {
217+
{ .procname = "net", .ctl_name = CTL_NET, },
218+
{ .procname = "ipv4", .ctl_name = NET_IPV4, },
219+
{ .procname = "netfilter", .ctl_name = NET_IPV4_NETFILTER, },
220+
{ }
221+
};
222+
EXPORT_SYMBOL_GPL(nf_net_ipv4_netfilter_sysctl_path);
223+
#endif /* CONFIG_SYSCTL */

‎net/netfilter/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ nf_conntrack-y := nf_conntrack_core.o nf_conntrack_standalone.o nf_conntrack_exp
44
nf_conntrack-$(CONFIG_NF_CONNTRACK_EVENTS) += nf_conntrack_ecache.o
55

66
obj-$(CONFIG_NETFILTER) = netfilter.o
7-
obj-$(CONFIG_SYSCTL) += nf_sysctl.o
87

98
obj-$(CONFIG_NETFILTER_NETLINK) += nfnetlink.o
109
obj-$(CONFIG_NETFILTER_NETLINK_QUEUE) += nfnetlink_queue.o

‎net/netfilter/core.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,12 @@ void __init netfilter_init(void)
272272
if (netfilter_log_init() < 0)
273273
panic("cannot initialize nf_log");
274274
}
275+
276+
#ifdef CONFIG_SYSCTL
277+
struct ctl_path nf_net_netfilter_sysctl_path[] = {
278+
{ .procname = "net", .ctl_name = CTL_NET, },
279+
{ .procname = "netfilter", .ctl_name = NET_NETFILTER, },
280+
{ }
281+
};
282+
EXPORT_SYMBOL_GPL(nf_net_netfilter_sysctl_path);
283+
#endif /* CONFIG_SYSCTL */

‎net/netfilter/nf_sysctl.c‎

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)