]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
netfilter: nf_conntrack_tcp: preserve liberal flag in tcp options
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 21 Mar 2022 10:38:32 +0000 (11:38 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:39:34 +0000 (14:39 +0200)
commit90132df59ec860188b2df9137e1a3ecc1ef584ce
treed9ad7a0f240040c3ba162dc5de43f08ff6dea66f
parentb8ed10104dbf5c2defa5a7cecf8a3646229d1cf8
netfilter: nf_conntrack_tcp: preserve liberal flag in tcp options

BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit f2dd495a8d589371289981d5ed33e6873df94ecc ]

Do not reset IP_CT_TCP_FLAG_BE_LIBERAL flag in out-of-sync scenarios
coming before the TCP window tracking, otherwise such connections will
fail in the window check.

Update tcp_options() to leave this flag in place and add a new helper
function to reset the tcp window state.

Based on patch from Sven Auhagen.

Fixes: c4832c7bbc3f ("netfilter: nf_ct_tcp: improve out-of-sync situation in TCP tracking")
Tested-by: Sven Auhagen <sven.auhagen@voleatech.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 6195af5ad80198d43e8ec969d06731db2368c4c3)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/netfilter/nf_conntrack_proto_tcp.c