fix: No Modify Bearer Request (#885)

Now MME send Modify Bearer Request regardless of the order of
Attach Complete and InitialContextSetupResponse
This commit is contained in:
Sukchan Lee 2021-03-29 22:35:34 +09:00
parent 829123dad0
commit 1e2a16fc5b
2 changed files with 13 additions and 16 deletions

View File

@ -715,16 +715,13 @@ void s1ap_handle_initial_context_setup_response(
ogs_debug(" EBI[%d] ENB-S1U-TEID[%d]",
bearer->ebi, bearer->enb_s1u_teid);
if (mme_ue->nas_eps.type == MME_EPS_TYPE_ATTACH_REQUEST) {
/* For Attach Request, Nothing to do */
} else if (OGS_FSM_CHECK(&bearer->sm, esm_state_active)) {
int uli_presence = 1;
/*
* For Service Request/TAU Request/Extended Service Request,
* ULI is present if it's the active EPS bearer.
*
*/
ogs_debug(" ### ULI PRESENT ###");
if (OGS_FSM_CHECK(&bearer->sm, esm_state_active)) {
ogs_debug(" NAS_EPS Type[%d]", mme_ue->nas_eps.type);
int uli_presence = 0;
if (mme_ue->nas_eps.type != MME_EPS_TYPE_ATTACH_REQUEST) {
ogs_debug(" ### ULI PRESENT ###");
uli_presence = 1;
}
mme_gtp_send_modify_bearer_request(bearer, uli_presence);
}
}

View File

@ -1944,12 +1944,6 @@ static void test5_func(abts_case *tc, void *data)
rv = testenb_s1ap_send(s1ap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* Send Initial Context Setup Response */
sendbuf = test_s1ap_build_initial_context_setup_response(test_ue);
ABTS_PTR_NOTNULL(tc, sendbuf);
rv = testenb_s1ap_send(s1ap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* Send Attach Complete + Activate default EPS bearer cotext accept */
test_ue->nr_cgi.cell_id = 0x1234502;
bearer = test_bearer_find_by_ue_ebi(test_ue, 5);
@ -1964,6 +1958,12 @@ static void test5_func(abts_case *tc, void *data)
rv = testenb_s1ap_send(s1ap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* Send Initial Context Setup Response */
sendbuf = test_s1ap_build_initial_context_setup_response(test_ue);
ABTS_PTR_NOTNULL(tc, sendbuf);
rv = testenb_s1ap_send(s1ap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* Receive EMM information */
recvbuf = testenb_s1ap_read(s1ap);
ABTS_PTR_NOTNULL(tc, recvbuf);