summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJoe Stringer <joestringer@nicira.com>2015-07-21 21:37:31 -0700
committerSasha Levin <sasha.levin@oracle.com>2015-10-27 22:13:34 -0400
commitf17d9f15f635251d811f5fbc319c114b9be2790f (patch)
tree181ac9734d273e36b5fe7c166672b12a8439bad2 /net
parent3ad1bd820510a4018d4f9d6a6748ff35415f3b58 (diff)
netfilter: nf_conntrack: Support expectations in different zones
[ Upstream commit 4b31814d20cbe5cd4ccf18089751e77a04afe4f2 ] When zones were originally introduced, the expectation functions were all extended to perform lookup using the zone. However, insertion was not modified to check the zone. This means that two expectations which are intended to apply for different connections that have the same tuple but exist in different zones cannot both be tracked. Fixes: 5d0aa2ccd4 (netfilter: nf_conntrack: add support for "conntrack zones") Signed-off-by: Joe Stringer <joestringer@nicira.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_expect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index 91a1837acd0e..26af45193ab7 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -219,7 +219,8 @@ static inline int expect_clash(const struct nf_conntrack_expect *a,
a->mask.src.u3.all[count] & b->mask.src.u3.all[count];
}
- return nf_ct_tuple_mask_cmp(&a->tuple, &b->tuple, &intersect_mask);
+ return nf_ct_tuple_mask_cmp(&a->tuple, &b->tuple, &intersect_mask) &&
+ nf_ct_zone(a->master) == nf_ct_zone(b->master);
}
static inline int expect_matches(const struct nf_conntrack_expect *a,