diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-03-22 18:40:01 -0400 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-03-22 19:52:01 -0400 |
| commit | c1ebd7dff700277e4d0a3da36833a406142e31d4 (patch) | |
| tree | fbcfed48280d81744fe77efebb91900c7db1c776 /include/net | |
| parent | a0f65a267dd62aef4e003f833ea6290fd1e07b34 (diff) | |
netfilter: cttimeout: fix dependency with l4protocol conntrack module
This patch introduces nf_conntrack_l4proto_find_get() and
nf_conntrack_l4proto_put() to fix module dependencies between
timeout objects and l4-protocol conntrack modules.
Thus, we make sure that the module cannot be removed if it is
used by any of the cttimeout objects.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/netfilter/nf_conntrack_l4proto.h | 4 | ||||
| -rw-r--r-- | include/net/netfilter/nf_conntrack_timeout.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index 90c67c7db7e9..3b572bb20aa2 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h | |||
| @@ -118,6 +118,10 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_generic; | |||
| 118 | extern struct nf_conntrack_l4proto * | 118 | extern struct nf_conntrack_l4proto * |
| 119 | __nf_ct_l4proto_find(u_int16_t l3proto, u_int8_t l4proto); | 119 | __nf_ct_l4proto_find(u_int16_t l3proto, u_int8_t l4proto); |
| 120 | 120 | ||
| 121 | extern struct nf_conntrack_l4proto * | ||
| 122 | nf_ct_l4proto_find_get(u_int16_t l3proto, u_int8_t l4proto); | ||
| 123 | extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); | ||
| 124 | |||
| 121 | /* Protocol registration. */ | 125 | /* Protocol registration. */ |
| 122 | extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); | 126 | extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); |
| 123 | extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); | 127 | extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); |
diff --git a/include/net/netfilter/nf_conntrack_timeout.h b/include/net/netfilter/nf_conntrack_timeout.h index 0e04db4a0865..34ec89f8dbf9 100644 --- a/include/net/netfilter/nf_conntrack_timeout.h +++ b/include/net/netfilter/nf_conntrack_timeout.h | |||
| @@ -15,7 +15,7 @@ struct ctnl_timeout { | |||
| 15 | atomic_t refcnt; | 15 | atomic_t refcnt; |
| 16 | char name[CTNL_TIMEOUT_NAME_MAX]; | 16 | char name[CTNL_TIMEOUT_NAME_MAX]; |
| 17 | __u16 l3num; | 17 | __u16 l3num; |
| 18 | __u8 l4num; | 18 | struct nf_conntrack_l4proto *l4proto; |
| 19 | char data[0]; | 19 | char data[0]; |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
