<div dir="ltr"><div>Hi Andrew,</div><div><br></div><div>Thanks for the input.</div><div><br></div><div>I also upgraded to to  5.8.11 kernel</div><div><br></div><div>Linux Ubuntu-1604New-001 5.8.11-050811-generic #202009230858 SMP Wed Sep 23 13:06:55 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux<br>ctuser@Ubuntu-1604New-001:~$ <br></div><div><br></div><div>Still I'm getting the same error </div><div><br></div><div>Oct  5 23:05:02.745044: "mysubnet" #1: ERROR: netlink response for Add SA <a href="mailto:esp.cb1fb8fe@10.30.65.7">esp.cb1fb8fe@10.30.65.7</a> included errno 22: Invalid argument<br></div><div><br></div><div>I built and installed the latest libreswan code.</div><div><br></div><div>Thanks,</div><div>Mallesh</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 30, 2020 at 5:36 PM Andrew Cagney <<a href="mailto:andrew.cagney@gmail.com">andrew.cagney@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 30 Sep 2020 at 00:58, M Thotager <<a href="mailto:mallesh.thotager@gmail.com" target="_blank">mallesh.thotager@gmail.com</a>> wrote:<br>
><br>
>   Hi Team,<br>
><br>
> 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.<br>
> 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 ?<br>
><br>
> 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>
> 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:<br>
> Sep 28 21:47:47.408943: | ikev2_child_sa_respond returned STF_FATAL<br>
<br>
my knee jerk reaction is the kernel - we've been testing with some<br>
bleeding edge patches and features enabled.   I just ran the the tests<br>
with the vanilla kernel:<br>
Linux east 5.8.11-200.fc32.x86_64 #1 SMP Wed Sep 23 13:51:28 UTC 2020<br>
x86_64 x86_64 x86_64 GNU/Linux<br>
and they pass.  However, that is still slightly ahead.<br>
<br>
> I've downloaded the latest libreswan code , built and installed.<br>
><br>
> Ipsec version:<br>
> 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>
><br>
> Configuration on both the peers:<br>
> peer1:<br>
> 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" rel="noreferrer" target="_blank">192.0.2.0/24</a><br>
>      rightsubnet=<a href="http://192.0.1.0/24" rel="noreferrer" target="_blank">192.0.1.0/24</a><br>
>      type=tunnel<br>
>      auto=add<br>
>      ike=aes256-sha256;modp4096<br>
><br>
><br>
> Peer2:<br>
> version 2.0<br>
> 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" rel="noreferrer" target="_blank">192.0.1.0/24</a><br>
>      rightsubnet=<a href="http://192.0.2.0/24" rel="noreferrer" 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>
><br>
> Thanks,<br>
> Mallesh<br>
><br>
> _______________________________________________<br>
> Swan mailing list<br>
> <a href="mailto:Swan@lists.libreswan.org" target="_blank">Swan@lists.libreswan.org</a><br>
> <a href="https://lists.libreswan.org/mailman/listinfo/swan" rel="noreferrer" target="_blank">https://lists.libreswan.org/mailman/listinfo/swan</a><br>
</blockquote></div></div>