From bf3240195702a3523e81ba354dcef234a0987d4e Mon Sep 17 00:00:00 2001 From: Louis Royer Date: Thu, 19 Sep 2024 11:45:42 +0200 Subject: [PATCH] fix: swap source and destination when updating flowDescription of ULCL paths; add missing precedence --- internal/sbi/processor/ulcl_procedure.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/sbi/processor/ulcl_procedure.go b/internal/sbi/processor/ulcl_procedure.go index 839c0b53..f19d9455 100644 --- a/internal/sbi/processor/ulcl_procedure.go +++ b/internal/sbi/processor/ulcl_procedure.go @@ -147,7 +147,7 @@ func EstablishULCL(smContext *context.SMContext) { DownLinkPDR := curDPNode.DownLinkTunnel.PDR UPLinkPDR.State = context.RULE_INITIAL - // new IPFilterRule with action:"permit" and diection:"out" + // new IPFilterRule with action:"permit" and direction:"out" FlowDespcription := flowdesc.NewIPFilterRule() FlowDespcription.Src = dest.DestinationIP if dstPort, err := flowdesc.ParsePorts(dest.DestinationPort); err != nil { @@ -305,13 +305,13 @@ func UpdateRANAndIUPFUpLink(smContext *context.SMContext) { if _, exist := bpMGR.UpdatedBranchingPoint[curDPNode.UPF]; exist { // add SDF Filter - // new IPFilterRule with action:"permit" and diection:"out" + // new IPFilterRule with action:"permit" and direction:"out" FlowDespcription := flowdesc.NewIPFilterRule() - FlowDespcription.Dst = dest.DestinationIP + FlowDespcription.Src = dest.DestinationIP if dstPort, err := flowdesc.ParsePorts(dest.DestinationPort); err != nil { - FlowDespcription.DstPorts = dstPort + FlowDespcription.SrcPorts = dstPort } - FlowDespcription.Src = smContext.PDUAddress.To4().String() + FlowDespcription.Dst = smContext.PDUAddress.To4().String() FlowDespcriptionStr, err := flowdesc.Encode(FlowDespcription) if err != nil { @@ -328,6 +328,7 @@ func UpdateRANAndIUPFUpLink(smContext *context.SMContext) { FlowDescription: []byte(FlowDespcriptionStr), } } + UPLinkPDR.Precedence = 30 pfcpState := &PFCPState{ upf: curDPNode.UPF,