Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E393E654 for ; Mon, 28 Aug 2023 03:06:45 +0000 (UTC) Received: from 167-179-156-38.a7b39c.syd.nbn.aussiebb.net (167-179-156-38.a7b39c.syd.nbn.aussiebb.net [167.179.156.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27E10119; Sun, 27 Aug 2023 20:06:43 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1qaSZs-008Na8-4h; Mon, 28 Aug 2023 11:06:09 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 28 Aug 2023 11:06:09 +0800 Date: Mon, 28 Aug 2023 11:06:09 +0800 From: Herbert Xu To: mengkanglai Cc: Steffen Klassert , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Fengtao (fengtao, Euler)" , "Yanan (Euler)" Subject: Re: ltp testcases failed due to commit cf3128a7aca Message-ID: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=2.7 required=5.0 tests=BAYES_00,HELO_DYNAMIC_IPADDR2, PDS_RDNS_DYNAMIC_FP,RCVD_IN_DNSWL_BLOCKED,RDNS_DYNAMIC,SPF_HELO_NONE, SPF_PASS,TVD_RCVD_IP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Mon, Aug 28, 2023 at 02:12:12AM +0000, mengkanglai wrote: > > This command eventually use setkey -c to add spdadd entry failed: > spdadd $src_ipaddr $dst_ipaddr any >   -P out ipsec $protocol/tunnel/${src_ipaddr}-${dst_ipaddr}/use ; > > It returns Invalid argument. > > I found this failed due to commit cf3128a7aca(af_key: Reject optional tunnel/BEET mode templates in outbound policies), is latest ltp testcases are not adapted? Correct. The above specification makes no sense for an outbound policy as the SA can only be optional for inbound (where IPComp can be skipped for incompressible plaintext). So change the word "use" above to "require" and it should work. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt