mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
netfilter: conntrack: skip identical origin tuple in same zone only
[ Upstream commit07998281c2] The origin skip check needs to re-test the zone. Else, we might skip a colliding tuple in the reply direction. This only occurs when using 'directional zones' where origin tuples reside in different zones but the reply tuples share the same zone. This causes the new conntrack entry to be dropped at confirmation time because NAT clash resolution was elided. Fixes:4e35c1cb94("netfilter: nf_nat: skip nat clash resolution for same-origin entries") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7ee20fd8a8
commit
540b8955b6
@@ -903,7 +903,8 @@ nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
|
||||
* Let nf_ct_resolve_clash() deal with this later.
|
||||
*/
|
||||
if (nf_ct_tuple_equal(&ignored_conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
|
||||
&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple))
|
||||
&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple) &&
|
||||
nf_ct_zone_equal(ct, zone, IP_CT_DIR_ORIGINAL))
|
||||
continue;
|
||||
|
||||
NF_CT_STAT_INC_ATOMIC(net, found);
|
||||
|
||||
Reference in New Issue
Block a user