From acf1e31cd273394ca55a14155f2d4f3ac46e745f Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Thu, 18 Jul 2024 17:21:48 +0800 Subject: [PATCH] fix: can not select data path when upi has dnaiList --- internal/context/user_plane_information.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/context/user_plane_information.go b/internal/context/user_plane_information.go index 82b71e5d..91f2bab3 100644 --- a/internal/context/user_plane_information.go +++ b/internal/context/user_plane_information.go @@ -741,10 +741,14 @@ func (upi *UserPlaneInformation) selectMatchUPF(selection *UPFSelectionParams) [ if currentSnssai.Equal(targetSnssai) { for _, dnnInfo := range snssaiInfo.DnnList { - if dnnInfo.Dnn == selection.Dnn && dnnInfo.ContainsDNAI(selection.Dnai) { - upList = append(upList, upNode) - break + if dnnInfo.Dnn != selection.Dnn { + continue } + if selection.Dnai != "" && !dnnInfo.ContainsDNAI(selection.Dnai) { + continue + } + upList = append(upList, upNode) + break } } }