On Mon, 30 Nov 2026 11:14:53 +0100, Nicolas Dichtel <nico…@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