From: Guillaume Nault <gnault@redhat.com>
To: David Ahern <dsahern@kernel.org>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/4] selftests: fcnal: Test SO_DONTROUTE on TCP sockets.
Date: Wed, 10 May 2023 00:36:16 +0200 [thread overview]
Message-ID: <ZFrK4CXsCrfmBG7T@debian> (raw)
In-Reply-To: <20230509153246.GA26485@u2004-local>
On Tue, May 09, 2023 at 09:32:46AM -0600, David Ahern wrote:
> On Tue, May 09, 2023 at 02:02:37PM +0200, Guillaume Nault wrote:
> > diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
> > index 21ca91473c09..1f8939fbb021 100755
> > --- a/tools/testing/selftests/net/fcnal-test.sh
> > +++ b/tools/testing/selftests/net/fcnal-test.sh
> > @@ -1098,6 +1098,73 @@ test_ipv4_md5_vrf__global_server__bind_ifindex0()
> > set_sysctl net.ipv4.tcp_l3mdev_accept="$old_tcp_l3mdev_accept"
> > }
> >
> > +ipv4_tcp_dontroute()
> > +{
> > + local syncookies=$1
> > + local nsa_syncookies
> > + local nsb_syncookies
> > + local a
> > +
> > + #
> > + # Link local connection tests (SO_DONTROUTE).
> > + # Connections should succeed only when the remote IP address is
> > + # on link (doesn't need to be routed through a gateway).
> > + #
> > +
> > + nsa_syncookies=$(ip netns exec "${NSA}" sysctl -n net.ipv4.tcp_syncookies)
> > + nsb_syncookies=$(ip netns exec "${NSB}" sysctl -n net.ipv4.tcp_syncookies)
> > + ip netns exec "${NSA}" sysctl -wq net.ipv4.tcp_syncookies=${syncookies}
> > + ip netns exec "${NSB}" sysctl -wq net.ipv4.tcp_syncookies=${syncookies}
> > +
> > + # Test with eth1 address (on link).
> > +
> > + a=${NSB_IP}
> > + log_start
> > + run_cmd_nsb nettest -s &
> > + sleep 1
>
> rather than propagate the sleep for new tests, you try adding these
> tests using a single nettest instance that takes both server and client
> arguments and does the netns switch internally.
Okay. That also means adding more options to nettest, to independently
set SO_DONTROUTE on the server or on the client. We're getting short of
one letter options, so I'll probably use long ones.
next prev parent reply other threads:[~2023-05-09 22:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 12:02 [PATCH net-next 0/4] selftests: fcnal: Test SO_DONTROUTE socket option Guillaume Nault
2023-05-09 12:02 ` [PATCH net-next 1/4] selftests: Add SO_DONTROUTE option to nettest Guillaume Nault
2023-05-09 15:34 ` David Ahern
2023-05-09 12:02 ` [PATCH net-next 2/4] selftests: fcnal: Test SO_DONTROUTE on TCP sockets Guillaume Nault
2023-05-09 15:32 ` David Ahern
2023-05-09 22:36 ` Guillaume Nault [this message]
2023-05-09 12:02 ` [PATCH net-next 4/4] selftests: fcnal: Test SO_DONTROUTE on raw and ping sockets Guillaume Nault
2023-05-09 12:02 ` [PATCH net-next 3/4] selftests: fcnal: Test SO_DONTROUTE on UDP sockets Guillaume Nault
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=ZFrK4CXsCrfmBG7T@debian \
--to=gnault@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.