Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: swap source and destination when updating flowDescription of ULCL paths; add missing precedence #126

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading