TestNon3GPP Fails

OS: Ubuntu 18.04
Kernel: 5.4.0-105-generic

Installed the latest stable version or free5GC and gtp5 module. Tests run fine until I get to the Non3GPP test
a. TestRegistration: Pass
b. TestGUTIRegistration: Pass
c. TestServiceRequest: Pass
d. TestXnHandover: Pass
e. TestDeregistration: Pass
f. TestPDUSessionReleaseRequest: Pass
g. TestPaging: Pass
h. TestN2Handover : Pass
i. TestNon3GPP

2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] Encoding IKE payloads
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] [Authentication] marshal(): Start marshalling
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] [Configuration] marshal(): Start marshalling
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] [SecurityAssociation] marshal(): Start marshalling
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] [TrafficSelector] marshal(): Start marshalling
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] [TrafficSelector] marshal(): Start marshalling
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] [Notification] marshal(): Start marshalling
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] [Notification] marshal(): Start marshalling
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] Encoding IKE message
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] Encoding IKE payloads
2022-04-01T10:58:30+01:00 [INFO][N3IWF][IKE] [Encrypted] marshal(): Start marshalling
2022-04-01T10:58:30+01:00 [ERRO][N3IWF][IKE] Set XFRM rules failed: invalid argument
2022-04-01T10:58:30+01:00 [ERRO][N3IWF][IKE] Applying XFRM rules failed: Set XFRM state rule failed

The error is being thrown from NFs/n3iwf/ike/handler/xfrm.go
in this section of code (around line 100) - I don’t have a debugger and just narrowed it to this by probing with additional logging

if childSecurityAssociation.EnableEncapsulate {
xfrmState.Encap = &netlink.XfrmStateEncap{
Type: netlink.XFRM_ENCAP_ESPINUDP,
SrcPort: childSecurityAssociation.NATPort,
DstPort: childSecurityAssociation.N3IWFPort,
}
}

// Commit xfrm state to netlink
var err error
if err = netlink.XfrmStateAdd(xfrmState); err != nil {
	ikeLog.Errorf("Set XFRM rules failed: %+v", err)
	return errors.New("Set XFRM state rule failed")
}

Any advice on how to troubleshoot or resolve this would be much appreciated!
Thank you
Mike

Printed out the contents of xfrmState as it is complaining about an invalid argument. Here is what it looked like:
Dst: 192.168.127.1,
Src: 192.168.127.2,
Proto: esp,
Mode: tunnel,
SPI: 0x1,
ReqID: 0x0,
ReplayWindow: 0,
Mark: (0x5,0x0),
OutputMark: 0,
Ifid: 0,
Auth: {Name: hmac(sha1),
Key: 0xe174f805c2f12daeaefb01902bb8949e16321190},
Crypt: {Name: cbc(aes), Key: 0x93b9af3806433b6400ed400be26395d20f1ddd14d45552b8e5c6e0a73f57ca6e},
Aead: ,
Encap: ,
ESN: false

In my opinion , this is kernel version problem.
You can try to downgrade the kernel version to before 100, such as 5.4.0-91-generic.