diff options
author | Gao feng <gaofeng@cn.fujitus.com> | 2012-05-28 17:04:09 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-06-07 08:58:39 -0400 |
commit | 2c352f444ccfa966a1aa4fd8e9ee29381c467448 (patch) | |
tree | befcba86ddf2cdbd73d15e1e2620439158c8e2f4 /include/net/netns | |
parent | fdb694a01f1fcd30fd16d8aa290c34699fe98a17 (diff) |
netfilter: nf_conntrack: prepare namespace support for l4 protocol trackers
This patch prepares the namespace support for layer 4 protocol trackers.
Basically, this modifies the following interfaces:
* nf_ct_[un]register_sysctl
* nf_conntrack_l4proto_[un]register
to include the namespace parameter. We still use init_net in this patch
to prepare the ground for follow-up patches for each layer 4 protocol
tracker.
We add a new net_id field to struct nf_conntrack_l4proto that is used
to store the pernet_operations id for each layer 4 protocol tracker.
Note that AF_INET6's protocols do not need to do sysctl compat. Thus,
we only register compat sysctl when l4proto.l3proto != AF_INET6.
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netns')
-rw-r--r-- | include/net/netns/conntrack.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index a053a19870cf..1f53038b0d1b 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
@@ -8,6 +8,18 @@ | |||
8 | struct ctl_table_header; | 8 | struct ctl_table_header; |
9 | struct nf_conntrack_ecache; | 9 | struct nf_conntrack_ecache; |
10 | 10 | ||
11 | struct nf_proto_net { | ||
12 | #ifdef CONFIG_SYSCTL | ||
13 | struct ctl_table_header *ctl_table_header; | ||
14 | struct ctl_table *ctl_table; | ||
15 | #ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT | ||
16 | struct ctl_table_header *ctl_compat_header; | ||
17 | struct ctl_table *ctl_compat_table; | ||
18 | #endif | ||
19 | #endif | ||
20 | unsigned int users; | ||
21 | }; | ||
22 | |||
11 | struct netns_ct { | 23 | struct netns_ct { |
12 | atomic_t count; | 24 | atomic_t count; |
13 | unsigned int expect_count; | 25 | unsigned int expect_count; |