Handle UL NAS Transport [#553]

o Tester
1. UE registered to 5GS and can connect to internet.
2. Turn off the UE and turn on the UE immediately
3. UE send PDU session request message
   without sending registration complete

o Analysis Result
1. UE sends registration request with unknown GUTI
2. AMF send registration accept without GUTI
3. UE skips the registration complete

So, we need the handler UL NAS Transport in this state.
This commit is contained in:
Sukchan Lee 2020-09-10 10:51:18 -04:00
parent feaec0eaa9
commit 6124908133
5 changed files with 37 additions and 20 deletions

View File

@ -913,6 +913,28 @@ void gmm_state_initial_context_setup(ogs_fsm_t *s, amf_event_t *e)
OGS_FSM_TRAN(s, &gmm_state_registered);
break;
case OGS_NAS_5GS_UL_NAS_TRANSPORT:
/*
* Issues #553
*
* o Tester
* 1. UE registered to 5GS and can connect to internet.
* 2. Turn off the UE and turn on the UE immediately
* 3. UE send PDU session request message
* without sending registration complete
*
* o Analysis Result
* 1. UE sends registration request with unknown GUTI
* 2. AMF send registration accept without GUTI
* 3. UE skips the registration complete
*
* So, we need the handler UL NAS Transport in this state.
*/
gmm_handle_ul_nas_transport(
amf_ue, &nas_message->gmm.ul_nas_transport);
OGS_FSM_TRAN(s, &gmm_state_registered);
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST:
ogs_warn("Registration request");
rv = gmm_handle_registration_request(

View File

@ -143,22 +143,6 @@ void nas_5gs_send_service_reject(
ogs_expect(rv == OGS_OK);
}
void nas_5gs_send_accept(amf_ue_t *amf_ue)
{
ogs_assert(amf_ue);
switch(amf_ue->nas.message_type) {
case OGS_NAS_5GS_REGISTRATION_REQUEST:
nas_5gs_send_registration_accept(amf_ue);
break;
case OGS_NAS_5GS_SERVICE_REQUEST:
nas_5gs_send_service_accept(amf_ue);
break;
default:
ogs_error("Unknown message type [%d]", amf_ue->nas.message_type);
}
}
void nas_5gs_send_de_registration_accept(amf_ue_t *amf_ue)
{
ran_ue_t *ran_ue = NULL;

View File

@ -40,8 +40,6 @@ void nas_5gs_send_service_accept(amf_ue_t *amf_ue);
void nas_5gs_send_service_reject(
amf_ue_t *amf_ue, ogs_nas_5gmm_cause_t gmm_cause);
void nas_5gs_send_accept(amf_ue_t *amf_ue);
void nas_5gs_send_de_registration_accept(amf_ue_t *amf_ue);
void nas_5gs_send_identity_request(amf_ue_t *amf_ue);

View File

@ -213,7 +213,20 @@ int amf_nsmf_pdu_session_handle_update_sm_context(
ogs_assert(sess->pdu_session_resource_setup_request_transfer);
if (SESSION_SYNC_DONE(amf_ue)) {
nas_5gs_send_accept(amf_ue);
switch(amf_ue->nas.message_type) {
case OGS_NAS_5GS_REGISTRATION_REQUEST:
/* Registration Request
* with mobility or periodic updating */
nas_5gs_send_registration_accept(amf_ue);
break;
case OGS_NAS_5GS_SERVICE_REQUEST:
/* Service Request */
nas_5gs_send_service_accept(amf_ue);
break;
default:
ogs_error("Unknown message type [%d]",
amf_ue->nas.message_type);
}
/*
* After sending accept message, N2 SM context is freed

View File

@ -86,7 +86,7 @@ int amf_nudm_sdm_handle_provisioned(
break;
CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA)
nas_5gs_send_accept(amf_ue);
nas_5gs_send_registration_accept(amf_ue);
break;
DEFAULT