OSDN Git Service

selftest: netfilter: add test case for unreplied tcp connections
authorFlorian Westphal <fw@strlen.de>
Thu, 24 Jun 2021 10:36:41 +0000 (12:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 2 Jul 2021 00:05:59 +0000 (02:05 +0200)
commit37d220b58d52d6da88b928e11bffd83f88c6ac79
treea5f08597cfca3fc37f7704bf713dcc56b2482250
parent5140aaa4604ba96685dc04b4d2dde3384bbaecef
selftest: netfilter: add test case for unreplied tcp connections

TCP connections in UNREPLIED state (only SYN seen) can be kept alive
indefinitely, as each SYN re-sets the timeout.

This means that even if a peer has closed its socket the entry
never times out.

This also prevents re-evaluation of configured NAT rules.
Add a test case that sets SYN timeout to 10 seconds, then check
that the nat redirection added later eventually takes effect.

This is based off a repro script from Antonio Ojea.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/netfilter/Makefile
tools/testing/selftests/netfilter/conntrack_tcp_unreplied.sh [new file with mode: 0755]