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