Skip to content

Commit

Permalink
Merge pull request #127 from lyz508/fix/urr-ti-error
Browse files Browse the repository at this point in the history
fix: UPF missing URR error
  • Loading branch information
ianchen0119 authored Sep 30, 2024
2 parents a700710 + 736f3d1 commit 0e55302
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion internal/context/datapath.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ func (p *DataPath) AddChargingRules(smContext *SMContext, chgLevel ChargingLevel
// nolint
nodeId, _ := node.GetUPFID()
logger.PduSessLog.Tracef("DownLinkTunnel add URR for node %s %+v",
nodeId, node.UpLinkTunnel.PDR)
nodeId, node.DownLinkTunnel.PDR)
}
}
}
Expand Down
10 changes: 3 additions & 7 deletions internal/context/user_plane_information.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,14 +741,10 @@ func (upi *UserPlaneInformation) selectMatchUPF(selection *UPFSelectionParams) [

if currentSnssai.Equal(targetSnssai) {
for _, dnnInfo := range snssaiInfo.DnnList {
if dnnInfo.Dnn != selection.Dnn {
continue
if dnnInfo.Dnn == selection.Dnn && dnnInfo.ContainsDNAI(selection.Dnai) {
upList = append(upList, upNode)
break
}
if selection.Dnai != "" && !dnnInfo.ContainsDNAI(selection.Dnai) {
continue
}
upList = append(upList, upNode)
break
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions internal/pfcp/message/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,9 @@ func BuildPfcpSessionEstablishmentRequest(
urrMap[urr.URRID] = urr
}
for _, filteredURR := range urrMap {
if filteredURR.State == context.RULE_INITIAL {
msg.CreateURR = append(msg.CreateURR, urrToCreateURR(filteredURR))
msg.CreateURR = append(msg.CreateURR, urrToCreateURR(filteredURR))
if filteredURR.State == context.RULE_CREATE {
smContext.Log.Warn("Duplicate URR creation")
}
filteredURR.State = context.RULE_CREATE
}
Expand Down Expand Up @@ -564,6 +565,9 @@ func BuildPfcpSessionModificationRequest(

for _, urr := range urrList {
switch urr.State {
case context.RULE_CREATE:
smContext.Log.Warn("Duplicate URR creation")
fallthrough
case context.RULE_INITIAL:
msg.CreateURR = append(msg.CreateURR, urrToCreateURR(urr))
case context.RULE_UPDATE:
Expand Down

0 comments on commit 0e55302

Please sign in to comment.