netfilter: conntrack: restore IPS_CONFIRMED out of nf_conntrack_hash_check_insert()
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 18 Apr 2023 21:31:26 +0000 (23:31 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 19 Apr 2023 08:07:59 +0000 (10:07 +0200)
commit2cdaa3eefed83082923cf219c8b6a314e622da74
tree0a1a923ba40879e7603b4c097ea197572de0b9b6
parent92e8c732d8518588ac34b4cb3feaf37d2cb87555
netfilter: conntrack: restore IPS_CONFIRMED out of nf_conntrack_hash_check_insert()

e6d57e9ff0ae ("netfilter: conntrack: fix rmmod double-free race")
consolidates IPS_CONFIRMED bit set in nf_conntrack_hash_check_insert().
However, this breaks ctnetlink:

 # conntrack -I -p tcp --timeout 123 --src 1.2.3.4 --dst 5.6.7.8 --state ESTABLISHED --sport 1 --dport 4 -u SEEN_REPLY
 conntrack v1.4.6 (conntrack-tools): Operation failed: Device or resource busy

This is a partial revert of the aforementioned commit to restore
IPS_CONFIRMED.

Fixes: e6d57e9ff0ae ("netfilter: conntrack: fix rmmod double-free race")
Reported-by: Stéphane Graber <stgraber@stgraber.org>
Tested-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_bpf.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c