Article View: linux.kernel.netdev
Article #24698Re: [PATCH ipsec v2 2/2] selftests: net: add a test for xfrm policy removal
From: Ralf Lici
Date: Mon, 30 Nov 2026 16:53
Date: Mon, 30 Nov 2026 16:53
38 lines
10739 bytes
10739 bytes
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
Technical Details
Message-ID:
<20261130165336.530556-1-ralf@mandelbit.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374326-linux-kernel-netdev=dewy.ruReferences:
<cover.1795797791.git.ralf@mandelbit.com> <467acfb25f93252b01f9f096037ae248b8826a56.1795797791.git.ralf@mandelbit.com> <cf320eca-ea8c-4672-9b45-d812fcaf242f@6wind.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374326-linux-kernel-netdev=dewy.ru From: ralf@mandelbit.com (Ralf Lici) Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <20261130165336.530556-1-ralf@mandelbit.com> References: <cover.1795797791.git.ralf@mandelbit.com> <467acfb25f93252b01f9f096037ae248b8826a56.1795797791.git.ralf@mandelbit.com> <cf320eca-ea8c-4672-9b45-d812fcaf242f@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1474566"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:B+WV0PhltDKXAAvSDb1cCuCuohI= sha256:4gtk4nnCYwUrXdjaMMLhA8wLcrHVPcHYY/sajENePX4= sha1:zu3cBOaY5qrF1oDfss7zQyBnniA= sha256:uU23P+CrzS5Gh0emDKkS57nfXYLD9yegzG+V/AYAYk4= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 53BB5125FF6; Mon, 30 Nov 2026 19:54:13 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.151 X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=mandelbit.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G9jznOSQKD-G; Mon, 30 Nov 2026 19:54:10 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374326-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id F2278125FF3; Mon, 30 Nov 2026 19:53:59 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 76BD52731C; Mon, 30 Nov 2026 16:53:58 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796057637; b=PIypG9tx1zhwTzb1pEyt5mjYONkTOFMYh09polIVYnKpKnD9wD+JjHkwBc1OQbH2pSnU bxQ1ps6kx+iJccBeU+8kSaILHJfLe46ZrMxcRYLD3aUDP4tPkJz6ov5Qb26veNyqTfYJQ jEwsF7Xs8AFLsnn7Ig2RcxuhbJXLQgywEPawRQhADnVBZFz+cOgs1gSOzkTORTNXyc57G fD+7ydfYEX4C9sGmRk/UJgmZX2QqlAjYpkUzPUboHO9t+9OMNAIf9SZuu9DdVi5KcIZoM V1eQe1c4o2D6gsSf/N2yhVXupn6T1kMgM6qikQ92hr2nQEFodqGHTl7WK+j0tVsllbg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796057637; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=3LVHBP2SeiJgnmkMSrqPxsQDDL2oA+Iam1mZi8mSv0c=; b=YU2uZfgsz+wn/GY5P+OifQ/y4yqSruv/i8ER+NZWXZzvsH5RfHfQXIsweuC6YX7NaqoK 4iua3P/cLfc3OWBkgc8xpaptwsj6Q1ldCvkehVEgrr3tX7FGH9iDuiyS59VBawATCPKBh 7ha0leMj43UkcplCWH19cSSeTah9SfUPENMPGY18fgAS4RZRvd2aBo9+aHXA1iXKcbr7H ninC6AwNGHQ41Xu8bc6VU5ZjB0P4vhSJsYUghjAsBiD5CvP/XbrVCJ2UDKf3Vqn7Suwo1 KwV2WcGtAdIFl/QFA4hXp52DxuEtLtUXC6jgytDfn3yiAVB2bRx/hn56cR6ePN+9/eg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=fmd5nqvn; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 558BB606A334; Mon, 30 Nov 2026 16:53:57 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=fmd5nqvn X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.55 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796057636; b=gOIJ75QrMFr5yyKcay62RmkiypIQOK71df903DOgNqAW2uE2yTN936JWWAOt91FICniU rIL1Hu5IylTrBc6J7Y0kRkd6q7qQIe2ugH7Dh9HCQscYOBsvqPLU1f5q7zJftlyPHiu5F FcupEmynca+V1DnT6QxrRZoRWwmOUkxiktBgWiJrQEZtS5XvYNRWfczxcQTD0RrAwyXEB Cu+5JB7vrOnfn7dhfWBkF3qAQg0LLYgHTDnnX5ImgXeXH0zy7FFchrtqUMwLYCEzosdrp QJgDtsDli2lCtL9cKll4qe6B1S+k18DEdUkIJMFUmwrQuTEf9thNEKaM3f3JuqR5gAQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796057636; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=3LVHBP2SeiJgnmkMSrqPxsQDDL2oA+Iam1mZi8mSv0c=; b=QhZBFNkrr0YedaRkfZuMaJXkxMPbaq4l0d2EUXOh37B/lSOjyJMrogZzjs55XjeARe15 9gkaksvXNjXUo4n/2DEs0FK2BhP+MQF6afK4VkHVXcrJ14fxUib/4XSpoNqWqnwcY7kTh 3iUk2RL9UwxYtjdmoiXyZgcPebJhS5kd3YQoguHSJVlunzwxWD0NADI2Mnj15wYBY5mbu WhvT5T0bblNMCfWS85BZlBZwhaP3pvHGJ5/Auq50+64LGB44tE7hrU7W3KYKGaI9dCqIg tlNzriuN7wLDc//LdOVqM0FvakjFyv3N/DwaO2Vz89GTT2gUZ/NbQQNGFclEyaJW3OQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=fmd5nqvn; arc=none smtp.remote-ip=195.10.208.55 X-Received: from mout-b-110.mailbox.org (mout-b-110.mailbox.org [195.10.208.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C496E606A325; Mon, 30 Nov 2026 16:53:55 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C496E606A325 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com X-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-110.mailbox.org (Postfix) with ESMTPS id 4jdVTk1f94zNlDX; Mon, 30 Nov 2026 17:53:46 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796057626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3LVHBP2SeiJgnmkMSrqPxsQDDL2oA+Iam1mZi8mSv0c=; b=fmd5nqvnlLhw04eW9b4tu0EUd2Sz5CjAu3/OG9i+VzqUvBI3n2OaJbynie4vLkv5wPaC0u wxdcdBZB15G+m4unpDkHwdZ8FFI4x62sf88GTulCDhirbgSAB0lBgYVkQUnqFT3RdN3uCu SIx5WDrLQeW8Y9tvJfaPkqnXFbriaTm8WxQHi19FzfXiswD9lI4g63tt4WXKpXjBe7orGS bAangz9LNgTXfUIXTR3VhSjgw3BMQMjn57gCKpnPrvBLvhRce4FIjuiZ2qNhRVHaOZuYuT 4LFYYUoBAL/MTEGYLNSbqwsw4BNhm+0nUpipMU5CSfHmX0+tDdlPMeie5d4+uQ== X-Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of ralf@mandelbit.com designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=ralf@mandelbit.com X-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 X-Mailer: git-send-email 2.56.1 X-In-Reply-To: <cf320eca-ea8c-4672-9b45-d812fcaf242f@6wind.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Rspamd-Queue-Id: 4jdVTk1f94zNlDX X-Received-Bytes: 10480