ltp testcases failed due to commit cf3128a7aca

From: mengkanglai
Date: Sun Aug 27 2023 - 22:14:37 EST


When I run latest ltp testcase testcases/network/stress/udp/uni-basic/udp6-uni-basic07 with latest kernel 6.5, it failed in “ltpapicmd.c:188: Failed to configure SAD/SPD on the local host”.
I found that the reason for failure was this command:
output_ipsec_conf src \
$IPSEC_PROTO $IPSEC_MODE $SPI $lhost_addr $rhost_addr \
| setkey -c 2>&1 | tee $ipsec_log

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?