netfilter: nft_flow_offload: skip tcp rst and fin packets
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 13 Aug 2019 15:41:13 +0000 (17:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:33:44 +0000 (10:33 +0100)
commita54fa5dff8cdb415757faadb4378d4de72513bfc
tree4e3c34e51093937d551f5632044c87a9d1a6898b
parent6052090280b86e32b3f44960acdd3f407237776c
netfilter: nft_flow_offload: skip tcp rst and fin packets

[ Upstream commit dfe42be15fde16232340b8b2a57c359f51cc10d9 ]

TCP rst and fin packets do not qualify to place a flow into the
flowtable. Most likely there will be no more packets after connection
closure. Without this patch, this flow entry expires and connection
tracking picks up the entry in ESTABLISHED state using the fixup
timeout, which makes this look inconsistent to the user for a connection
that is actually already closed.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_flow_offload.c