diff --git a/src/amf/gmm-handler.c b/src/amf/gmm-handler.c index 82d344530..9632bfcf5 100644 --- a/src/amf/gmm-handler.c +++ b/src/amf/gmm-handler.c @@ -672,22 +672,9 @@ int gmm_handle_deregistration_request(amf_ue_t *amf_ue, amf_ue->nas.ue.tsc, amf_ue->nas.amf.tsc, amf_ue->nas.ue.ksi, amf_ue->nas.amf.ksi); - if (deregistration_request->de_registration_type.switch_off) { + if (deregistration_request->de_registration_type.switch_off) ogs_debug(" Switch-Off"); - /* - * Issue #1917 - * - * When the UE sends a De-registration Request with Switch-Off, - * AMF should remove the the stored UE Radio Capability. - * - * Otherwise, the Radio Capability will not match - * because the gNB will not query the Radio Capability - * when the UE changes USIM. - */ - OGS_ASN_CLEAR_DATA(&amf_ue->ueRadioCapability); - } - ogs_info("[%s] SUCI", amf_ue->suci); xact_count = amf_sess_xact_count(amf_ue); diff --git a/src/amf/gmm-sm.c b/src/amf/gmm-sm.c index 4a5fd47bf..b55f76db7 100644 --- a/src/amf/gmm-sm.c +++ b/src/amf/gmm-sm.c @@ -80,6 +80,28 @@ void gmm_state_de_registered(ogs_fsm_t *s, amf_event_t *e) AMF_UE_CLEAR_N2_TRANSFER(amf_ue, pdu_session_resource_setup_request); AMF_UE_CLEAR_5GSM_MESSAGE(amf_ue); CLEAR_AMF_UE_ALL_TIMERS(amf_ue); + + /* + * Issue #2040 + * + * TS24.501 + * 5.5.2 De-registration procedure + * 5.5.2.1 General + * + * When the AMF enters the state 5GMM-DEREGISTERED for 3GPP access, + * the AMF shall delete the stored UE radio capability information + * or the UE radio capability ID, if any. + * + * (DEPRECATED) Issue #1917 (from Switch-Off to De-Registration) + * + * When the UE sends a De-registration Request with Switch-Off, + * AMF should remove the the stored UE Radio Capability. + * + * Otherwise, the Radio Capability will not match + * because the gNB will not query the Radio Capability + * when the UE changes USIM. + */ + OGS_ASN_CLEAR_DATA(&amf_ue->ueRadioCapability); break; case OGS_FSM_EXIT_SIG: break; diff --git a/src/mme/nas-path.c b/src/mme/nas-path.c index 275917ea7..dad39c294 100644 --- a/src/mme/nas-path.c +++ b/src/mme/nas-path.c @@ -145,6 +145,20 @@ int nas_eps_send_attach_accept(mme_ue_t *mme_ue) ogs_timer_start(mme_ue->t3450.timer, mme_timer_cfg(MME_TIMER_T3450)->duration); + /* + * Issue #2040 + * + * TS24.301 + * 5.5.1 Attach procedure + * 5.5.1.2 Attach procedure for EPS services + * 5.5.1.2.4 Attach accepted by the network + * + * If the attach request is accepted by the network, + * the MME shall delete the stored UE radio capability information + * or the UE radio capability ID, if any. + */ + OGS_ASN_CLEAR_DATA(&mme_ue->ueRadioCapability); + s1apbuf = s1ap_build_initial_context_setup_request(mme_ue, emmbuf); if (!s1apbuf) { ogs_error("s1ap_build_initial_context_setup_request() failed");