From 83311981db63fb939d9e1f75ceec24d76286b685 Mon Sep 17 00:00:00 2001 From: ming-hsien Date: Sat, 26 Oct 2024 14:51:05 +0000 Subject: [PATCH] fix: ulcl usage report error --- internal/context/sm_context.go | 6 ++---- internal/context/sm_context_policy.go | 3 +++ internal/sbi/processor/datapath.go | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/internal/context/sm_context.go b/internal/context/sm_context.go index 8a9b5724..d8ac995e 100644 --- a/internal/context/sm_context.go +++ b/internal/context/sm_context.go @@ -577,11 +577,9 @@ func (c *SMContext) SelectDefaultDataPath() error { var defaultPath *DataPath if GetSelf().ULCLSupport && CheckUEHasPreConfig(c.Supi) { - c.Log.Infof("Has pre-config route") + c.Log.Infof("Has pre-config default path") uePreConfigPaths := GetUEPreConfigPaths(c.Supi, c.SelectedUPF.Name) - c.Tunnel.DataPathPool = uePreConfigPaths.DataPathPool - c.Tunnel.PathIDGenerator = uePreConfigPaths.PathIDGenerator - defaultPath = c.Tunnel.DataPathPool.GetDefaultPath() + defaultPath = uePreConfigPaths.DataPathPool.GetDefaultPath() } else if c.Tunnel.DataPathPool.GetDefaultPath() == nil { // UE has no pre-config path and default path // Use default route diff --git a/internal/context/sm_context_policy.go b/internal/context/sm_context_policy.go index 4b4f68c1..aef74c7f 100644 --- a/internal/context/sm_context_policy.go +++ b/internal/context/sm_context_policy.go @@ -187,6 +187,9 @@ func (c *SMContext) ApplyPccRules( if tgtQosID != "" { finalQosDatas[tgtQosID] = tgtQosData } + if tgtChgID != "" { + finalChgDatas[tgtChgID] = tgtChgData + } } if err := checkUpPathChangeEvt(c, srcTcData, tgtTcData); err != nil { c.Log.Warnf("Check UpPathChgEvent err: %v", err) diff --git a/internal/sbi/processor/datapath.go b/internal/sbi/processor/datapath.go index f089e567..eeedcc48 100644 --- a/internal/sbi/processor/datapath.go +++ b/internal/sbi/processor/datapath.go @@ -62,7 +62,9 @@ func ActivateUPFSession( if node.DownLinkTunnel != nil && node.DownLinkTunnel.PDR != nil { pdrList = append(pdrList, node.DownLinkTunnel.PDR) farList = append(farList, node.DownLinkTunnel.PDR.FAR) - urrList = append(urrList, node.DownLinkTunnel.PDR.URR...) + if node.DownLinkTunnel.PDR.URR != nil { + urrList = append(urrList, node.DownLinkTunnel.PDR.URR...) + } // skip send QER because uplink and downlink shared one QER }