Skip to content

netfilter: untracked object removal

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netfilter: kill the fake untracked conntrack objectsinclude/net/ip_vs.h include/net/netfilter/nf_conntrack.h include/uapi/linux/netfilter/nf_conntrack_common.h +9 more+39 -920 replies
2/2netfilter: remove nf_ct_is_untrackedinclude/net/ip_vs.h include/net/netfilter/nf_conntrack.h include/net/netfilter/nf_conntrack_core.h +13 more+17 -480 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-next 0/2] netfilter: untracked object removal

These patches remove the percpu untracked objects, they get replaced with a new (kernel internal) ctinfo state.

This avoids reference counter operations for untracked packets and removes the need to check a conntrack for the UNTRACKED status bit before setting connmark, labels, etc.

I checked with following rule set and things appear to work as expected (i.e., ssh connections don't show up in conntrack -L):

*raw
:PREROUTING ACCEPT [455:34825]
:OUTPUT ACCEPT [251:29555]
[775:63699] -A PREROUTING -p tcp -m tcp --dport 22 -j NOTRACK
[251:29555] -A OUTPUT -p tcp -m tcp --sport 22 -j NOTRACK
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
[0:0] -A INPUT -m conntrack --ctstate INVALID -j DROP
[337:26377] -A INPUT -p tcp -m conntrack --ctstate UNTRACKED -m tcp --dport 22 -j ACCEPT [0:0] -A INPUT -m conntrack --ctstate UNTRACKED
[102:13883] -A OUTPUT -p tcp -m conntrack --ctstate UNTRACKED -m tcp --sport 22 -j ACCEPT [0:0] -A OUTPUT -m conntrack --ctstate UNTRACKED
COMMIT