diff --git a/internal/gmm/handler.go b/internal/gmm/handler.go index dc65b1b8..b9da73f7 100644 --- a/internal/gmm/handler.go +++ b/internal/gmm/handler.go @@ -1120,12 +1120,19 @@ func handleRequestedNssai(ue *context.AmfUe, anType models.AccessType) error { needSliceSelection = true break } - - reqSnssai := models.Snssai{ + + reqSnssai := models.Snssai { Sst: requestedSnssai.ServingSnssai.Sst, Sd: requestedSnssai.ServingSnssai.Sd, } + if !amfSelf.InPlmnSupportList(reqSnssai) { + needSliceSelection = true + break + } + + } + if !amfSelf.InPlmnSupportList(reqSnssai) { needSliceSelection = true break diff --git a/internal/sbi/consumer/nf_discovery.go b/internal/sbi/consumer/nf_discovery.go index 421d4a0c..be8f7daf 100644 --- a/internal/sbi/consumer/nf_discovery.go +++ b/internal/sbi/consumer/nf_discovery.go @@ -99,6 +99,9 @@ func SearchAmfCommunicationInstance(ue *amf_context.AmfUe, nrfUri string, target // select the first AMF, TODO: select base on other info var amfUri string for _, nfProfile := range resp.NfInstances { + if nfProfile.NfInstanceId == amf_context.GetSelf().NfId { + continue + } ue.TargetAmfProfile = &nfProfile amfUri = util.SearchNFServiceUri(nfProfile, models.ServiceName_NAMF_COMM, models.NfServiceStatus_REGISTERED) if amfUri != "" {