Oops! Fix the PDN connectivity reject handler #568

This commit is contained in:
Sukchan Lee 2020-11-01 00:54:32 -04:00
parent a679ea56a8
commit 3fef5848b8
2 changed files with 10 additions and 12 deletions

View File

@ -421,24 +421,15 @@ void mme_state_operational(ogs_fsm_t *s, mme_event_t *e)
} else if (OGS_FSM_CHECK(&bearer->sm, esm_state_exception)) {
/* Remove Session Context */
mme_sess_remove(sess);
/*
* The UE requested the wrong APN.
*
* From the Issues #568, MME need to accept further service request.
* To do this, we are not going to release UE context.
*
* Just we'll remove MME session context.
*/
enb_ue_t *enb_ue = enb_ue_cycle(mme_ue->enb_ue);
if (enb_ue) {
s1ap_send_ue_context_release_command(enb_ue,
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
S1AP_UE_CTX_REL_S1_REMOVE_AND_UNLINK, 0);
} else {
ogs_warn("[%s] No S1 Context", mme_ue->imsi_bcd);
}
mme_sess_remove(sess);
}
ogs_pkbuf_free(pkbuf);

View File

@ -443,6 +443,13 @@ static void test1_func(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, recvbuf);
tests1ap_recv(test_ue, recvbuf);
/* Send UE Context Release Request */
sendbuf = test_s1ap_build_ue_context_release_request(test_ue,
S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_user_inactivity);
ABTS_PTR_NOTNULL(tc, sendbuf);
rv = testenb_s1ap_send(s1ap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* Receive UE Context Release Command */
recvbuf = testenb_s1ap_read(s1ap);
ABTS_PTR_NOTNULL(tc, recvbuf);