Projects
osmocom:nightly
open5gs
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 1312
View file
open5gs_2.7.6.4863.9262.202601221800.dsc -> open5gs_2.7.6.4864.7367.202601231800.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.6.4863.9262.202601221800 +Version: 2.7.6.4864.7367.202601231800 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: - abfacee649061a32aed845f3d69cb457f722de5c 15114352 open5gs_2.7.6.4863.9262.202601221800.tar.xz + 0c1c3341aa19f807448bc02555637ba3204930ad 15114940 open5gs_2.7.6.4864.7367.202601231800.tar.xz Checksums-Sha256: - b06fc96e88a94932beab49fe0d66df1da4b45623c2482b0c35f73a91230c98a0 15114352 open5gs_2.7.6.4863.9262.202601221800.tar.xz + 0b6516865c27a2a6bf818672a2db993c9eeccfb130220d0eb59a82d79c6c1b6a 15114940 open5gs_2.7.6.4864.7367.202601231800.tar.xz Files: - f9114a147f432f86b80342e7ddb9c662 15114352 open5gs_2.7.6.4863.9262.202601221800.tar.xz + cadabc0cef86a0c8cf7ed4abd00c25a8 15114940 open5gs_2.7.6.4864.7367.202601231800.tar.xz
View file
open5gs_2.7.6.4863.9262.202601221800.tar.xz/.tarball-version -> open5gs_2.7.6.4864.7367.202601231800.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.7.6.4863-9262.202601221800 +2.7.6.4864-7367.202601231800
View file
open5gs_2.7.6.4863.9262.202601221800.tar.xz/debian/changelog -> open5gs_2.7.6.4864.7367.202601231800.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.7.6.4863.9262.202601221800) unstable; urgency=medium +open5gs (2.7.6.4864.7367.202601231800) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Thu, 22 Jan 2026 18:01:56 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Fri, 23 Jan 2026 18:01:58 +0000 open5gs (2.7.6) unstable; urgency=medium
View file
open5gs_2.7.6.4863.9262.202601221800.tar.xz/src/amf/gmm-sm.c -> open5gs_2.7.6.4864.7367.202601231800.tar.xz/src/amf/gmm-sm.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2025 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2026 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -415,15 +415,20 @@ if ((sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_NO_CONTENT)) { - ogs_error("%s HTTP response error %d", - amf_ue->supi, sbi_message->res_status); + ogs_error("%s HTTP response error %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); } SWITCH(sbi_message->h.resource.component1) CASE(OGS_SBI_RESOURCE_NAME_AM_DATA) CASE(OGS_SBI_RESOURCE_NAME_SMF_SELECT_DATA) CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA) - ogs_error("%s Ignore SBI message", amf_ue->supi); + ogs_error("%s Ignore SBI message %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); break; CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) @@ -493,18 +498,25 @@ ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); } else { - ogs_fatal("Invalid state %d", state); + ogs_fatal("%s:%d Invalid state %d in (%s:%s)", + amf_ue->supi, state, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); ogs_assert_if_reached(); } break; DEFAULT - ogs_error("%s Ignore invalid HTTP method %s", - amf_ue->suci, sbi_message->h.method); + ogs_error("%s Ignore invalid HTTP method %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); END break; DEFAULT - ogs_error("Invalid resource name %s", + ogs_fatal("%s Invalid resource name %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, sbi_message->h.resource.component1); ogs_assert_if_reached(); END @@ -663,7 +675,8 @@ CASE(OGS_SBI_RESOURCE_NAME_POLICIES) SWITCH(sbi_message->h.method) CASE(OGS_SBI_HTTP_METHOD_POST) - if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED) { + if (sbi_message->res_status != + OGS_SBI_HTTP_STATUS_CREATED) { ogs_error("%s HTTP response error %d", amf_ue->supi, sbi_message->res_status); } @@ -1076,7 +1089,6 @@ CASE(OGS_SBI_SERVICE_NAME_NAUSF_AUTH) SWITCH(sbi_message->h.resource.component0) CASE(OGS_SBI_RESOURCE_NAME_UE_AUTHENTICATIONS) - if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED && sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK && sbi_message->res_status != OGS_SBI_HTTP_STATUS_NO_CONTENT) { @@ -1219,15 +1231,20 @@ if ((sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_NO_CONTENT)) { - ogs_error("%s HTTP response error %d", - amf_ue->supi, sbi_message->res_status); + ogs_error("%s HTTP response error %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); } SWITCH(sbi_message->h.resource.component1) CASE(OGS_SBI_RESOURCE_NAME_AM_DATA) CASE(OGS_SBI_RESOURCE_NAME_SMF_SELECT_DATA) CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA) - ogs_error("%s Ignore SBI message", amf_ue->supi); + ogs_error("%s Ignore SBI message %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); break; CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) @@ -1273,19 +1290,48 @@ amf_ue, state, NULL); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); + } else if (state == AMF_UE_INITIATED_DE_REGISTERED) { +/* + * Issues: #4209 + * + * gmm_state_registered() + * + * Ignore SDM subscription DELETE response. + * + * In some scenarios, a DELETE response for SDM_SUBSCRIPTIONS may arrive + * while the AMF is already handling a subsequent Registration Request + * (Integrity Protected). In this code path, the DELETE response is not + * relevant and does not require any further processing. + * + * The response is intentionally ignored to avoid unnecessary handling. + */ + ogs_warn("%s Ignoring SDM_SUBSCRIPTIONS DELETE " + "response %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); + + UDM_SDM_CLEAR(amf_ue); } else { - ogs_fatal("Invalid state %d", state); + ogs_fatal("%s:%d Invalid state %d in (%s:%s)", + amf_ue->supi, state, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); ogs_assert_if_reached(); } break; DEFAULT - ogs_warn("%s Ignore invalid HTTP method %s", - amf_ue->suci, sbi_message->h.method); + ogs_error("%s Ignore invalid HTTP method %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); END break; DEFAULT - ogs_error("Invalid resource name %s", + ogs_fatal("%s Invalid resource name %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, sbi_message->h.resource.component1); ogs_assert_if_reached(); END @@ -1402,7 +1448,8 @@ CASE(OGS_SBI_RESOURCE_NAME_POLICIES) SWITCH(sbi_message->h.method) CASE(OGS_SBI_HTTP_METHOD_POST) - if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED) { + if (sbi_message->res_status != + OGS_SBI_HTTP_STATUS_CREATED) { ogs_error("%s HTTP response error %d", amf_ue->supi, sbi_message->res_status); } @@ -1633,13 +1680,15 @@ amf_metrics_inst_global_inc(AMF_METR_GLOB_CTR_RM_REG_MOB_REQ); break; case OGS_NAS_5GS_REGISTRATION_TYPE_PERIODIC_UPDATING: - amf_metrics_inst_global_inc(AMF_METR_GLOB_CTR_RM_REG_PERIOD_REQ); + amf_metrics_inst_global_inc( + AMF_METR_GLOB_CTR_RM_REG_PERIOD_REQ); break; case OGS_NAS_5GS_REGISTRATION_TYPE_EMERGENCY: amf_metrics_inst_global_inc(AMF_METR_GLOB_CTR_RM_REG_EMERG_REQ); break; default: - ogs_error("Unknown reg_type%d", amf_ue->nas.registration.value); + ogs_error("Unknown reg_type%d", + amf_ue->nas.registration.value); } if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) { @@ -1658,7 +1707,8 @@ ogs_sbi_discovery_option_t *discovery_option = NULL; ogs_guami_t guami; - amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_INITIAL_STATE; + amf_ue->amf_ue_context_transfer_state = + UE_CONTEXT_INITIAL_STATE; discovery_option = ogs_sbi_discovery_option_new(); ogs_assert(discovery_option); @@ -1729,7 +1779,8 @@ if (!UDM_SDM_SUBSCRIBED(amf_ue)) { r = amf_ue_sbi_discover_and_send( OGS_SBI_SERVICE_TYPE_NUDM_UECM, NULL, - amf_nudm_uecm_build_registration, amf_ue, 0, NULL); + amf_nudm_uecm_build_registration, + amf_ue, 0, NULL); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); OGS_FSM_TRAN(s, &gmm_state_initial_context_setup); @@ -1784,10 +1835,11 @@ ogs_info("Service request"); if (state != GMM_COMMON_STATE_REGISTERED) { - ogs_info("%s Handling service request failed Not registered", - amf_ue->suci); + ogs_info("%s Handling service request failed " + "Not registered", amf_ue->suci); r = nas_5gs_send_service_reject(ran_ue, amf_ue, - OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK); + OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK + ); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); AMF_RESTORE_CONTEXT_ON_FAILURE(amf_ue, s); @@ -1809,7 +1861,8 @@ if (!AMF_UE_HAVE_SUCI(amf_ue)) { ogs_info("Service request : Unknown UE"); r = nas_5gs_send_service_reject(ran_ue, amf_ue, - OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK); + OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK + ); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); AMF_RESTORE_CONTEXT_ON_FAILURE(amf_ue, s); @@ -1819,7 +1872,8 @@ if (!h.integrity_protected || !SECURITY_CONTEXT_IS_VALID(amf_ue)) { ogs_error("No Security Context"); r = nas_5gs_send_service_reject(ran_ue, amf_ue, - OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK); + OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK + ); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); AMF_RESTORE_CONTEXT_ON_FAILURE(amf_ue, s); @@ -2349,20 +2403,59 @@ if ((sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_NO_CONTENT)) { - ogs_error("%s HTTP response error %d", - amf_ue->supi, sbi_message->res_status); + ogs_error("%s HTTP response error %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); } SWITCH(sbi_message->h.resource.component1) CASE(OGS_SBI_RESOURCE_NAME_AM_DATA) CASE(OGS_SBI_RESOURCE_NAME_SMF_SELECT_DATA) CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA) - CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) - ogs_error("%s Ignore SBI message", amf_ue->supi); + ogs_error("%s Ignore SBI message %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); break; + CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) + SWITCH(sbi_message->h.method) + CASE(OGS_SBI_HTTP_METHOD_DELETE) +/* + * Issues: #4209 + * + * gmm_state_authentication() + * + * Ignore SDM subscription DELETE response. + * + * In some scenarios, a DELETE response for SDM_SUBSCRIPTIONS may arrive + * while the AMF is already handling a subsequent Registration Request + * (Integrity Protected). In this code path, the DELETE response is not + * relevant and does not require any further processing. + * + * The response is intentionally ignored to avoid unnecessary handling. + */ + ogs_warn("%s Ignoring SDM_SUBSCRIPTIONS DELETE response" + "%d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); + + UDM_SDM_CLEAR(amf_ue); + break; + DEFAULT + ogs_error("%s Ignoring invalid HTTP method" + "%d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); + END + break; DEFAULT - ogs_error("Invalid resource name %s", + ogs_fatal("%s Invalid resource name %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, sbi_message->h.resource.component1); ogs_assert_if_reached(); END @@ -2373,7 +2466,8 @@ CASE(OGS_SBI_RESOURCE_NAME_POLICIES) SWITCH(sbi_message->h.method) CASE(OGS_SBI_HTTP_METHOD_POST) - if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED) { + if (sbi_message->res_status != + OGS_SBI_HTTP_STATUS_CREATED) { ogs_error("%s HTTP response error %d", amf_ue->supi, sbi_message->res_status); } @@ -2504,7 +2598,8 @@ break; } - if (amf_ue->amf_ue_context_transfer_state == UE_CONTEXT_TRANSFER_NEW_AMF_STATE) { + if (amf_ue->amf_ue_context_transfer_state == + UE_CONTEXT_TRANSFER_NEW_AMF_STATE) { /* * UE context transfer message has been sent * to old AMF after Registration request. @@ -2532,7 +2627,8 @@ ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); - amf_ue->amf_ue_context_transfer_state = REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE; + amf_ue->amf_ue_context_transfer_state = + REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE; break; } @@ -2592,7 +2688,8 @@ case OGS_NAS_5GS_SERVICE_REQUEST: ogs_info("%s Service request", amf_ue->supi); r = nas_5gs_send_service_reject(ran_ue, amf_ue, - OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK); + OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK + ); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); OGS_FSM_TRAN(s, &gmm_state_exception); @@ -2673,18 +2770,22 @@ CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXTS) SWITCH(sbi_message->h.resource.component2) CASE(OGS_SBI_RESOURCE_NAME_TRANSFER_UPDATE) - if (amf_ue->amf_ue_context_transfer_state != REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE) { + if (amf_ue->amf_ue_context_transfer_state != + REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE) { ogs_error("UE context transfer state not correct"); } if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) { ogs_error("%s HTTP response error %d", amf_ue->supi, sbi_message->res_status); } - r = amf_namf_comm_handle_registration_status_update_response(sbi_message, amf_ue); + r = + amf_namf_comm_handle_registration_status_update_response( + sbi_message, amf_ue); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); - amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_INITIAL_STATE; + amf_ue->amf_ue_context_transfer_state = + UE_CONTEXT_INITIAL_STATE; /* Continue with registration */ ogs_kdf_kgnb_and_kn3iwf( @@ -2699,13 +2800,15 @@ ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); - if (amf_ue->nas.message_type == OGS_NAS_5GS_REGISTRATION_REQUEST) { + if (amf_ue->nas.message_type == + OGS_NAS_5GS_REGISTRATION_REQUEST) { OGS_FSM_TRAN(s, &gmm_state_initial_context_setup); } else if (amf_ue->nas.message_type == OGS_NAS_5GS_SERVICE_REQUEST) { OGS_FSM_TRAN(s, &gmm_state_registered); } else { - ogs_fatal("Invalid OGS_NAS_5GS%d", amf_ue->nas.message_type); + ogs_fatal("Invalid OGS_NAS_5GS%d", + amf_ue->nas.message_type); ogs_assert_if_reached(); } break; @@ -2894,6 +2997,32 @@ break; CASE(OGS_SBI_SERVICE_NAME_NUDM_SDM) + if (!strcmp(sbi_message->h.resource.component1, + OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) && + !strcmp(sbi_message->h.method, OGS_SBI_HTTP_METHOD_DELETE)) { +/* + * Issues: #4209 + * + * gmm_state_initial_context_setup() + * + * Ignore SDM subscription DELETE response. + * + * In some scenarios, a DELETE response for SDM_SUBSCRIPTIONS may arrive + * while the AMF is already handling a subsequent Registration Request + * (Integrity Protected). In this code path, the DELETE response is not + * relevant and does not require any further processing. + * + * The response is intentionally ignored to avoid unnecessary handling. + */ + ogs_warn("%s Ignoring SDM_SUBSCRIPTIONS DELETE response" + "%d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); + + UDM_SDM_CLEAR(amf_ue); + break; + } SWITCH(sbi_message->h.resource.component1) CASE(OGS_SBI_RESOURCE_NAME_AM_DATA) @@ -2902,8 +3031,10 @@ CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) if ((sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED)) { - ogs_error("%s HTTP response error %d", - amf_ue->supi, sbi_message->res_status); + ogs_error("%s HTTP response error %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); r = nas_5gs_send_gmm_reject( ran_ue_find_by_id(amf_ue->ran_ue_id), amf_ue, OGS_5GMM_CAUSE_5GS_SERVICES_NOT_ALLOWED); @@ -2916,15 +3047,18 @@ rv = amf_nudm_sdm_handle_provisioned( amf_ue, state, sbi_message); if (rv != OGS_OK) { - ogs_error("%s amf_nudm_sdm_handle_provisioned(%s) failed", - amf_ue->supi, sbi_message->h.resource.component1); + ogs_error("%s amf_nudm_sdm_handle_provisioned(%s:%s) " + "failed", amf_ue->supi, sbi_message->h.method, + sbi_message->h.resource.component1); OGS_FSM_TRAN(&amf_ue->sm, &gmm_state_exception); break; } break; DEFAULT - ogs_error("Invalid resource name %s", + ogs_fatal("%s Invalid resource name %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, sbi_message->h.resource.component1); ogs_assert_if_reached(); END @@ -3078,10 +3212,12 @@ amf_metrics_inst_global_inc(AMF_METR_GLOB_CTR_RM_REG_MOB_SUCC); break; case OGS_NAS_5GS_REGISTRATION_TYPE_PERIODIC_UPDATING: - amf_metrics_inst_global_inc(AMF_METR_GLOB_CTR_RM_REG_PERIOD_SUCC); + amf_metrics_inst_global_inc( + AMF_METR_GLOB_CTR_RM_REG_PERIOD_SUCC); break; case OGS_NAS_5GS_REGISTRATION_TYPE_EMERGENCY: - amf_metrics_inst_global_inc(AMF_METR_GLOB_CTR_RM_REG_EMERG_SUCC); + amf_metrics_inst_global_inc( + AMF_METR_GLOB_CTR_RM_REG_EMERG_SUCC); break; default: ogs_error("Unknown reg_type%d", @@ -3246,7 +3382,8 @@ AMF_UE_CLEAR_5GSM_MESSAGE(amf_ue); CLEAR_AMF_UE_ALL_TIMERS(amf_ue); - if (amf_ue->amf_ue_context_transfer_state == UE_CONTEXT_TRANSFER_NEW_AMF_STATE) { + if (amf_ue->amf_ue_context_transfer_state == + UE_CONTEXT_TRANSFER_NEW_AMF_STATE) { /* * UE context transfer message has been sent * to old AMF after Registration request. @@ -3274,7 +3411,8 @@ ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); - amf_ue->amf_ue_context_transfer_state = REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE; + amf_ue->amf_ue_context_transfer_state = + REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE; break; } @@ -3544,20 +3682,59 @@ if ((sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED) && (sbi_message->res_status != OGS_SBI_HTTP_STATUS_NO_CONTENT)) { - ogs_error("%s HTTP response error %d", - amf_ue->supi, sbi_message->res_status); + ogs_error("%s HTTP response error %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); } SWITCH(sbi_message->h.resource.component1) CASE(OGS_SBI_RESOURCE_NAME_AM_DATA) CASE(OGS_SBI_RESOURCE_NAME_SMF_SELECT_DATA) CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA) - CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) - ogs_error("%s Ignore SBI message", amf_ue->supi); + ogs_error("%s Ignore SBI message %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); break; + CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) + SWITCH(sbi_message->h.method) + CASE(OGS_SBI_HTTP_METHOD_DELETE) +/* + * Issues: #4209 + * + * gmm_state_exception() + * + * Ignore SDM subscription DELETE response. + * + * In some scenarios, a DELETE response for SDM_SUBSCRIPTIONS may arrive + * while the AMF is already handling a subsequent Registration Request + * (Integrity Protected). In this code path, the DELETE response is not + * relevant and does not require any further processing. + * + * The response is intentionally ignored to avoid unnecessary handling. + */ + ogs_warn("%s Ignoring SDM_SUBSCRIPTIONS DELETE response" + "%d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); + + UDM_SDM_CLEAR(amf_ue); + break; + DEFAULT + ogs_error("%s Ignoring invalid HTTP method" + "%d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, + sbi_message->h.resource.component1); + END + break; DEFAULT - ogs_error("Invalid resource name %s", + ogs_fatal("%s Invalid resource name %d in (%s:%s)", + amf_ue->supi, sbi_message->res_status, + sbi_message->h.method, sbi_message->h.resource.component1); ogs_assert_if_reached(); END @@ -3568,7 +3745,8 @@ CASE(OGS_SBI_RESOURCE_NAME_POLICIES) SWITCH(sbi_message->h.method) CASE(OGS_SBI_HTTP_METHOD_POST) - if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED) { + if (sbi_message->res_status != + OGS_SBI_HTTP_STATUS_CREATED) { ogs_error("%s HTTP response error %d", amf_ue->supi, sbi_message->res_status); } @@ -3593,18 +3771,22 @@ CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXTS) SWITCH(sbi_message->h.resource.component2) CASE(OGS_SBI_RESOURCE_NAME_TRANSFER_UPDATE) - if (amf_ue->amf_ue_context_transfer_state != REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE) { + if (amf_ue->amf_ue_context_transfer_state != + REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE) { ogs_error("UE context transfer state not correct"); } if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) { ogs_error("%s HTTP response error %d", amf_ue->supi, sbi_message->res_status); } - r = amf_namf_comm_handle_registration_status_update_response(sbi_message, amf_ue); + r = + amf_namf_comm_handle_registration_status_update_response( + sbi_message, amf_ue); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); - amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_INITIAL_STATE; + amf_ue->amf_ue_context_transfer_state = + UE_CONTEXT_INITIAL_STATE; /* Continue with release command */ xact_count = amf_sess_xact_count(amf_ue);
View file
open5gs_2.7.6.4863.9262.202601221800.tar.xz/src/amf/nsmf-handler.c -> open5gs_2.7.6.4864.7367.202601231800.tar.xz/src/amf/nsmf-handler.c
Changed
@@ -1228,6 +1228,9 @@ * 6. UEContextReleaseComplete */ if (UDM_SDM_SUBSCRIBED(amf_ue)) { + ogs_info("%s UDM_SDM_SUCSCRIBED " + "in de_registered", + amf_ue->supi); r = amf_ue_sbi_discover_and_send( OGS_SBI_SERVICE_TYPE_NUDM_SDM, NULL, amf_nudm_sdm_build_subscription_delete, @@ -1235,6 +1238,8 @@ ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); } else if (PCF_AM_POLICY_ASSOCIATED(amf_ue)) { + ogs_info("%s PCF_AM_POLICY_ASSOCIATED " + "in de_registered", amf_ue->supi); r = amf_ue_sbi_discover_and_send( OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL, @@ -1243,6 +1248,7 @@ ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); } else { + ogs_info("%s Deregistration Accept in de_registered", amf_ue->supi); r = nas_5gs_send_de_registration_accept(amf_ue); ogs_expect(r == OGS_OK); ogs_assert(r != OGS_ERROR); @@ -1250,24 +1256,25 @@ } else if (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_authentication)) { - ogs_fatal("Release SM Context in authentication"); - ogs_assert_if_reached(); + ogs_warn("%s Release SM Context in authentication", + amf_ue->supi); } else if (OGS_FSM_CHECK( &amf_ue->sm, gmm_state_security_mode)) { - ogs_fatal("Release SM Context in security-mode"); - ogs_assert_if_reached(); + ogs_warn("%s Release SM Context in security-mode", + amf_ue->supi); } else if (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_initial_context_setup)) { - ogs_fatal("Release SM Context in initial-context-setup"); - ogs_assert_if_reached(); + ogs_warn("%s Release SM Context in " + "initial-context-setup", amf_ue->supi); } else if (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_registered)) { - ogs_fatal("Release SM Context in registered"); - ogs_assert_if_reached(); + ogs_warn("%s Release SM Context in registered", + amf_ue->supi); } else if (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_exception)) { - ogs_fatal("Release SM Context in exception"); - ogs_assert_if_reached(); + ogs_warn("%s Release SM Context in exception", + amf_ue->supi); } else { - ogs_fatal("Release SM Context : INVALID STATE"); + ogs_fatal("%s Release SM Context : INVALID STATE", + amf_ue->supi); ogs_assert_if_reached(); }
View file
open5gs_2.7.6.4863.9262.202601221800.tar.xz/tests/registration/dereg-test.c -> open5gs_2.7.6.4864.7367.202601231800.tar.xz/tests/registration/dereg-test.c
Changed
@@ -1882,6 +1882,500 @@ test_ue_remove(test_ue); } +#define TEST7_ISSUES4209_WITH_SESSION 1 + +static void test7_issues4209_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(1, 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, 22); + 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 */ + test_ue->registration_request_param.guti = 1; + 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 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); + 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); + + if (OGS_POINTER_TO_UINT(data) == TEST7_ISSUES4209_WITH_SESSION) { + /* 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 = 0; + + 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 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 De-registration request */ + gmmbuf = testgmm_build_de_registration_request(test_ue, 1, true, false); + ABTS_PTR_NOTNULL(tc, gmmbuf); + sendbuf = testngap_build_initial_ue_message(test_ue, gmmbuf, + NGAP_RRCEstablishmentCause_mo_Signalling, false, false); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send Registration request */ + memset(&test_ue->registration_request_param, 0, + sizeof(test_ue->registration_request_param)); + + 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); + + /* OLD Receive UEContextReleaseCommand */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + NGAP_ProcedureCode_id_UEContextRelease, + test_ue->ngap_procedure_code); + + /* Send OLD UEContextReleaseComplete */ + sendbuf = testngap_build_ue_context_release_complete(test_ue); + 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); + + /* OLD Receive UEContextReleaseCommand */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + NGAP_ProcedureCode_id_UEContextRelease, + test_ue->ngap_procedure_code); + + /* Send OLD UEContextReleaseComplete */ + sendbuf = testngap_build_ue_context_release_complete(test_ue); + 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); + + if (OGS_POINTER_TO_UINT(data) == TEST7_ISSUES4209_WITH_SESSION) { + /* Send PDU session establishment request */ + sess = test_sess_find_by_psi(test_ue, 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 = 0; + + 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 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 De-registration request */ + gmmbuf = testgmm_build_de_registration_request(test_ue, 1, true, false); + ABTS_PTR_NOTNULL(tc, gmmbuf); + sendbuf = testngap_build_initial_ue_message(test_ue, gmmbuf, + NGAP_RRCEstablishmentCause_mo_Signalling, false, false); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send Registration request + * - Update Registration request type + * - Uplink Data Status */ + test_ue->nas.registration.value = + OGS_NAS_5GS_REGISTRATION_TYPE_MOBILITY_UPDATING; + + if (sess) { + test_ue->registration_request_param.uplink_data_status = 1; + test_ue->registration_request_param.psimask.uplink_data_status = + 1 << sess->psi; + } + nasbuf = testgmm_build_registration_request(test_ue, NULL, false, false); + ABTS_PTR_NOTNULL(tc, nasbuf); + + memset(&test_ue->registration_request_param, 0, + sizeof(test_ue->registration_request_param)); + test_ue->registration_request_param.guti = 1; + gmmbuf = testgmm_build_registration_request(test_ue, nasbuf, true, false); + ABTS_PTR_NOTNULL(tc, gmmbuf); + + sendbuf = testngap_build_initial_ue_message(test_ue, gmmbuf, + NGAP_RRCEstablishmentCause_mo_Signalling, true, true); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* OLD Receive UEContextReleaseCommand */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + NGAP_ProcedureCode_id_UEContextRelease, + test_ue->ngap_procedure_code); + + /* Send OLD UEContextReleaseComplete */ + sendbuf = testngap_build_ue_context_release_complete(test_ue); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testgnb_ngap_send(ngap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* OLD Receive UEContextReleaseCommand */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + NGAP_ProcedureCode_id_UEContextRelease, + test_ue->ngap_procedure_code); + + /* Send OLD UEContextReleaseComplete */ + sendbuf = testngap_build_ue_context_release_complete(test_ue); + 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); + if (OGS_POINTER_TO_UINT(data) == TEST7_ISSUES4209_WITH_SESSION) { + ABTS_INT_EQUAL(tc, 0x2000, test_ue->pdu_session_reactivation_result); + } else { + ABTS_INT_EQUAL(tc, 0x0000, test_ue->pdu_session_reactivation_result); + } + + /* 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); + + /* 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); + + /* Receive Configuration update command */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + + /* 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); + + /* Receive UEContextReleaseCommand */ + recvbuf = testgnb_ngap_read(ngap); + ABTS_PTR_NOTNULL(tc, recvbuf); + testngap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + NGAP_ProcedureCode_id_UEContextRelease, + test_ue->ngap_procedure_code); + + /* Send UEContextReleaseComplete */ + sendbuf = testngap_build_ue_context_release_complete(test_ue); + ABTS_PTR_NOTNULL(tc, sendbuf); + 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)); + + /* gNB disonncect from UPF */ + testgnb_gtpu_close(gtpu); + + /* gNB disonncect from AMF */ + testgnb_ngap_close(ngap); + + /* Clear Test UE Context */ + test_ue_remove(test_ue); +} + abts_suite *test_dereg(abts_suite *suite) { suite = ADD_SUITE(suite) @@ -1892,6 +2386,9 @@ abts_run_test(suite, test4_func, NULL); abts_run_test(suite, test5_func, NULL); abts_run_test(suite, test6_issues2917_func, NULL); + abts_run_test(suite, test7_issues4209_func, NULL); + abts_run_test(suite, test7_issues4209_func, + OGS_UINT_TO_POINTER(TEST7_ISSUES4209_WITH_SESSION)); return suite; }
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
.