Projects
osmocom:nightly
open5gs
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 592
View file
open5gs_2.7.0.76.3f097.202402022026.dsc -> open5gs_2.7.0.81.8762.202402032026.dsc
Changed
@@ -2,7 +2,7 @@ Source: open5gs Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg Architecture: any -Version: 2.7.0.76.3f097.202402022026 +Version: 2.7.0.81.8762.202402032026 Maintainer: Harald Welte <laforge@gnumonks.org> Uploaders: Sukchan Lee <acetcom@gmail.com> Homepage: https://open5gs.org @@ -32,8 +32,8 @@ open5gs-udr deb net optional arch=any open5gs-upf deb net optional arch=any Checksums-Sha1: - ee16bc298f945d19f18dabe150e9dabdc8bfcd0e 14473172 open5gs_2.7.0.76.3f097.202402022026.tar.xz + 62dc8a18d5165e05e2134fb176eb6de128efb433 14472348 open5gs_2.7.0.81.8762.202402032026.tar.xz Checksums-Sha256: - dac8de23cf5f28159e8261849909fe469cf3b786f99acd207a1ad11bc19a464e 14473172 open5gs_2.7.0.76.3f097.202402022026.tar.xz + 79fe728cca3b14534cd31b51e651fdab031d5a0241059593cf530163185f4fc1 14472348 open5gs_2.7.0.81.8762.202402032026.tar.xz Files: - e5499cb34c2e60aa1b7fe3eb77d0eef2 14473172 open5gs_2.7.0.76.3f097.202402022026.tar.xz + f2eb025aaefa491d833406fc1c9ba67b 14472348 open5gs_2.7.0.81.8762.202402032026.tar.xz
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/.tarball-version -> open5gs_2.7.0.81.8762.202402032026.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.7.0.76-3f097.202402022026 +2.7.0.81-8762.202402032026
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/debian/changelog -> open5gs_2.7.0.81.8762.202402032026.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.7.0.76.3f097.202402022026) unstable; urgency=medium +open5gs (2.7.0.81.8762.202402032026) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Fri, 02 Feb 2024 20:27:38 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Sat, 03 Feb 2024 20:27:34 +0000 open5gs (2.7.0) unstable; urgency=medium
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/crypt/ogs-kdf.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/crypt/ogs-kdf.c
Changed
@@ -463,7 +463,8 @@ * TS33.401 Annex I Hash Functions * Use the KDF given in TS33.220 */ -void ogs_kdf_hash_mme(const uint8_t *message, uint8_t message_len, uint8_t *hash_mme) +void ogs_kdf_hash_mme( + const uint8_t *message, uint32_t message_len, uint8_t *hash_mme) { uint8_t key32; uint8_t outputOGS_SHA256_DIGEST_SIZE;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/crypt/ogs-kdf.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/crypt/ogs-kdf.h
Changed
@@ -121,7 +121,8 @@ * TS33.401 Annex I Hash Functions * Use the KDF given in TS33.220 */ -void ogs_kdf_hash_mme(const uint8_t *message, uint8_t message_len, uint8_t *hash_mme); +void ogs_kdf_hash_mme( + const uint8_t *message, uint32_t message_len, uint8_t *hash_mme); /* * TS33.102
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/decoder.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/decoder.c
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.2.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-04 20:50:00.889117 by acetcom + * Created on: 2024-01-21 18:47:47.827076 by acetcom * from 24501-h90.docx ******************************************************************************/ @@ -4449,15 +4449,14 @@ ogs_assert(pkbuf); ogs_assert(pkbuf->data); - ogs_assert(pkbuf->len); - - memset(message, 0, sizeof(ogs_nas_5gs_message_t)); size = sizeof(ogs_nas_5gmm_header_t); if (ogs_pkbuf_pull(pkbuf, size) == NULL) { ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size); return OGS_ERROR; } + + memset(message, 0, sizeof(ogs_nas_5gs_message_t)); memcpy(&message->gmm.h, pkbuf->data - size, size); decoded += size; @@ -4710,15 +4709,14 @@ ogs_assert(pkbuf); ogs_assert(pkbuf->data); - ogs_assert(pkbuf->len); - - memset(message, 0, sizeof(ogs_nas_5gs_message_t)); size = sizeof(ogs_nas_5gsm_header_t); if (ogs_pkbuf_pull(pkbuf, size) == NULL) { ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size); return OGS_ERROR; } + + memset(message, 0, sizeof(ogs_nas_5gs_message_t)); memcpy(&message->gsm.h, pkbuf->data - size, size); decoded += size;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/encoder.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/encoder.c
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.2.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-04 20:50:00.898995 by acetcom + * Created on: 2024-01-21 18:47:47.837341 by acetcom * from 24501-h90.docx ******************************************************************************/
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/ies.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/ies.c
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.2.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-04 20:50:00.874596 by acetcom + * Created on: 2024-01-21 18:47:47.812038 by acetcom * from 24501-h90.docx ******************************************************************************/
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/ies.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/ies.h
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.2.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-04 20:50:00.872007 by acetcom + * Created on: 2024-01-21 18:47:47.809393 by acetcom * from 24501-h90.docx ******************************************************************************/
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/message.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/message.h
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.2.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-04 20:50:00.882958 by acetcom + * Created on: 2024-01-21 18:47:47.820801 by acetcom * from 24501-h90.docx ******************************************************************************/
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/support/nas-message.py -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/support/nas-message.py
Changed
@@ -732,15 +732,14 @@ ogs_assert(pkbuf); ogs_assert(pkbuf->data); - ogs_assert(pkbuf->len); - - memset(message, 0, sizeof(ogs_nas_5gs_message_t)); size = sizeof(ogs_nas_5gmm_header_t); if (ogs_pkbuf_pull(pkbuf, size) == NULL) { ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size); return OGS_ERROR; } + + memset(message, 0, sizeof(ogs_nas_5gs_message_t)); memcpy(&message->gmm.h, pkbuf->data - size, size); decoded += size; @@ -779,15 +778,14 @@ ogs_assert(pkbuf); ogs_assert(pkbuf->data); - ogs_assert(pkbuf->len); - - memset(message, 0, sizeof(ogs_nas_5gs_message_t)); size = sizeof(ogs_nas_5gsm_header_t); if (ogs_pkbuf_pull(pkbuf, size) == NULL) { ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size); return OGS_ERROR; } + + memset(message, 0, sizeof(ogs_nas_5gs_message_t)); memcpy(&message->gsm.h, pkbuf->data - size, size); decoded += size;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/decoder.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/decoder.c
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-02 22:57:51.860294 by acetcom + * Created on: 2024-01-21 18:50:03.417367 by acetcom * from 24301-h90.docx ******************************************************************************/ @@ -4691,15 +4691,14 @@ ogs_assert(pkbuf); ogs_assert(pkbuf->data); - ogs_assert(pkbuf->len); - - memset(message, 0, sizeof(ogs_nas_eps_message_t)); size = sizeof(ogs_nas_emm_header_t); if (ogs_pkbuf_pull(pkbuf, size) == NULL) { ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size); return OGS_ERROR; } + + memset(message, 0, sizeof(ogs_nas_eps_message_t)); memcpy(&message->emm.h, pkbuf->data - size, size); decoded += size; @@ -4975,15 +4974,14 @@ ogs_assert(pkbuf); ogs_assert(pkbuf->data); - ogs_assert(pkbuf->len); - - memset(message, 0, sizeof(ogs_nas_eps_message_t)); size = sizeof(ogs_nas_esm_header_t); if (ogs_pkbuf_pull(pkbuf, size) == NULL) { ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size); return OGS_ERROR; } + + memset(message, 0, sizeof(ogs_nas_eps_message_t)); memcpy(&message->esm.h, pkbuf->data - size, size); decoded += size;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/encoder.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/encoder.c
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-02 22:57:51.871237 by acetcom + * Created on: 2024-01-21 18:50:03.428897 by acetcom * from 24301-h90.docx ******************************************************************************/
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/ies.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/ies.c
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-02 22:57:51.846548 by acetcom + * Created on: 2024-01-21 18:50:03.402793 by acetcom * from 24301-h90.docx ******************************************************************************/
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/ies.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/ies.h
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-02 22:57:51.844510 by acetcom + * Created on: 2024-01-21 18:50:03.400537 by acetcom * from 24301-h90.docx ******************************************************************************/
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/message.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/message.h
Changed
@@ -28,7 +28,7 @@ /******************************************************************************* * This file had been created by nas-message.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2023-03-02 22:57:51.852650 by acetcom + * Created on: 2024-01-21 18:50:03.409367 by acetcom * from 24301-h90.docx ******************************************************************************/
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/support/nas-message.py -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/support/nas-message.py
Changed
@@ -747,15 +747,14 @@ ogs_assert(pkbuf); ogs_assert(pkbuf->data); - ogs_assert(pkbuf->len); - - memset(message, 0, sizeof(ogs_nas_eps_message_t)); size = sizeof(ogs_nas_emm_header_t); if (ogs_pkbuf_pull(pkbuf, size) == NULL) { ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size); return OGS_ERROR; } + + memset(message, 0, sizeof(ogs_nas_eps_message_t)); memcpy(&message->emm.h, pkbuf->data - size, size); decoded += size; @@ -806,15 +805,14 @@ ogs_assert(pkbuf); ogs_assert(pkbuf->data); - ogs_assert(pkbuf->len); - - memset(message, 0, sizeof(ogs_nas_eps_message_t)); size = sizeof(ogs_nas_esm_header_t); if (ogs_pkbuf_pull(pkbuf, size) == NULL) { ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size); return OGS_ERROR; } + + memset(message, 0, sizeof(ogs_nas_eps_message_t)); memcpy(&message->esm.h, pkbuf->data - size, size); decoded += size;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/amf-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/amf-sm.c
Changed
@@ -488,10 +488,9 @@ ogs_info("%s:%d Release SM context %d", amf_ue->supi, sess->psi, sbi_message.res_status); } else { - ogs_error("%s HTTP response error %d", - amf_ue->supi, sbi_message.res_status); + ogs_error("%s:%d HTTP response error %d", + amf_ue->supi, sess->psi, sbi_message.res_status); } - amf_nsmf_pdusession_handle_release_sm_context(sess, state); break; @@ -518,6 +517,8 @@ * So, if CreateSMContext is failed, * we'll clear SM_CONTEXT_REF. */ + ogs_error("%s:%d create_sm_context failed() %d", + amf_ue->supi, sess->psi, sbi_message.res_status); AMF_SESS_CLEAR(sess); } END
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/context.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/context.h
Changed
@@ -509,6 +509,8 @@ /* SMF sends the RESPONSE * of POST /nsmf-pdusession/v1/sm-contexts */ char *sm_context_ref; + bool pdu_session_release_complete_received; + bool pdu_session_resource_release_response_received; /* SMF sends the REQUEST * of POST /namf-comm/v1/ue-contexts/{supi}/n1-n2-messages */ @@ -818,7 +820,6 @@ sbi_object = &(__sESS)->sbi; \ ogs_assert(sbi_object); \ \ - ogs_error("AMF_SESS_CLEAR"); \ if (ogs_list_count(&sbi_object->xact_list)) { \ ogs_error("SBI running %d", \ ogs_list_count(&sbi_object->xact_list)); \
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/gmm-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/gmm-handler.c
Changed
@@ -1099,6 +1099,23 @@ if (!sess) { sess = amf_sess_add(amf_ue, *pdu_session_id); ogs_assert(sess); + } else { + /* + * These are variables that should be initialized + * when a PDU session establishment message is received + * for an existing session. + * + * It should be noted that XXX_recieved, which is initialized now, + * has a different initialization location than XXX_gsm_type. + * + * XXX_received is initialized in the ESTABLISHMENT phase, + * but XXX_gsm_type is initialized in the RELEASE phase + * when a PDU session release command with a Reactivation Request + * and a PDU session release complete are sent simultaneously. + */ + sess->pdu_session_resource_release_response_received = false; + sess->pdu_session_release_complete_received = false; + } } else { sess = amf_sess_find_by_psi(amf_ue, *pdu_session_id); @@ -1386,8 +1403,10 @@ } break; case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMPLETE: - /* Prevent to invoke SMF for this session */ - CLEAR_SM_CONTEXT_REF(sess); + sess->pdu_session_release_complete_received = true; + if (sess->pdu_session_resource_release_response_received == + true) + CLEAR_SM_CONTEXT_REF(sess); break; default: break;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/gmm-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/gmm-sm.c
Changed
@@ -1398,9 +1398,8 @@ break; case OGS_NAS_5GS_5GMM_STATUS: - ogs_warn("%s 5GMM STATUS : Cause%d", amf_ue->suci, - nas_message->gmm.gmm_status.gmm_cause); - OGS_FSM_TRAN(s, &gmm_state_exception); + ogs_warn("%s 5GMM STATUS : Cause%d", + amf_ue->suci, nas_message->gmm.gmm_status.gmm_cause); break; case OGS_NAS_5GS_DEREGISTRATION_REQUEST_FROM_UE: @@ -1648,7 +1647,6 @@ case OGS_NAS_5GS_5GMM_STATUS: ogs_warn("%s 5GMM STATUS : Cause%d", amf_ue->suci, nas_message->gmm.gmm_status.gmm_cause); - OGS_FSM_TRAN(s, &gmm_state_exception); break; case OGS_NAS_5GS_DEREGISTRATION_REQUEST_FROM_UE: @@ -1954,7 +1952,6 @@ case OGS_NAS_5GS_5GMM_STATUS: ogs_warn("%s 5GMM STATUS : Cause%d", amf_ue->supi, nas_message->gmm.gmm_status.gmm_cause); - OGS_FSM_TRAN(s, &gmm_state_exception); break; case OGS_NAS_5GS_DEREGISTRATION_REQUEST_FROM_UE: @@ -2315,7 +2312,6 @@ case OGS_NAS_5GS_5GMM_STATUS: ogs_warn("%s 5GMM STATUS : Cause%d", amf_ue->supi, nas_message->gmm.gmm_status.gmm_cause); - OGS_FSM_TRAN(s, &gmm_state_exception); break; case OGS_NAS_5GS_DEREGISTRATION_REQUEST_FROM_UE:
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/ngap-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/ngap-handler.c
Changed
@@ -2514,7 +2514,12 @@ ogs_assert(r != OGS_ERROR); ogs_pkbuf_free(param.n2smbuf); + + sess->pdu_session_resource_release_response_received = true; + if (sess->pdu_session_release_complete_received == true) + CLEAR_SM_CONTEXT_REF(sess); } + } void ngap_handle_uplink_ran_configuration_transfer( @@ -3814,6 +3819,16 @@ Cause->present, (int)Cause->choice.radioNetwork); ogs_list_for_each(&amf_ue->sess_list, sess) { + if (!SESSION_CONTEXT_IN_SMF(sess)) { + ogs_error("Session Context is not in SMF %d", sess->psi); + r = ngap_send_error_indication2(source_ue, + NGAP_Cause_PR_radioNetwork, + NGAP_CauseRadioNetwork_handover_cancelled); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); + return; + } + memset(¶m, 0, sizeof(param)); param.hoState = OpenAPI_ho_state_CANCELLED; param.ngApCause.group = Cause->present; @@ -4113,6 +4128,16 @@ ogs_assert(r != OGS_ERROR); ogs_list_for_each(&amf_ue->sess_list, sess) { + if (!SESSION_CONTEXT_IN_SMF(sess)) { + ogs_error("Session Context is not in SMF %d", sess->psi); + r = ngap_send_error_indication2(source_ue, + NGAP_Cause_PR_radioNetwork, + NGAP_CauseRadioNetwork_partial_handover); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); + return; + } + memset(¶m, 0, sizeof(param)); param.hoState = OpenAPI_ho_state_COMPLETED;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/nsmf-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/nsmf-handler.c
Changed
@@ -1056,8 +1056,21 @@ ogs_error("%s:%d Do not remove Session due to Reactivation-requested", amf_ue->supi, sess->psi); - /* Initialize the context instead of using amf_sess_remove() */ - + /* + * Issue #2917 + * + * These are variables that need to be initialized + * when a PDU session release command with a Reactivation Request + * and a PDU session release complete are sent at the same time. + * + * It is important to note that XXX_gsm_type, which is initialized now, + * has a different initialization location than + * pdu_session_release_complete_received/ + * pdu_session_resource_release_response_received + * + * XXX_received is initialized in the ESTABLISHMENT phase, + * but XXX_gsm_type must be initialized in the RELEASE phase. + */ sess->old_gsm_type = 0; sess->current_gsm_type = 0; @@ -1068,7 +1081,7 @@ } else { ogs_info("%s:%d Release SM Context state:%d", amf_ue->supi, sess->psi, state); - amf_sess_remove(sess); + AMF_SESS_CLEAR(sess); } if (state == AMF_RELEASE_SM_CONTEXT_REGISTRATION_ACCEPT) {
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/emm-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/emm-sm.c
Changed
@@ -814,9 +814,7 @@ case OGS_NAS_EPS_EMM_STATUS: ogs_warn("EMM STATUS : IMSI%s Cause%d", - mme_ue->imsi_bcd, - message->emm.emm_status.emm_cause); - OGS_FSM_TRAN(s, &emm_state_exception); + mme_ue->imsi_bcd, message->emm.emm_status.emm_cause); break; case OGS_NAS_EPS_DETACH_REQUEST: @@ -1037,9 +1035,7 @@ break; case OGS_NAS_EPS_EMM_STATUS: ogs_warn("EMM STATUS : IMSI%s Cause%d", - mme_ue->imsi_bcd, - message->emm.emm_status.emm_cause); - OGS_FSM_TRAN(s, &emm_state_exception); + mme_ue->imsi_bcd, message->emm.emm_status.emm_cause); break; case OGS_NAS_EPS_DETACH_REQUEST: ogs_warn("%s Detach request", mme_ue->imsi_bcd); @@ -1251,9 +1247,7 @@ break; case OGS_NAS_EPS_EMM_STATUS: ogs_warn("EMM STATUS : IMSI%s Cause%d", - mme_ue->imsi_bcd, - message->emm.emm_status.emm_cause); - OGS_FSM_TRAN(s, &emm_state_exception); + mme_ue->imsi_bcd, message->emm.emm_status.emm_cause); break; case OGS_NAS_EPS_DETACH_REQUEST: ogs_warn("%s Detach request", mme_ue->imsi_bcd); @@ -1503,9 +1497,7 @@ case OGS_NAS_EPS_EMM_STATUS: ogs_warn("EMM STATUS : IMSI%s Cause%d", - mme_ue->imsi_bcd, - message->emm.emm_status.emm_cause); - OGS_FSM_TRAN(s, &emm_state_exception); + mme_ue->imsi_bcd, message->emm.emm_status.emm_cause); break; case OGS_NAS_EPS_DETACH_REQUEST: ogs_warn("%s Detach request", mme_ue->imsi_bcd);
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/mme-context.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/mme-context.h
Changed
@@ -474,8 +474,6 @@ int security_context_available; int mac_failed; - bool location_updated_but_not_canceled_yet; - /* Security Context */ ogs_nas_ue_network_capability_t ue_network_capability; ogs_nas_ms_network_capability_t ms_network_capability;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/mme-path.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/mme-path.c
Changed
@@ -83,12 +83,8 @@ S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0)); } else { - if (mme_ue->location_updated_but_not_canceled_yet == true) { - mme_s6a_send_pur(mme_ue); - } else { - MME_UE_CHECK(OGS_LOG_WARN, mme_ue); - mme_ue_remove(mme_ue); - } + MME_UE_CHECK(OGS_LOG_WARN, mme_ue); + mme_ue_remove(mme_ue); } } break;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/mme-s11-handler.c
Changed
@@ -704,12 +704,8 @@ } else if (action == OGS_GTP_DELETE_SEND_RELEASE_WITH_UE_CONTEXT_REMOVE) { if (mme_sess_count(mme_ue) == 1) /* Last Session */ { if (ECM_IDLE(mme_ue)) { - if (mme_ue->location_updated_but_not_canceled_yet == true) { - mme_s6a_send_pur(mme_ue); - } else { - MME_UE_CHECK(OGS_LOG_ERROR, mme_ue); - mme_ue_remove(mme_ue); - } + MME_UE_CHECK(OGS_LOG_ERROR, mme_ue); + mme_ue_remove(mme_ue); } else { ogs_assert(mme_ue->enb_ue); r = s1ap_send_ue_context_release_command(mme_ue->enb_ue,
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/mme-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/mme-sm.c
Changed
@@ -612,8 +612,6 @@ ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); } - - mme_ue->location_updated_but_not_canceled_yet = true; break; case OGS_DIAM_S6A_CMD_CODE_PURGE_UE: ogs_debug("OGS_DIAM_S6A_CMD_CODE_PURGE_UE"); @@ -621,7 +619,6 @@ break; case OGS_DIAM_S6A_CMD_CODE_CANCEL_LOCATION: ogs_debug("OGS_DIAM_S6A_CMD_CODE_CANCEL_LOCATION"); - mme_ue->location_updated_but_not_canceled_yet = false; mme_s6a_handle_clr(mme_ue, s6a_message); break; case OGS_DIAM_S6A_CMD_CODE_INSERT_SUBSCRIBER_DATA:
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/nas-path.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/nas-path.c
Changed
@@ -50,14 +50,17 @@ int rv; ogs_pkbuf_t *esmbuf = NULL; + ogs_assert(esm_message_container); + if (!esm_message_container->length) { + ogs_error("Invalid ESM Message Container"); + return OGS_ERROR; + } + if (!mme_ue_cycle(mme_ue)) { ogs_error("UE(mme-ue) context has already been removed"); return OGS_NOTFOUND; } - ogs_assert(esm_message_container); - ogs_assert(esm_message_container->length); - /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ esmbuf = ogs_pkbuf_alloc(NULL,
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/s1ap-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/s1ap-handler.c
Changed
@@ -1846,11 +1846,11 @@ return; } - mme_ue = enb_ue->mme_ue; - ogs_info("UE Context Release Action:%d", enb_ue->ue_ctx_rel_action); ogs_info(" ENB_UE_S1AP_ID%d MME_UE_S1AP_ID%d", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); + + mme_ue = mme_ue_cycle(enb_ue->mme_ue); if (mme_ue) { ogs_info(" IMSI%s", mme_ue->imsi_bcd); @@ -1946,12 +1946,8 @@ return; } - if (mme_ue->location_updated_but_not_canceled_yet == true) { - mme_s6a_send_pur(mme_ue); - } else { - MME_UE_CHECK(OGS_LOG_DEBUG, mme_ue); - mme_ue_remove(mme_ue); - } + MME_UE_CHECK(OGS_LOG_DEBUG, mme_ue); + mme_ue_remove(mme_ue); break; case S1AP_UE_CTX_REL_S1_HANDOVER_COMPLETE: ogs_debug(" Action: S1 handover complete");
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/smf/gsm-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/smf/gsm-sm.c
Changed
@@ -284,8 +284,6 @@ case SMF_EVT_5GSM_MESSAGE: nas_message = e->nas.message; ogs_assert(nas_message); - sess = e->sess; - ogs_assert(sess); stream = e->h.sbi.data; ogs_assert(stream); smf_ue = sess->smf_ue; @@ -436,8 +434,6 @@ sbi_message = e->h.sbi.message; ogs_assert(sbi_message); - sess = e->sess; - ogs_assert(sess); smf_ue = sess->smf_ue; ogs_assert(smf_ue); @@ -850,8 +846,6 @@ sbi_message = e->h.sbi.message; ogs_assert(sbi_message); - sess = e->sess; - ogs_assert(sess); smf_ue = sess->smf_ue; ogs_assert(smf_ue); @@ -1002,8 +996,6 @@ case SMF_EVT_5GSM_MESSAGE: nas_message = e->nas.message; ogs_assert(nas_message); - sess = e->sess; - ogs_assert(sess); stream = e->h.sbi.data; ogs_assert(stream); smf_ue = sess->smf_ue; @@ -1069,8 +1061,6 @@ break; case SMF_EVT_NGAP_MESSAGE: - sess = e->sess; - ogs_assert(sess); stream = e->h.sbi.data; ogs_assert(stream); smf_ue = sess->smf_ue; @@ -1364,8 +1354,6 @@ sbi_message = e->h.sbi.message; ogs_assert(sbi_message); - sess = e->sess; - ogs_assert(sess); smf_ue = sess->smf_ue; ogs_assert(smf_ue); @@ -1588,8 +1576,6 @@ sbi_message = e->h.sbi.message; ogs_assert(sbi_message); - sess = e->sess; - ogs_assert(sess); smf_ue = sess->smf_ue; ogs_assert(smf_ue); @@ -1638,8 +1624,6 @@ break; case SMF_EVT_NGAP_MESSAGE: - sess = e->sess; - ogs_assert(sess); stream = e->h.sbi.data; ogs_assert(stream); smf_ue = sess->smf_ue; @@ -1713,8 +1697,6 @@ case SMF_EVT_5GSM_MESSAGE: nas_message = e->nas.message; ogs_assert(nas_message); - sess = e->sess; - ogs_assert(sess); stream = e->h.sbi.data; ogs_assert(stream); smf_ue = sess->smf_ue; @@ -1794,8 +1776,6 @@ sbi_message = e->h.sbi.message; ogs_assert(sbi_message); - sess = e->sess; - ogs_assert(sess); smf_ue = sess->smf_ue; ogs_assert(smf_ue); @@ -1874,11 +1854,19 @@ void smf_gsm_state_5gc_session_will_deregister(ogs_fsm_t *s, smf_event_t *e) { + smf_sess_t *sess = NULL; + + ogs_sbi_stream_t *stream = NULL; + ogs_sbi_message_t *sbi_message = NULL; + ogs_assert(s); ogs_assert(e); smf_sm_debug(e); + sess = e->sess; + ogs_assert(sess); + switch (e->h.id) { case OGS_FSM_ENTRY_SIG: break; @@ -1886,6 +1874,41 @@ case OGS_FSM_EXIT_SIG: break; + case OGS_EVENT_SBI_SERVER: + sbi_message = e->h.sbi.message; + ogs_assert(sbi_message); + stream = e->h.sbi.data; + ogs_assert(stream); + + SWITCH(sbi_message->h.service.name) + CASE(OGS_SBI_SERVICE_NAME_NSMF_PDUSESSION) + SWITCH(sbi_message->h.resource.component2) + CASE(OGS_SBI_RESOURCE_NAME_RELEASE) + ogs_assert(true == ogs_sbi_send_response( + stream, OGS_SBI_HTTP_STATUS_TOO_MANY_REQUESTS)); + break; + DEFAULT + ogs_error("Invalid resource name %s", + sbi_message->h.resource.component2); + ogs_assert(true == + ogs_sbi_server_send_error(stream, + OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message, + "Invalid resource name %s", + sbi_message->h.resource.component2)); + OGS_FSM_TRAN(s, smf_gsm_state_exception); + END + break; + + DEFAULT + ogs_error("Invalid API name %s", sbi_message->h.service.name); + ogs_assert(true == + ogs_sbi_server_send_error(stream, + OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message, + "Invalid API name", sbi_message->h.service.name)); + OGS_FSM_TRAN(s, smf_gsm_state_exception); + END + break; + default: ogs_error("Unknown event %s", smf_event_get_name(e)); break;
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/tests/attach/auth-test.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/tests/attach/auth-test.c
Changed
@@ -410,6 +410,87 @@ rv = testenb_s1ap_send(s1ap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* + * --- Immediately Re-attach Test --- + * + * Problems with Purge-UE-Request/Answer can occur + * in the following situations + * + * 1. Attach Request + * 2. Authentication request + * 3. Authentication reject + * 4. UEContextReleaseCommand + * 5. UEContextReleaseComplete + * 6. Purge-UE-Request + * 7. Attach Request + * 8. Purge-UE-Answer + * 9. (UE Context Remove) + * + * To resolve this issue, we have changed to delete the UE-Context + * via mme_ue_remove() immediately upon receiving UEContextReleaseComplete() + * without calling mme_s6a_send_pur(). + * + * The test below was created to indicate that mme_s6a_send_pur() + * should be added in the future to take this into account. + */ + + /* Send Attach Request */ + memset(&sess->pdn_connectivity_param, + 0, sizeof(sess->pdn_connectivity_param)); + sess->pdn_connectivity_param.eit = 1; + sess->pdn_connectivity_param.pco = 1; + sess->pdn_connectivity_param.request_type = + OGS_NAS_EPS_REQUEST_TYPE_INITIAL; + esmbuf = testesm_build_pdn_connectivity_request(sess, false); + ABTS_PTR_NOTNULL(tc, esmbuf); + + memset(&test_ue->attach_request_param, + 0, sizeof(test_ue->attach_request_param)); + test_ue->attach_request_param.drx_parameter = 1; + test_ue->attach_request_param.tmsi_status = 1; + test_ue->attach_request_param.mobile_station_classmark_2 = 1; + test_ue->attach_request_param.additional_update_type = 1; + test_ue->attach_request_param.ue_usage_setting = 1; + emmbuf = testemm_build_attach_request(test_ue, esmbuf, false, false); + ABTS_PTR_NOTNULL(tc, emmbuf); + + memset(&test_ue->initial_ue_param, 0, sizeof(test_ue->initial_ue_param)); + sendbuf = test_s1ap_build_initial_ue_message( + test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Signalling, false); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive Authentication Request */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* Send Authentication failure - MAC failure */ + emmbuf = testemm_build_authentication_failure( + test_ue, OGS_NAS_EMM_CAUSE_MAC_FAILURE, 0); + ABTS_PTR_NOTNULL(tc, emmbuf); + sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive Authentication reject */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* Receive UE Context Release Command */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* Send UE Context Release Complete */ + sendbuf = test_s1ap_build_ue_context_release_complete(test_ue); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + ogs_msleep(300); /********** Remove Subscriber in Database */
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/tests/attach/emm-status-test.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/tests/attach/emm-status-test.c
Changed
@@ -35,6 +35,9 @@ test_sess_t *sess = NULL; test_bearer_t *bearer = NULL; + uint32_t enb_ue_s1ap_id; + uint64_t mme_ue_s1ap_id; + bson_t *doc = NULL; /* Setup Test UE & Session Context */ @@ -53,7 +56,7 @@ ogs_assert(test_ue); test_ue->e_cgi.cell_id = 0x1079baf0; - test_ue->nas.ksi = OGS_NAS_KSI_NO_KEY_IS_AVAILABLE; + test_ue->nas.ksi = 0; test_ue->nas.value = OGS_NAS_ATTACH_TYPE_COMBINED_EPS_IMSI_ATTACH; test_ue->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc"; @@ -88,7 +91,9 @@ ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_ue, doc)); /* Send Attach Request */ - sess->pdn_connectivity_param.pco = 1; + memset(&sess->pdn_connectivity_param, + 0, sizeof(sess->pdn_connectivity_param)); + sess->pdn_connectivity_param.eit = 1; sess->pdn_connectivity_param.request_type = OGS_NAS_EPS_REQUEST_TYPE_INITIAL; esmbuf = testesm_build_pdn_connectivity_request(sess, false); @@ -101,9 +106,10 @@ test_ue->attach_request_param.tmsi_status = 1; test_ue->attach_request_param.mobile_station_classmark_2 = 1; test_ue->attach_request_param.ue_usage_setting = 1; - emmbuf = testemm_build_attach_request(test_ue, esmbuf, false, false); + emmbuf = testemm_build_attach_request(test_ue, esmbuf, true, false); ABTS_PTR_NOTNULL(tc, emmbuf); + memset(&test_ue->initial_ue_param, 0, sizeof(test_ue->initial_ue_param)); sendbuf = test_s1ap_build_initial_ue_message( test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Signalling, false); ABTS_INT_EQUAL(tc, OGS_OK, rv); @@ -137,6 +143,20 @@ rv = testenb_s1ap_send(s1ap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* Receive ESM Information Request */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* Send ESM Information Response */ + sess->esm_information_param.epco = 1; + esmbuf = testesm_build_esm_information_response(sess); + ABTS_PTR_NOTNULL(tc, esmbuf); + sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ @@ -152,6 +172,44 @@ ABTS_PTR_NOTNULL(tc, sendbuf); rv = testenb_s1ap_send(s1ap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send UE Capability Info Indication */ + sendbuf = tests1ap_build_ue_radio_capability_info_indication(test_ue); + ABTS_PTR_NOTNULL(tc, sendbuf); + 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); + ogs_assert(bearer); + esmbuf = testesm_build_activate_default_eps_bearer_context_accept( + bearer, false); + ABTS_PTR_NOTNULL(tc, esmbuf); + emmbuf = testemm_build_attach_complete(test_ue, esmbuf); + ABTS_PTR_NOTNULL(tc, emmbuf); + sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf); + 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); + 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);
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/tests/registration/dereg-test.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/tests/registration/dereg-test.c
Changed
@@ -1584,6 +1584,304 @@ test_ue_remove(test_ue); } +static void test6_issues2917_func(abts_case *tc, void *data) +{ + int rv; + ogs_socknode_t *ngap; + ogs_socknode_t *gtpu; + ogs_pkbuf_t *gmmbuf; + ogs_pkbuf_t *gsmbuf; + ogs_pkbuf_t *nasbuf; + ogs_pkbuf_t *sendbuf; + ogs_pkbuf_t *recvbuf; + ogs_ngap_message_t message; + int i; + + ogs_nas_5gs_mobile_identity_suci_t mobile_identity_suci; + test_ue_t *test_ue = NULL; + test_sess_t *sess = NULL; + test_bearer_t *qos_flow = NULL; + + bson_t *doc = NULL; + + /* Setup Test UE & Session Context */ + memset(&mobile_identity_suci, 0, sizeof(mobile_identity_suci)); + + mobile_identity_suci.h.supi_format = OGS_NAS_5GS_SUPI_FORMAT_IMSI; + mobile_identity_suci.h.type = OGS_NAS_5GS_MOBILE_IDENTITY_SUCI; + mobile_identity_suci.routing_indicator1 = 0; + mobile_identity_suci.routing_indicator2 = 0xf; + mobile_identity_suci.routing_indicator3 = 0xf; + mobile_identity_suci.routing_indicator4 = 0xf; + mobile_identity_suci.protection_scheme_id = OGS_PROTECTION_SCHEME_NULL; + mobile_identity_suci.home_network_pki_value = 0; + + test_ue = test_ue_add_by_suci(&mobile_identity_suci, "0000203190"); + ogs_assert(test_ue); + + test_ue->nr_cgi.cell_id = 0x40001; + + test_ue->nas.registration.tsc = 0; + test_ue->nas.registration.ksi = OGS_NAS_KSI_NO_KEY_IS_AVAILABLE; + test_ue->nas.registration.follow_on_request = 1; + test_ue->nas.registration.value = OGS_NAS_5GS_REGISTRATION_TYPE_INITIAL; + + test_ue->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc"; + test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca"; + + /* gNB connects to AMF */ + ngap = testngap_client(AF_INET); + ABTS_PTR_NOTNULL(tc, ngap); + + /* gNB connects to UPF */ + gtpu = test_gtpu_server(1, AF_INET); + ABTS_PTR_NOTNULL(tc, gtpu); + + /* Send NG-Setup Reqeust */ + sendbuf = testngap_build_ng_setup_request(0x4000, 26); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive NG-Setup Response */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + + /********** Insert Subscriber in Database */ + doc = test_db_new_simple(test_ue); + ABTS_PTR_NOTNULL(tc, doc); + ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_ue, doc)); + + /* Send Registration request */ + gmmbuf = testgmm_build_registration_request(test_ue, NULL, false, false); + ABTS_PTR_NOTNULL(tc, gmmbuf); + + test_ue->registration_request_param.gmm_capability = 1; + test_ue->registration_request_param.s1_ue_network_capability = 1; + test_ue->registration_request_param.requested_nssai = 1; + test_ue->registration_request_param.last_visited_registered_tai = 1; + test_ue->registration_request_param.ue_usage_setting = 1; + nasbuf = testgmm_build_registration_request(test_ue, NULL, false, false); + ABTS_PTR_NOTNULL(tc, nasbuf); + + sendbuf = testngap_build_initial_ue_message(test_ue, gmmbuf, + NGAP_RRCEstablishmentCause_mo_Signalling, false, true); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive Authentication request */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + + /* Send Authentication response */ + gmmbuf = testgmm_build_authentication_response(test_ue); + ABTS_PTR_NOTNULL(tc, gmmbuf); + sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive Security mode command */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + + /* Send Security mode complete */ + gmmbuf = testgmm_build_security_mode_complete(test_ue, nasbuf); + ABTS_PTR_NOTNULL(tc, gmmbuf); + sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive InitialContextSetupRequest + + * Registration accept */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + NGAP_ProcedureCode_id_InitialContextSetup, + test_ue->ngap_procedure_code); + + /* Send UERadioCapabilityInfoIndication */ + sendbuf = testngap_build_ue_radio_capability_info_indication(test_ue); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send InitialContextSetupResponse */ + sendbuf = testngap_build_initial_context_setup_response(test_ue, false); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send Registration complete */ + gmmbuf = testgmm_build_registration_complete(test_ue); + ABTS_PTR_NOTNULL(tc, gmmbuf); + sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive Configuration update command */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + + /* Send PDU session establishment request */ + sess = test_sess_add_by_dnn_and_psi(test_ue, "internet", 5); + ogs_assert(sess); + + sess->ul_nas_transport_param.request_type = + OGS_NAS_5GS_REQUEST_TYPE_INITIAL; + sess->ul_nas_transport_param.dnn = 1; + sess->ul_nas_transport_param.s_nssai = 1; + + sess->pdu_session_establishment_param.ssc_mode = 1; + sess->pdu_session_establishment_param.epco = 1; + + gsmbuf = testgsm_build_pdu_session_establishment_request(sess); + ABTS_PTR_NOTNULL(tc, gsmbuf); + gmmbuf = testgmm_build_ul_nas_transport(sess, + OGS_NAS_PAYLOAD_CONTAINER_N1_SM_INFORMATION, gsmbuf); + ABTS_PTR_NOTNULL(tc, gmmbuf); + sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive PDUSessionResourceSetupRequest + + * DL NAS transport + + * PDU session establishment accept */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + NGAP_ProcedureCode_id_PDUSessionResourceSetup, + test_ue->ngap_procedure_code); + + /* Send GTP-U ICMP Packet */ + qos_flow = test_qos_flow_find_by_qfi(sess, 1); + ogs_assert(qos_flow); + rv = test_gtpu_send_ping(gtpu, qos_flow, TEST_PING_IPV4); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send PDUSessionResourceSetupResponse */ + sendbuf = testngap_sess_build_pdu_session_resource_setup_response(sess); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive GTP-U ICMP Packet */ + recvbuf = testgnb_gtpu_read(gtpu); + ABTS_PTR_NOTNULL(tc, recvbuf); + ogs_pkbuf_free(recvbuf); +
View file
open5gs_2.7.0.76.3f097.202402022026.tar.xz/tests/registration/gmm-status-test.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/tests/registration/gmm-status-test.c
Changed
@@ -73,7 +73,7 @@ ABTS_PTR_NOTNULL(tc, gtpu); /* Send NG-Setup Reqeust */ - sendbuf = testngap_build_ng_setup_request(0x4000, 28); + sendbuf = testngap_build_ng_setup_request(0x4000, 22); ABTS_PTR_NOTNULL(tc, sendbuf); rv = testgnb_ngap_send(ngap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); @@ -89,6 +89,7 @@ ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_ue, doc)); /* Send Registration request */ + test_ue->registration_request_param.guti = 1; gmmbuf = testgmm_build_registration_request(test_ue, NULL, false, false); ABTS_PTR_NOTNULL(tc, gmmbuf); @@ -106,6 +107,19 @@ rv = testgnb_ngap_send(ngap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* Receive Identity request */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + + /* Send Identity response */ + gmmbuf = testgmm_build_identity_response(test_ue); + ABTS_PTR_NOTNULL(tc, gmmbuf); + sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* Receive Authentication request */ recvbuf = testgnb_ngap_read(ngap); ABTS_PTR_NOTNULL(tc, recvbuf); @@ -132,6 +146,15 @@ rv = testgnb_ngap_send(ngap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* Send GMM Status */ + gmmbuf = testgmm_build_gmm_status(test_ue, + OGS_5GMM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_THE_PROTOCOL_STATE); + ABTS_PTR_NOTNULL(tc, gmmbuf); + sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* Receive InitialContextSetupRequest + * Registration accept */ recvbuf = testgnb_ngap_read(ngap); @@ -141,6 +164,12 @@ NGAP_ProcedureCode_id_InitialContextSetup, test_ue->ngap_procedure_code); + /* Send UERadioCapabilityInfoIndication */ + sendbuf = testngap_build_ue_radio_capability_info_indication(test_ue); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* Send InitialContextSetupResponse */ sendbuf = testngap_build_initial_context_setup_response(test_ue, false); ABTS_PTR_NOTNULL(tc, sendbuf); @@ -167,7 +196,7 @@ sess->ul_nas_transport_param.request_type = OGS_NAS_5GS_REQUEST_TYPE_INITIAL; sess->ul_nas_transport_param.dnn = 1; - sess->ul_nas_transport_param.s_nssai = 1; + sess->ul_nas_transport_param.s_nssai = 0; sess->pdu_session_establishment_param.ssc_mode = 1; sess->pdu_session_establishment_param.epco = 1; @@ -192,24 +221,16 @@ NGAP_ProcedureCode_id_PDUSessionResourceSetup, test_ue->ngap_procedure_code); - /* - * Related to issue #536. When running with VirtualBox 1 Core, - * AMF sends namf-callback response very late. In SMF, - * the Session context has already been removed, so an assertion occurs. - * - * It seems to be related to the response part of MHD. We will check - * if the same situation occurs after upgrading to nghttp2. - * - * If this issue still occurs on nghttp2, - * I will remove the assertion from SMF. - */ - ogs_msleep(100); + /* Send PDUSessionResourceSetupResponse */ + sendbuf = testngap_sess_build_pdu_session_resource_setup_response(sess); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); - /* Send GMM Status */ - gmmbuf = testgmm_build_gmm_status(test_ue, - OGS_5GMM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_THE_PROTOCOL_STATE); - ABTS_PTR_NOTNULL(tc, gmmbuf); - sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf); + /* Send UEContextReleaseRequest */ + sendbuf = testngap_build_ue_context_release_request(test_ue, + NGAP_Cause_PR_radioNetwork, NGAP_CauseRadioNetwork_user_inactivity, + true); ABTS_PTR_NOTNULL(tc, sendbuf); rv = testgnb_ngap_send(ngap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); @@ -228,6 +249,8 @@ rv = testgnb_ngap_send(ngap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); + ogs_msleep(300); + /********** Remove Subscriber in Database */ ABTS_INT_EQUAL(tc, OGS_OK, test_db_remove_ue(test_ue));
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.