diff --git a/src/amf/gmm-handler.c b/src/amf/gmm-handler.c index ce857c977..a0376696a 100644 --- a/src/amf/gmm-handler.c +++ b/src/amf/gmm-handler.c @@ -1092,12 +1092,13 @@ int gmm_handle_ul_nas_transport(amf_ue_t *amf_ue, NF_INSTANCE_TYPE(ogs_sbi_self()->nf_instance); ogs_assert(requester_nf_type); - nf_instance = ogs_sbi_nf_instance_find_by_service_type( - service_type, requester_nf_type); - if (nf_instance) - OGS_SBI_SETUP_NF_INSTANCE( - sess->sbi.service_type_array[service_type], - nf_instance); + amf_sbi_select_nf( + &sess->sbi, + OGS_SBI_SERVICE_TYPE_NSMF_PDUSESSION, + requester_nf_type, + NULL); + nf_instance = sess->sbi. + service_type_array[service_type].nf_instance; } if (nf_instance) {