[Xiaomi Mi 6 ROMs, Kernels, Recoveries, & Other Dev] andlommy:
+1 on non-working IPSEC

Looks like racoon is dead :)

adb logs for establishing an L2TP/IPSEC connection:

10-28 00:56:14.309 3864 3864 D racoon : Waiting for control socket

10-28 00:56:14.446 3864 3864 D racoon : Received 6 arguments

10-28 00:56:14.447 3864 3864 I racoon : ipsec-tools 0.7.3 (http://ipsec-tools.sf.net)

10-28 00:56:14.612 3864 3864 I racoon : x.x.x.x[500] used as isakmp port (fd=7)

10-28 00:56:14.612 3864 3864 I racoon : x.x.x.x[500] used for NAT-T

10-28 00:56:14.613 3864 3864 I racoon : x.x.x.x[4500] used as isakmp port (fd=8)

10-28 00:56:14.614 3864 3864 I racoon : x.x.x.x[4500] used for NAT-T

10-28 00:56:14.614 3864 3864 E racoon : Not supported.

10-28 00:56:14.614 3864 3864 W racoon : Kernel does not support SHA512, not enabling

10-28 00:56:14.614 3864 3864 E racoon : Not supported.

10-28 00:56:14.614 3864 3864 W racoon : Kernel does not support SHA384, not enabling

10-28 00:56:14.873 3864 3864 I racoon : IPsec-SA request for y.y.y.y queued due to no phase1 found.

10-28 00:56:14.874 3864 3864 I racoon : initiate new phase 1 negotiation: x.x.x.x[500]<=>y.y.y.y[500]

10-28 00:56:14.874 3864 3864 I racoon : begin Identity Protection mode.

10-28 00:56:14.988 3864 3864 I racoon : received Vendor ID: RFC 3947

10-28 00:56:14.989 3864 3864 I racoon : received Vendor ID: DPD

10-28 00:56:14.989 3864 3864 I racoon : received broken Microsoft ID: FRAGMENTATION

10-28 00:56:14.989 3864 3864 I racoon : Selected NAT-T version: RFC 3947

10-28 00:56:15.013 3864 3864 I racoon : Hashing y.y.y.y[500] with algo #2

10-28 00:56:15.013 3864 3864 I racoon : Hashing x.x.x.x[500] with algo #2

10-28 00:56:15.013 3864 3864 I racoon : Adding remote and local NAT-D payloads.

10-28 00:56:15.076 3864 3864 I racoon : Hashing x.x.x.x[500] with algo #2

10-28 00:56:15.076 3864 3864 I racoon : NAT-D payload #0 doesn't match

10-28 00:56:15.076 3864 3864 I racoon : Hashing y.y.y.y[500] with algo #2

10-28 00:56:15.076 3864 3864 I racoon : NAT-D payload #1 doesn't match

10-28 00:56:15.076 3864 3864 I racoon : NAT detected: ME PEER

10-28 00:56:15.077 3864 3864 I racoon : KA list add: x.x.x.x[4500]->y.y.y.y[4500]

10-28 00:56:15.151 3864 3864 I racoon : ISAKMP-SA established x.x.x.x[4500]-y.y.y.y[4500] spi:a7aeb664311d2cca:f227c2b255d7dd1a

10-28 00:56:16.154 3864 3864 I racoon : initiate new phase 2 negotiation: x.x.x.x[4500]<=>y.y.y.y[4500]

10-28 00:56:16.155 3864 3864 I racoon : NAT detected -> UDP encapsulation (ENC_MODE 2->4).

10-28 00:56:16.250 3864 3864 I racoon : Adjusting my encmode UDP-Transport->Transport

10-28 00:56:16.250 3864 3864 I racoon : Adjusting peer's encmode UDP-Transport(4)->Transport(2)

10-28 00:56:16.258 3864 3864 E racoon : pfkey UPDATE failed: No such file or directory

10-28 00:56:16.259 3864 3864 E racoon : pfkey ADD failed: No such file or directory

10-28 00:56:44.873 3864 3864 I racoon : IPsec-SA expired: ESP/Transport x.x.x.x[0]->y.y.y.y[0]

10-28 00:56:46.156 3864 3864 I racoon : IPsec-SA expired: ESP/Transport y.y.y.y[0]->x.x.x.x[0] spi=215279828(0xcd4e8d4)

10-28 00:56:46.156 3864 3864 W racoon : the expire message is received but the handler has not been established.

10-28 00:56:46.157 3864 3864 E racoon : y.y.y.y give up to get IPsec-SA due to time up to wait.

10-28 00:56:46.163 3864 3864 I racoon : Bye

on another android device where same is working i don't see the following 2 suspicious lines:

10-28 00:56:16.258 3864 3864 E racoon : pfkey UPDATE failed: No such file or directory

10-28 00:56:16.259 3864 3864 E racoon : pfkey ADD failed: No such file or directory