Skip to content

netfilter: conntrack: make zone id part of conntrack hash

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5netfilter: conntrack: make connection tracking table less predictablenet/netfilter/nf_conntrack_core.c+11 -60 replies
1/5netfilter: conntrack: make max chain length randomnet/netfilter/nf_conntrack_core.c+11 -60 replies
2/5netfilter: conntrack: include zone id in tuple hash againnet/netfilter/nf_conntrack_core.c+52 -150 replies
3/5netfilter: nat: include zone id in nat table hash againnet/netfilter/nf_nat_core.c+12 -50 replies
4/5selftests: netfilter: add selftest for directional zone supporttools/testing/selftests/netfilter/nft_nat_zones.sh+309 -00 replies
5/5selftests: netfilter: add zone stress test with colliding tuplestools/testing/selftests/netfilter/nft_zones_many.sh+156 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf 0/5] netfilter: conntrack: make zone id part of conntrack hash

This patch set makes the zone id part of the conntrack hash again.

First patch is a followup to
d7e7747ac5c2496c9,
"netfilter: refuse insertion if chain has grown too large".

Instead of a fixed-size limit, allow for some slack in the drop limit. This makes it harder to extract information about hash table collisions/bucket overflows.

Second patch makes the zone id part of the tuple hash again. This was removed six years ago to allow split-zone support.

Last two patches add test cases for zone support with colliding tuples. First test case emulates split zones, where NAT is responsible to expose the overlapping networks and provide unique source ports via nat port translation.

Second test case exercises overlapping tuples in distinct zones.

Expectation is that all connection succeed (first self test) and that all insertions work (second self test).

Florian Westphal (5):
netfilter: conntrack: make connection tracking table less predictable
netfilter: conntrack: include zone id in tuple hash again
netfilter: nat: include zone id in nat table hash again
selftests: netfilter: add selftest for directional zone support
selftests: netfilter: add zone stress test with colliding tuples

 net/netfilter/nf_conntrack_core.c             |  84 +++--
 net/netfilter/nf_nat_core.c                   |  17 +-
 .../selftests/netfilter/nft_nat_zones.sh      | 309 ++++++++++++++++++
 .../selftests/netfilter/nft_zones_many.sh     | 156 +++++++++
 4 files changed, 540 insertions(+), 26 deletions(-)
 create mode 100755 tools/testing/selftests/netfilter/nft_nat_zones.sh
 create mode 100755 tools/testing/selftests/netfilter/nft_zones_many.sh
Signature · 1 line
2.32.0