Skip to content

Commit

Permalink
fix: Missing URR creation will cause TI error
Browse files Browse the repository at this point in the history
  • Loading branch information
lyz508 committed Sep 30, 2024
1 parent 7d3d180 commit 736f3d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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
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 736f3d1

Please sign in to comment.