forked from acouzens/open5gs
[AMF] Do not issue SBI requests to other NF's if RAN UE already disconnected
This commit is contained in:
parent
3bf6941cc4
commit
df25013e54
|
@ -909,22 +909,31 @@ int amf_namf_callback_handle_sdm_data_change_notify(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amf_ue) {
|
if (amf_ue) {
|
||||||
if (amf_ue_is_rat_restricted(amf_ue)) {
|
ran_ue_t *ran_ue = ran_ue_cycle(amf_ue->ran_ue);
|
||||||
|
if ((!ran_ue) || (amf_ue_is_rat_restricted(amf_ue))) {
|
||||||
|
|
||||||
|
if (!ran_ue) {
|
||||||
|
ogs_error("NG context has already been removed");
|
||||||
|
/* ran_ue is required for amf_ue_is_rat_restricted() */
|
||||||
|
|
||||||
|
ogs_error("Not implemented : Use Implicit De-registration");
|
||||||
|
state = AMF_NETWORK_INITIATED_IMPLICIT_DE_REGISTERED;
|
||||||
|
}
|
||||||
|
else {
|
||||||
/*
|
/*
|
||||||
* - AMF_NETWORK_INITIATED_EXPLICIT_DE_REGISTERED
|
* - AMF_NETWORK_INITIATED_EXPLICIT_DE_REGISTERED
|
||||||
* 1. UDM_UECM_DeregistrationNotification
|
* 1. UDM_UECM_DeregistrationNotification
|
||||||
* 2. Deregistration request
|
* 2. Deregistration request
|
||||||
* 3. UDM_SDM_Unsubscribe
|
* 3. UDM_SDM_Unsubscribe
|
||||||
* 4. UDM_UECM_Deregisration
|
* 4. UDM_UECM_Deregistration
|
||||||
* 5. PDU session release request
|
* 5. PDU session release request
|
||||||
* 6. PDUSessionResourceReleaseCommand +
|
* 6. PDUSessionResourceReleaseCommand +
|
||||||
* PDU session release command
|
* PDU session release command
|
||||||
* 7. PDUSessionResourceReleaseResponse
|
* 7. PDUSessionResourceReleaseResponse
|
||||||
* 8. AM_Policy_Association_Termination
|
* 8. AM_Policy_Association_Termination
|
||||||
* 9. Deregistration accept
|
* 9. Deregistration accept
|
||||||
* 10. Signalling Connecion Release
|
* 10. Signalling Connection Release
|
||||||
*/
|
*/
|
||||||
if (CM_CONNECTED(amf_ue)) {
|
|
||||||
r = nas_5gs_send_de_registration_request(
|
r = nas_5gs_send_de_registration_request(
|
||||||
amf_ue,
|
amf_ue,
|
||||||
OpenAPI_deregistration_reason_REREGISTRATION_REQUIRED, 0);
|
OpenAPI_deregistration_reason_REREGISTRATION_REQUIRED, 0);
|
||||||
|
@ -932,15 +941,6 @@ int amf_namf_callback_handle_sdm_data_change_notify(
|
||||||
ogs_assert(r != OGS_ERROR);
|
ogs_assert(r != OGS_ERROR);
|
||||||
|
|
||||||
state = AMF_NETWORK_INITIATED_EXPLICIT_DE_REGISTERED;
|
state = AMF_NETWORK_INITIATED_EXPLICIT_DE_REGISTERED;
|
||||||
|
|
||||||
} else if (CM_IDLE(amf_ue)) {
|
|
||||||
ogs_error("Not implemented : Use Implicit De-registration");
|
|
||||||
|
|
||||||
state = AMF_NETWORK_INITIATED_IMPLICIT_DE_REGISTERED;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
ogs_fatal("Invalid State");
|
|
||||||
ogs_assert_if_reached();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UDM_SDM_SUBSCRIBED(amf_ue)) {
|
if (UDM_SDM_SUBSCRIBED(amf_ue)) {
|
||||||
|
|
|
@ -50,6 +50,13 @@ ogs_sbi_request_t *amf_npcf_am_policy_control_build_create(
|
||||||
memset(&ueLocation, 0, sizeof(ueLocation));
|
memset(&ueLocation, 0, sizeof(ueLocation));
|
||||||
memset(&UeAmbr, 0, sizeof(UeAmbr));
|
memset(&UeAmbr, 0, sizeof(UeAmbr));
|
||||||
|
|
||||||
|
ran_ue_t *ran_ue = ran_ue_cycle(amf_ue->ran_ue);
|
||||||
|
if (!ran_ue) {
|
||||||
|
ogs_error("NG context has already been removed");
|
||||||
|
/* ran_ue is required for amf_ue_rat_type() */
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
server = ogs_list_first(&ogs_sbi_self()->server_list);
|
server = ogs_list_first(&ogs_sbi_self()->server_list);
|
||||||
if (!server) {
|
if (!server) {
|
||||||
ogs_error("No server");
|
ogs_error("No server");
|
||||||
|
|
|
@ -56,6 +56,13 @@ ogs_sbi_request_t *amf_nsmf_pdusession_build_create_sm_context(
|
||||||
memset(&header, 0, sizeof(header));
|
memset(&header, 0, sizeof(header));
|
||||||
memset(&ueLocation, 0, sizeof(ueLocation));
|
memset(&ueLocation, 0, sizeof(ueLocation));
|
||||||
|
|
||||||
|
ran_ue_t *ran_ue = ran_ue_cycle(amf_ue->ran_ue);
|
||||||
|
if (!ran_ue) {
|
||||||
|
/* ran_ue is required for amf_ue_rat_type() */
|
||||||
|
ogs_error("NG context has already been removed");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
SmContextCreateData.serving_nf_id =
|
SmContextCreateData.serving_nf_id =
|
||||||
NF_INSTANCE_ID(ogs_sbi_self()->nf_instance);
|
NF_INSTANCE_ID(ogs_sbi_self()->nf_instance);
|
||||||
if (!SmContextCreateData.serving_nf_id) {
|
if (!SmContextCreateData.serving_nf_id) {
|
||||||
|
|
|
@ -32,6 +32,14 @@ int amf_nudm_sdm_handle_provisioned(
|
||||||
|
|
||||||
SWITCH(recvmsg->h.resource.component[1])
|
SWITCH(recvmsg->h.resource.component[1])
|
||||||
CASE(OGS_SBI_RESOURCE_NAME_AM_DATA)
|
CASE(OGS_SBI_RESOURCE_NAME_AM_DATA)
|
||||||
|
|
||||||
|
ran_ue_t *ran_ue = ran_ue_cycle(amf_ue->ran_ue);
|
||||||
|
if (!ran_ue) {
|
||||||
|
/* ran_ue is required for amf_ue_is_rat_restricted() */
|
||||||
|
ogs_error("NG context has already been removed");
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
if (recvmsg->AccessAndMobilitySubscriptionData) {
|
if (recvmsg->AccessAndMobilitySubscriptionData) {
|
||||||
OpenAPI_list_t *gpsiList =
|
OpenAPI_list_t *gpsiList =
|
||||||
recvmsg->AccessAndMobilitySubscriptionData->gpsis;
|
recvmsg->AccessAndMobilitySubscriptionData->gpsis;
|
||||||
|
|
Loading…
Reference in New Issue