diff options
author | Patrick McHardy <kaber@trash.net> | 2006-11-29 02:35:18 +0100 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-02 21:31:18 -0800 |
commit | 933a41e7e12b773d1dd026018f02b86b5d257a22 (patch) | |
tree | 0a99f7759d2488869f93ba6a0206435bcacca85e /net/netfilter/nf_conntrack_proto_generic.c | |
parent | d62f9ed4a490309bd9e5df0b42ba5d096e7b5902 (diff) | |
download | linux-3.10-933a41e7e12b773d1dd026018f02b86b5d257a22.tar.gz linux-3.10-933a41e7e12b773d1dd026018f02b86b5d257a22.tar.bz2 linux-3.10-933a41e7e12b773d1dd026018f02b86b5d257a22.zip |
[NETFILTER]: nf_conntrack: move conntrack protocol sysctls to individual modules
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/nf_conntrack_proto_generic.c')
-rw-r--r-- | net/netfilter/nf_conntrack_proto_generic.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c index f44811e0b47..15306b95251 100644 --- a/net/netfilter/nf_conntrack_proto_generic.c +++ b/net/netfilter/nf_conntrack_proto_generic.c @@ -17,7 +17,7 @@ #include <linux/netfilter.h> #include <net/netfilter/nf_conntrack_l4proto.h> -unsigned int nf_ct_generic_timeout __read_mostly = 600*HZ; +static unsigned int nf_ct_generic_timeout __read_mostly = 600*HZ; static int generic_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff, @@ -71,6 +71,23 @@ static int new(struct nf_conn *conntrack, const struct sk_buff *skb, return 1; } +#ifdef CONFIG_SYSCTL +static struct ctl_table_header *generic_sysctl_header; +static struct ctl_table generic_sysctl_table[] = { + { + .ctl_name = NET_NF_CONNTRACK_GENERIC_TIMEOUT, + .procname = "nf_conntrack_generic_timeout", + .data = &nf_ct_generic_timeout, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, + { + .ctl_name = 0 + } +}; +#endif /* CONFIG_SYSCTL */ + struct nf_conntrack_l4proto nf_conntrack_l4proto_generic = { .l3proto = PF_UNSPEC, @@ -82,4 +99,8 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_generic = .print_conntrack = generic_print_conntrack, .packet = packet, .new = new, +#ifdef CONFIG_SYSCTL + .ctl_table_header = &generic_sysctl_header, + .ctl_table = generic_sysctl_table, +#endif }; |