kernel-ark/net/netfilter/nf_sysctl.c
Pavel Emelyanov b3fd3ffe39 [NETFILTER]: Use the ctl paths instead of hand-made analogue
The conntracks subsystem has a similar infrastructure
to maintain ctl_paths, but since we already have it
on the generic level, I think it's OK to switch to
using it.

So, basically, this patch just replaces the ctl_table-s
with ctl_path-s, nf_register_sysctl_table with
register_sysctl_paths() and removes no longer needed code.

After this the net/netfilter/nf_sysctl.c file contains
the paths only.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:01:11 -08:00

26 lines
758 B
C

/* 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);