diff options
author | Patrick McHardy <kaber@trash.net> | 2007-07-08 05:31:32 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 05:17:55 (GMT) |
commit | d4156e8cd93f5772483928aaf4960120caebd789 (patch) | |
tree | e740e629df29d8ea1ad21244998851362b64a70e /net/netfilter/nf_conntrack_helper.c | |
parent | df43b4e7ca46952756b2fc039ed80469b1bff62d (diff) | |
download | linux-fsl-qoriq-d4156e8cd93f5772483928aaf4960120caebd789.tar.xz |
[NETFILTER]: nf_conntrack: reduce masks to a subset of tuples
Since conntrack currently allows to use masks for every bit of both
helper and expectation tuples, we can't hash them and have to keep
them on two global lists that are searched for every new connection.
This patch removes the never used ability to use masks for the
destination part of the expectation tuple and completely removes
masks from helpers since the only reasonable choice is a full
match on l3num, protonum and src.u.all.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/nf_conntrack_helper.c')
-rw-r--r-- | net/netfilter/nf_conntrack_helper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c index 89a5f73..fdabf82 100644 --- a/net/netfilter/nf_conntrack_helper.c +++ b/net/netfilter/nf_conntrack_helper.c @@ -34,9 +34,10 @@ struct nf_conntrack_helper * __nf_ct_helper_find(const struct nf_conntrack_tuple *tuple) { struct nf_conntrack_helper *h; + struct nf_conntrack_tuple_mask mask = { .src.u.all = htons(0xFFFF) }; list_for_each_entry(h, &helpers, list) { - if (nf_ct_tuple_mask_cmp(tuple, &h->tuple, &h->mask)) + if (nf_ct_tuple_src_mask_cmp(tuple, &h->tuple, &mask)) return h; } return NULL; |