Skip to content

Commit 61ae7ec

Browse files
SMF Selection Fail Bug Fix (#348)
* smf selection fail fix Signed-off-by: AshithaCDAC <ashitha@cdac.in> * modified InSubscribedNssai function Signed-off-by: AshithaCDAC <ashitha@cdac.in> --------- Signed-off-by: AshithaCDAC <ashitha@cdac.in> Co-authored-by: Ajay Lotan Thakur <ajay@opennetworking.org>
1 parent bf235a3 commit 61ae7ec

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

context/amf_ue.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,14 @@ func (ue *AmfUe) InAllowedNssai(targetSNssai models.Snssai, anType models.Access
560560
return false
561561
}
562562

563-
func (ue *AmfUe) InSubscribedNssai(targetSNssai models.Snssai) bool {
563+
func (ue *AmfUe) InSubscribedNssai(targetSNssai *models.Snssai) bool {
564564
for _, sNssai := range ue.SubscribedNssai {
565565
if reflect.DeepEqual(*sNssai.SubscribedSnssai, targetSNssai) {
566566
return true
567+
} else if sNssai.SubscribedSnssai.Sst == targetSNssai.Sst {
568+
logger.ContextLog.Info("SST values match, SD values differ")
569+
targetSNssai.Sd = sNssai.SubscribedSnssai.Sd
570+
return true
567571
}
568572
}
569573
return false

gmm/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ func handleRequestedNssai(ue *context.AmfUe, anType models.AccessType) error {
12171217

12181218
needSliceSelection := false
12191219
for _, requestedSnssai := range requestedNssai {
1220-
if ue.InSubscribedNssai(*requestedSnssai.ServingSnssai) {
1220+
if ue.InSubscribedNssai(requestedSnssai.ServingSnssai) {
12211221
allowedSnssai := models.AllowedSnssai{
12221222
AllowedSnssai: &models.Snssai{
12231223
Sst: requestedSnssai.ServingSnssai.Sst,

0 commit comments

Comments
 (0)