Skip to content
Commit ed07d9a0 authored by Martynas Pumputis's avatar Martynas Pumputis Committed by Pablo Neira Ayuso
Browse files

netfilter: nf_conntrack: resolve clash for matching conntracks



This patch enables the clash resolution for NAT (disabled in
"590b52e1") if clashing conntracks match (i.e. both tuples are equal)
and a protocol allows it.

The clash might happen for a connections-less protocol (e.g. UDP) when
two threads in parallel writes to the same socket and consequent calls
to "get_unique_tuple" return the same tuples (incl. reply tuples).

In this case it is safe to perform the resolution, as the losing CT
describes the same mangling as the winning CT, so no modifications to
the packet are needed, and the result of rules traversal for the loser's
packet stays valid.

Signed-off-by: default avatarMartynas Pumputis <martynas@weave.works>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 5c789e13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment