forked from acouzens/open5gs
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:
parent
829123dad0
commit
1e2a16fc5b
|
@ -715,16 +715,13 @@ void s1ap_handle_initial_context_setup_response(
|
||||||
ogs_debug(" EBI[%d] ENB-S1U-TEID[%d]",
|
ogs_debug(" EBI[%d] ENB-S1U-TEID[%d]",
|
||||||
bearer->ebi, bearer->enb_s1u_teid);
|
bearer->ebi, bearer->enb_s1u_teid);
|
||||||
|
|
||||||
if (mme_ue->nas_eps.type == MME_EPS_TYPE_ATTACH_REQUEST) {
|
if (OGS_FSM_CHECK(&bearer->sm, esm_state_active)) {
|
||||||
/* For Attach Request, Nothing to do */
|
ogs_debug(" NAS_EPS Type[%d]", mme_ue->nas_eps.type);
|
||||||
} else if (OGS_FSM_CHECK(&bearer->sm, esm_state_active)) {
|
int uli_presence = 0;
|
||||||
int uli_presence = 1;
|
if (mme_ue->nas_eps.type != MME_EPS_TYPE_ATTACH_REQUEST) {
|
||||||
/*
|
ogs_debug(" ### ULI PRESENT ###");
|
||||||
* For Service Request/TAU Request/Extended Service Request,
|
uli_presence = 1;
|
||||||
* ULI is present if it's the active EPS bearer.
|
}
|
||||||
*
|
|
||||||
*/
|
|
||||||
ogs_debug(" ### ULI PRESENT ###");
|
|
||||||
mme_gtp_send_modify_bearer_request(bearer, uli_presence);
|
mme_gtp_send_modify_bearer_request(bearer, uli_presence);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1944,12 +1944,6 @@ static void test5_func(abts_case *tc, void *data)
|
||||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
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 */
|
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||||
test_ue->nr_cgi.cell_id = 0x1234502;
|
test_ue->nr_cgi.cell_id = 0x1234502;
|
||||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 5);
|
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);
|
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
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 */
|
/* Receive EMM information */
|
||||||
recvbuf = testenb_s1ap_read(s1ap);
|
recvbuf = testenb_s1ap_read(s1ap);
|
||||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||||
|
|
Loading…
Reference in New Issue