Skip to content

Commit

Permalink
Merge pull request #126 from louisroyer/flow-desc
Browse files Browse the repository at this point in the history
fix: swap source and destination when updating flowDescription of ULCL paths; add missing precedence
  • Loading branch information
ianchen0119 authored Sep 20, 2024
2 parents 43a8cbe + bf32401 commit 325c399
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/sbi/processor/ulcl_procedure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -328,6 +328,7 @@ func UpdateRANAndIUPFUpLink(smContext *context.SMContext) {
FlowDescription: []byte(FlowDespcriptionStr),
}
}
UPLinkPDR.Precedence = 30

pfcpState := &PFCPState{
upf: curDPNode.UPF,
Expand Down

0 comments on commit 325c399

Please sign in to comment.