forked from acouzens/open5gs
[MME] Clear UE Context for Attach Reject (#1848)
Attach Reject + PDN Connectivity Reject need to clear UE Context
This commit is contained in:
parent
8373d0e331
commit
4510176da2
|
@ -333,11 +333,21 @@ int nas_eps_send_pdn_connectivity_reject(
|
|||
ogs_assert(mme_ue);
|
||||
|
||||
if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
|
||||
enb_ue_t *enb_ue = NULL;
|
||||
|
||||
/* During the UE-attach process, we'll send Attach-Reject
|
||||
* with pyggybacking PDN-connectivity-Reject */
|
||||
rv = nas_eps_send_attach_reject(mme_ue,
|
||||
OGS_NAS_EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED, esm_cause);
|
||||
OGS_NAS_EMM_CAUSE_ESM_FAILURE, esm_cause);
|
||||
ogs_expect(rv == OGS_OK);
|
||||
|
||||
enb_ue = enb_ue_cycle(mme_ue->enb_ue);
|
||||
if (enb_ue) {
|
||||
ogs_assert(OGS_OK ==
|
||||
s1ap_send_ue_context_release_command(mme_ue->enb_ue,
|
||||
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
|
||||
S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
|
||||
}
|
||||
} else {
|
||||
esmbuf = esm_build_pdn_connectivity_reject(
|
||||
sess, esm_cause, create_action);
|
||||
|
|
|
@ -124,7 +124,7 @@ void sgsap_handle_location_update_accept(mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf)
|
|||
error:
|
||||
ogs_assert(OGS_OK ==
|
||||
nas_eps_send_attach_reject(mme_ue,
|
||||
OGS_NAS_EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED,
|
||||
OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
|
||||
OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
|
||||
mme_send_delete_session_or_mme_ue_context_release(mme_ue);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue