[AMF] fix the bug for making allowed NSSAI (#910)

This commit is contained in:
Sukchan Lee 2021-07-01 16:23:27 +09:00
parent ec377a8849
commit 65e96dd75c
4 changed files with 130 additions and 5 deletions

View File

@ -1050,6 +1050,28 @@ void amf_ue_new_guti(amf_ue_t *amf_ue)
return;
}
/*
* TS24.501
* 5.3.3 Temporary identities
*
* The AMF shall assign a new 5G-GUTI for a particular UE:
*
* a) during a successful initial registration procedure;
* b) during a successful registration procedure
* for mobility registration update; and
* c) after a successful service request procedure invoked
* as a response to a paging request from the network and
* before the release of the N1 NAS signalling connection
* as specified in subclause 5.4.4.1.
*
* The AMF should assign a new 5G-GUTI for a particular UE
* during a successful registration procedure
* for periodic registration update.
*
* The AMF may assign a new 5G-GUTI at any time for a particular UE
* by performing the generic UE configuration update procedure.
*/
memset(&amf_ue->next.guti, 0, sizeof(ogs_nas_5gs_guti_t));
ogs_assert(amf_ue->guami);
@ -1075,6 +1097,28 @@ void amf_ue_confirm_guti(amf_ue_t *amf_ue)
ogs_assert(amf_m_tmsi_free(amf_ue->current.m_tmsi) == OGS_OK);
}
/*
* TS24.501
* 5.3.3 Temporary identities
*
* The AMF shall assign a new 5G-GUTI for a particular UE:
*
* a) during a successful initial registration procedure;
* b) during a successful registration procedure
* for mobility registration update; and
* c) after a successful service request procedure invoked
* as a response to a paging request from the network and
* before the release of the N1 NAS signalling connection
* as specified in subclause 5.4.4.1.
*
* The AMF should assign a new 5G-GUTI for a particular UE
* during a successful registration procedure
* for periodic registration update.
*
* The AMF may assign a new 5G-GUTI at any time for a particular UE
* by performing the generic UE configuration update procedure.
*/
/* Copying from Current to Next Guti */
amf_ue->current.m_tmsi = amf_ue->next.m_tmsi;
memcpy(&amf_ue->current.guti,
@ -2197,7 +2241,8 @@ void amf_update_allowed_nssai(amf_ue_t *amf_ue)
for (i = 0; i < amf_ue->num_of_slice; i++) {
ogs_slice_data_t *slice = &amf_ue->slice[i];
ogs_nas_s_nssai_ie_t *allowed =
&amf_ue->allowed_nssai.s_nssai[i];
&amf_ue->allowed_nssai.
s_nssai[amf_ue->allowed_nssai.num_of_s_nssai];
if (slice->default_indicator == true) {
allowed->sst = slice->s_nssai.sst;

View File

@ -211,7 +211,27 @@ int gmm_handle_registration_request(amf_ue_t *amf_ue,
amf_ue->nhcc = 1;
}
/* Create New GUTI */
/*
* TS24.501
* 5.3.3 Temporary identities
*
* The AMF shall assign a new 5G-GUTI for a particular UE:
*
* a) during a successful initial registration procedure;
* b) during a successful registration procedure
* for mobility registration update; and
* c) after a successful service request procedure invoked
* as a response to a paging request from the network and
* before the release of the N1 NAS signalling connection
* as specified in subclause 5.4.4.1.
*
* The AMF should assign a new 5G-GUTI for a particular UE
* during a successful registration procedure
* for periodic registration update.
*
* The AMF may assign a new 5G-GUTI at any time for a particular UE
* by performing the generic UE configuration update procedure.
*/
amf_ue_new_guti(amf_ue);
ogs_debug(" OLD TAI[PLMN_ID:%06x,TAC:%d]",

View File

@ -305,7 +305,27 @@ static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMPLETE:
ogs_debug("[%s] Configuration update complete", amf_ue->supi);
/* Confirm GUTI */
/*
* TS24.501
* 5.3.3 Temporary identities
*
* The AMF shall assign a new 5G-GUTI for a particular UE:
*
* a) during a successful initial registration procedure;
* b) during a successful registration procedure
* for mobility registration update; and
* c) after a successful service request procedure invoked
* as a response to a paging request from the network and
* before the release of the N1 NAS signalling connection
* as specified in subclause 5.4.4.1.
*
* The AMF should assign a new 5G-GUTI for a particular UE
* during a successful registration procedure
* for periodic registration update.
*
* The AMF may assign a new 5G-GUTI at any time for a particular UE
* by performing the generic UE configuration update procedure.
*/
if (amf_ue->next.m_tmsi) {
amf_ue_confirm_guti(amf_ue);
} else {
@ -988,7 +1008,27 @@ void gmm_state_initial_context_setup(ogs_fsm_t *s, amf_event_t *e)
CLEAR_AMF_UE_TIMER(amf_ue->t3550);
/* Confirm GUTI */
/*
* TS24.501
* 5.3.3 Temporary identities
*
* The AMF shall assign a new 5G-GUTI for a particular UE:
*
* a) during a successful initial registration procedure;
* b) during a successful registration procedure
* for mobility registration update; and
* c) after a successful service request procedure invoked
* as a response to a paging request from the network and
* before the release of the N1 NAS signalling connection
* as specified in subclause 5.4.4.1.
*
* The AMF should assign a new 5G-GUTI for a particular UE
* during a successful registration procedure
* for periodic registration update.
*
* The AMF may assign a new 5G-GUTI at any time for a particular UE
* by performing the generic UE configuration update procedure.
*/
if (amf_ue->next.m_tmsi) {
amf_ue_confirm_guti(amf_ue);
} else {

View File

@ -923,7 +923,27 @@ void ngap_handle_initial_context_setup_response(
if (paging_ongoing == true) {
gmm_configuration_update_command_param_t param;
/* Create New GUTI */
/*
* TS24.501
* 5.3.3 Temporary identities
*
* The AMF shall assign a new 5G-GUTI for a particular UE:
*
* a) during a successful initial registration procedure;
* b) during a successful registration procedure
* for mobility registration update; and
* c) after a successful service request procedure invoked
* as a response to a paging request from the network and
* before the release of the N1 NAS signalling connection
* as specified in subclause 5.4.4.1.
*
* The AMF should assign a new 5G-GUTI for a particular UE
* during a successful registration procedure
* for periodic registration update.
*
* The AMF may assign a new 5G-GUTI at any time for a particular UE
* by performing the generic UE configuration update procedure.
*/
amf_ue_new_guti(amf_ue);
memset(&param, 0, sizeof(param));