summaryrefslogtreecommitdiff
path: root/net/netfilter/xt_CT.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-03-22 23:40:01 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2012-03-23 00:52:01 +0100
commitc1ebd7dff700277e4d0a3da36833a406142e31d4 (patch)
treefbcfed48280d81744fe77efebb91900c7db1c776 /net/netfilter/xt_CT.c
parenta0f65a267dd62aef4e003f833ea6290fd1e07b34 (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 'net/netfilter/xt_CT.c')
-rw-r--r--net/netfilter/xt_CT.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index b873445df444..80c39f0f6e91 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -16,6 +16,7 @@
#include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_helper.h>
#include <net/netfilter/nf_conntrack_ecache.h>
+#include <net/netfilter/nf_conntrack_l4proto.h>
#include <net/netfilter/nf_conntrack_timeout.h>
#include <net/netfilter/nf_conntrack_zones.h>
@@ -243,11 +244,12 @@ static int xt_ct_tg_check_v1(const struct xt_tgchk_param *par)
info->timeout, timeout->l3num);
goto err3;
}
- if (timeout->l4num != e->ip.proto) {
+ if (timeout->l4proto->l4proto != e->ip.proto) {
ret = -EINVAL;
pr_info("Timeout policy `%s' can only be "
"used by L4 protocol number %d\n",
- info->timeout, timeout->l4num);
+ info->timeout,
+ timeout->l4proto->l4proto);
goto err3;
}
timeout_ext = nf_ct_timeout_ext_add(ct, timeout,