OSDN Git Service

netfilter: conntrack: reduce timeout when receiving out-of-window fin or rst
authorFlorian Westphal <fw@strlen.de>
Fri, 26 Aug 2022 13:32:27 +0000 (15:32 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 7 Sep 2022 14:46:03 +0000 (16:46 +0200)
commit628d694344a02a428846643791e8b26071b76328
treed528301b8fb59ad2946c266c3bd333701ad4ee0a
parent09a59001b0d6417214c86b69263f6b8981c7c2db
netfilter: conntrack: reduce timeout when receiving out-of-window fin or rst

In case the endpoints and conntrack go out-of-sync, i.e. there is
disagreement wrt. validy of sequence/ack numbers between conntracks
internal state and those of the endpoints, connections can hang for a
long time (until ESTABLISHED timeout).

This adds a check to detect a fin/fin exchange even if those are
invalid.  The timeout is then lowered to UNACKED (default 300s).

Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nf_conntrack_proto_tcp.c