<div dir="ltr">  Hi Team,<div><br></div><div>I'm trying to setup a ipsec over tcp (on  ubuntu , Kernel version is 5.8.9), but  ipsec sa creation is failing with the below reason.</div><div>I referred to the available test scripts for tcp (in  git repository ) , Could you please check and let me know if I'm missing anything ?</div><div><br></div><div>Sep 28 21:47:47.408661: | netlink: enabling tunnel mode<br>Sep 28 21:47:47.408674: | XFRM: adding IPsec SA with reqid 16389<br>Sep 28 21:47:47.408685: | netlink: setting IPsec SA replay-window to 32 using old-style req<br>Sep 28 21:47:47.408699: | adding xfrm-encap-tmpl when adding sa encap_type=0(espintcp) sport=4500 dport=48792<br>Sep 28 21:47:47.408711: | netlink: esp-hw-offload not set for IPsec SA<br><b>Sep 28 21:47:47.408882: "mysubnet" #1: ERROR: netlink response for Add SA <a href="mailto:esp.654c8f7b@10.30.65.7" target="_blank">esp.654c8f7b@10.30.65.7</a> included errno 22: Invalid argument<br>Sep 28 21:47:47.408929: "mysubnet" #1: setup_half_ipsec_sa() hit fail:</b><br>Sep 28 21:47:47.408943: | ikev2_child_sa_respond returned STF_FATAL<br></div><div><br></div><div><br></div><div>I've downloaded the latest libreswan code , built and installed.</div><div><br></div><div><b>Ipsec version:</b></div><div>root@Ubuntu-1604New-001:~# vi /tmp/pluto.log<br>root@Ubuntu-1604New-001:~# ipsec version<br>Linux Libreswan v3.30-1834-g8b42ce7-main (netkey) on 5.8.9-050809-generic<br>root@Ubuntu-1604New-001:~# uname -a<br>Linux Ubuntu-1604New-001 5.8.9-050809-generic #202009120936 SMP Sat Sep 12 13:59:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux<br>root@Ubuntu-1604New-001:~#<br></div><div><br></div><div>Configuration on both the peers:</div><div><b>peer1:</b></div><div>config setup<br>    protostack=netkey<br>    listen-tcp=yes<br>    logfile=/tmp/pluto.log<br>    logtime=yes<br>    logappend=no<br>    plutodebug=all<br>    dumpdir=/tmp<br><br>conn mysubnet<br>     enable-tcp=yes<br>     tcp-remoteport=4500<br>     left=10.30.65.1<br>     right=10.30.65.7<br>     authby=secret<br>     leftsubnet=<a href="http://192.0.2.0/24" target="_blank">192.0.2.0/24</a><br>     rightsubnet=<a href="http://192.0.1.0/24" target="_blank">192.0.1.0/24</a><br>     type=tunnel<br>     auto=add<br>     ike=aes256-sha256;modp4096<br></div><div><b><br></b></div><div><b><br></b></div><div><b>Peer2:</b></div><div>version 2.0<br></div><div>config setup<br>    protostack=netkey<br>    listen-tcp=yes<br>        logfile=/tmp/pluto.log<br>        logtime=yes<br>        logappend=no<br>        plutodebug=all<br><br>conn mysubnet<br>   enable-tcp=yes<br>    tcp-remoteport=4500<br>     left=10.30.65.7<br>     right=10.30.65.1<br>     authby=secret<br>     leftsubnet=<a href="http://192.0.1.0/24" target="_blank">192.0.1.0/24</a><br>     rightsubnet=<a href="http://192.0.2.0/24" target="_blank">192.0.2.0/24</a><br>     type=tunnel<br>     auto=start<br>     ike=aes256-sha256;modp4096<br>     phase2alg=aes256-sha256;modp4096<br></div><div><br></div><div>Thanks,</div><div>Mallesh</div><div class="gmail-yj6qo"></div><div class="gmail-adL"><br></div></div>