From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netfilter-devel@vger.kernel.org, Yi Chen <yiche@redhat.com>,
Florian Westphal <fw@strlen.de>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH nf] selftests: nft_nat: ensuring the listening side is up before starting the client
Date: Wed, 1 Mar 2023 17:23:43 +0100 [thread overview]
Message-ID: <Y/98D2kGsPYW5/X4@salvia> (raw)
In-Reply-To: <20230227093646.1066666-1-liuhangbin@gmail.com>
On Mon, Feb 27, 2023 at 05:36:46PM +0800, Hangbin Liu wrote:
> The test_local_dnat_portonly() function initiates the client-side as
> soon as it sets the listening side to the background. This could lead to
> a race condition where the server may not be ready to listen. To ensure
> that the server-side is up and running before initiating the
> client-side, a delay is introduced to the test_local_dnat_portonly()
> function.
>
> Before the fix:
> # ./nft_nat.sh
> PASS: netns routing/connectivity: ns0-rthlYrBU can reach ns1-rthlYrBU and ns2-rthlYrBU
> PASS: ping to ns1-rthlYrBU was ip NATted to ns2-rthlYrBU
> PASS: ping to ns1-rthlYrBU OK after ip nat output chain flush
> PASS: ipv6 ping to ns1-rthlYrBU was ip6 NATted to ns2-rthlYrBU
> 2023/02/27 04:11:03 socat[6055] E connect(5, AF=2 10.0.1.99:2000, 16): Connection refused
> ERROR: inet port rewrite
>
> After the fix:
> # ./nft_nat.sh
> PASS: netns routing/connectivity: ns0-9sPJV6JJ can reach ns1-9sPJV6JJ and ns2-9sPJV6JJ
> PASS: ping to ns1-9sPJV6JJ was ip NATted to ns2-9sPJV6JJ
> PASS: ping to ns1-9sPJV6JJ OK after ip nat output chain flush
> PASS: ipv6 ping to ns1-9sPJV6JJ was ip6 NATted to ns2-9sPJV6JJ
> PASS: inet port rewrite without l3 address
Applied, thanks
prev parent reply other threads:[~2023-03-01 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 9:36 [PATCH nf] selftests: nft_nat: ensuring the listening side is up before starting the client Hangbin Liu
2023-03-01 16:23 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y/98D2kGsPYW5/X4@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=yiche@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).