From: Ralf Lici <ralf@mandelbit.com>
To: nicolas.dichtel@6wind.com
Cc: Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, ipsec@lists.linux.dev,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH ipsec v2 2/2] selftests: net: add a test for xfrm policy removal
Date: Mon, 30 Nov 2026 17:53:35 +0100 [thread overview]
Message-ID: <20261130165336.530556-1-ralf@mandelbit.com> (raw)
In-Reply-To: <cf320eca-ea8c-4672-9b45-d812fcaf242f@6wind.com>
On Mon, 30 Nov 2026 11:14:53 +0100, Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
> Le 27/11/2026 à 17:48, Ralf Lici a écrit :> Check that a connected UDP socket
> > + ip -n "$NS" addr add "$SRC/$plen" dev dummy0 nodad
> Putting nodad for IPv6 only would avoid a warning on IPv4.
>
> > +
> > + # The SA that the ESP policy requires. Its packet counter tells
> > + # which datagrams were encrypted.
> > + ip -n "$NS" xfrm state add src "$SRC" dst "$DST" proto esp spi 0x1000 \
> > + reqid 1 mode transport aead 'rfc4106(gcm(aes))' "$KEY" 128 ||
> > + return "$ksft_skip"
> > + if [ "$mode" = flush ]; then
> > + # A flush also removes the ESP policy, so rely on the output
> > + # default instead.
> > + ip -n "$NS" xfrm policy setdefault in accept fwd accept \
> > + out block || return "$ksft_skip"
> > + else
> > + ip -n "$NS" xfrm policy add src "$SRC" dst "$DST" dir out \
> > + priority 100 tmpl src "$SRC" dst "$DST" proto esp \
> > + reqid 1 mode transport
> > + fi
> > + # The allow policy, which takes precedence for the test port.
> > + if [ "$mode" = expire ]; then
> > + limit=(limit time-hard 1)
> I wonder whether a 1-second delay could make the test flappy on a slow system.
> Maybe time-hard 3 with slowwait 10 would be more robust.
>
> Regards,
> Nicolas
>
Thanks, I'll pass nodad for IPv6 only and use time-hard 3 with slowwait
10 in v3, as you suggested.
--
Ralf Lici
Mandelbit Srl
prev parent reply other threads:[~2026-11-30 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 16:48 [PATCH ipsec v2 0/2] xfrm: advance the route generation when policies are removed Ralf Lici
2026-11-27 16:48 ` [PATCH ipsec v2 1/2] " Ralf Lici
2026-11-30 10:08 ` Nicolas Dichtel
2026-11-30 16:51 ` Ralf Lici
2026-11-27 16:48 ` [PATCH ipsec v2 2/2] selftests: net: add a test for xfrm policy removal Ralf Lici
2026-11-30 10:14 ` Nicolas Dichtel
2026-11-30 16:53 ` Ralf Lici [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=20261130165336.530556-1-ralf@mandelbit.com \
--to=ralf@mandelbit.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=ipsec@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=willemb@google.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
all inboxes | Powered by JetHome®