Projects
osmocom:nightly
open5gs
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 1360
View file
open5gs_2.7.6.4907.8811.202603121800.dsc -> open5gs_2.7.6.4909.9331.202603131800.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.4907.8811.202603121800 +Version: 2.7.6.4909.9331.202603131800 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: - 01fa8b29d6c71ff709c5051d4cbec7ac727fd710 15131072 open5gs_2.7.6.4907.8811.202603121800.tar.xz + e721f6595e829716f1019b9ff8dcdb295d7b2abc 15132144 open5gs_2.7.6.4909.9331.202603131800.tar.xz Checksums-Sha256: - 4553bf2ad771213d68d4deffe66773baccb0880832f6f0f0998c99538401b2d1 15131072 open5gs_2.7.6.4907.8811.202603121800.tar.xz + b77d5141912e002835e5915451ba347764bfec45cbb444c0d490c6d174a477d3 15132144 open5gs_2.7.6.4909.9331.202603131800.tar.xz Files: - 590c82d2ef34d5d86d44051dada31354 15131072 open5gs_2.7.6.4907.8811.202603121800.tar.xz + 04add8c303eab457e1114122a7607993 15132144 open5gs_2.7.6.4909.9331.202603131800.tar.xz
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/.tarball-version -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.7.6.4907-8811.202603121800 +2.7.6.4909-9331.202603131800
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/debian/changelog -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.7.6.4907.8811.202603121800) unstable; urgency=medium +open5gs (2.7.6.4909.9331.202603131800) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Thu, 12 Mar 2026 18:01:56 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Fri, 13 Mar 2026 18:01:55 +0000 open5gs (2.7.6) unstable; urgency=medium
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/docs/_pages/docs.md -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/docs/_pages/docs.md
Changed
@@ -72,7 +72,8 @@ - Select UPF based on S-NSSAI(https://github.com/s5uishida/open5gs_5gc_ueransim_snssai_upf_sample_config) - SCP Indirect communication Model C(https://github.com/s5uishida/open5gs_5gc_ueransim_scp_model_c_sample_config) - Monitoring Metrics with Prometheus(https://github.com/s5uishida/open5gs_5gc_ueransim_metrics_sample_config) - - Frame Routing(https://github.com/s5uishida/open5gs_5gc_ueransim_framed_routing_sample_config) + - Frame Routing with Open5GS UPF(https://github.com/s5uishida/open5gs_5gc_ueransim_framed_routing_sample_config) + - Frame Routing with OAI-CN5G-UPF(https://github.com/s5uishida/open5gs_5gc_ueransim_oai_upf_framed_routing_sample_config) - VPP-UPF with DPDK(https://github.com/s5uishida/open5gs_5gc_ueransim_vpp_upf_dpdk_sample_config) - UERANSIM with eUPF(eBPF/XDP UPF)(https://github.com/s5uishida/open5gs_5gc_ueransim_eupf_sample_config) - srsRAN with eUPF(eBPF/XDP UPF)(https://github.com/s5uishida/open5gs_epc_srsran_eupf_sample_config)
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/lib/sbi/nf-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/lib/sbi/nf-sm.c
Changed
@@ -275,6 +275,52 @@ } } +static bool nf_status_subscription_exists( + const char *req_nf_instance_id, + OpenAPI_nf_type_e nf_type, + const char *service_name) +{ + ogs_sbi_subscription_data_t *s = NULL; + bool same_nf_type = false; + bool same_service_name = false; + bool nf_type_present = false; + bool service_name_present = false; + + ogs_assert(req_nf_instance_id); + + nf_type_present = (nf_type != OpenAPI_nf_type_NULL); + service_name_present = (service_name != NULL); + + ogs_list_for_each(&ogs_sbi_self()->subscription_data_list, s) { + if (!s->req_nf_instance_id) + continue; + + if (strcmp(s->req_nf_instance_id, req_nf_instance_id) != 0) + continue; + + if (s->flags & OGS_SBI_SUBSCRIPTION_DELETE_SENT) + continue; + + same_nf_type = false; + same_service_name = false; + + if (nf_type_present && + s->subscr_cond.nf_type != OpenAPI_nf_type_NULL && + s->subscr_cond.nf_type == nf_type) + same_nf_type = true; + + if (service_name_present && + s->subscr_cond.service_name && + strcmp(s->subscr_cond.service_name, service_name) == 0) + same_service_name = true; + + if (same_nf_type || same_service_name) + return true; + } + + return false; +} + void ogs_sbi_nf_state_registered(ogs_fsm_t *s, ogs_event_t *e) { ogs_sbi_nf_instance_t *nf_instance = NULL; @@ -308,6 +354,15 @@ ogs_list_for_each( &ogs_sbi_self()->subscription_spec_list, subscription_spec) { + if (nf_status_subscription_exists( + ogs_sbi_self()->nf_instance->id, + subscription_spec->subscr_cond.nf_type, + subscription_spec->subscr_cond.service_name)) { + ogs_warn("%s NF status subscription already exists, skip", + ogs_sbi_self()->nf_instance->id); + continue; + } + ogs_nnrf_nfm_send_nf_status_subscribe( ogs_sbi_self()->nf_instance->nf_type, ogs_sbi_self()->nf_instance->id,
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/amf/amf-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/amf/amf-sm.c
Changed
@@ -417,14 +417,17 @@ CASE(OGS_SBI_HTTP_METHOD_DELETE) if (sbi_message.res_status == - OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", sbi_message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/ausf/ausf-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/ausf/ausf-sm.c
Changed
@@ -274,15 +274,17 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == - OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/bsf/bsf-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/bsf/bsf-sm.c
Changed
@@ -293,14 +293,17 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/mme/mme-context.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/mme/mme-context.c
Changed
@@ -4063,6 +4063,25 @@ sgw_ue_t *sgw_ue = NULL, *old_sgw_ue = NULL; ogs_assert(mme_ue && imsi_bcd); + /* + * Issues: #4357 + * + * Remove the old IMSI hash entry BEFORE overwriting mme_ue->imsi. + * + * Previously, the hash removal at the end of this function used + * mme_ue->imsi AFTER it had already been overwritten with the new IMSI, + * so the OLD IMSI entry was never actually removed from the hash table. + * + * This caused a dangling pointer: the old IMSI key still pointed to + * this mme_ue_t, and after mme_ue_remove() freed the object (with + * mme_ue_fsm_fini()), a subsequent lookup by the old IMSI would return + * a context with an invalid FSM state, leading to ogs_assert_if_reached() + * in mme_state_operational(). + */ + if (mme_ue->imsi_len != 0) + ogs_hash_set(mme_self()->imsi_ue_hash, + mme_ue->imsi, mme_ue->imsi_len, NULL); + ogs_cpystrn(mme_ue->imsi_bcd, imsi_bcd, OGS_MAX_IMSI_BCD_LEN+1); ogs_bcd_to_buffer(mme_ue->imsi_bcd, mme_ue->imsi, &mme_ue->imsi_len); @@ -4134,10 +4153,8 @@ } } - if (mme_ue->imsi_len != 0) - ogs_hash_set(mme_self()->imsi_ue_hash, - mme_ue->imsi, mme_ue->imsi_len, NULL); - + /* Register new IMSI in hash. + * Old IMSI hash entry was already removed at the top of this function. */ ogs_hash_set(self.imsi_ue_hash, mme_ue->imsi, mme_ue->imsi_len, mme_ue); mme_ue->hssmap = mme_hssmap_find_by_imsi_bcd(mme_ue->imsi_bcd);
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/nssf/nssf-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/nssf/nssf-sm.c
Changed
@@ -280,15 +280,17 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == - OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/pcf/pcf-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/pcf/pcf-sm.c
Changed
@@ -440,15 +440,17 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == - OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/scp/scp-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/scp/scp-sm.c
Changed
@@ -226,14 +226,17 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/sepp/sepp-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/sepp/sepp-sm.c
Changed
@@ -330,14 +330,17 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/smf/smf-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/smf/smf-sm.c
Changed
@@ -903,14 +903,17 @@ CASE(OGS_SBI_HTTP_METHOD_DELETE) if (sbi_message.res_status == - OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", sbi_message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/udm/udm-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/udm/udm-sm.c
Changed
@@ -364,15 +364,17 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == - OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; DEFAULT
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/src/udr/udr-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/src/udr/udr-sm.c
Changed
@@ -284,17 +284,20 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == - OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; + DEFAULT ogs_error("%s Invalid HTTP method %s", subscription_data->id, message.h.method);
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/tests/af/af-sm.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/tests/af/af-sm.c
Changed
@@ -262,16 +262,20 @@ break; CASE(OGS_SBI_HTTP_METHOD_DELETE) - if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) { - ogs_sbi_subscription_data_remove(subscription_data); - } else { + if (message.res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT) + ogs_info("%s Subscription deleted", + subscription_data->id ? + subscription_data->id : "Unknown"); + else ogs_error("%s HTTP response error %d", subscription_data->id ? subscription_data->id : "Unknown", message.res_status); - } + + ogs_sbi_subscription_data_remove(subscription_data); break; + DEFAULT ogs_error("Invalid HTTP method %s", message.h.method); ogs_assert_if_reached();
View file
open5gs_2.7.6.4907.8811.202603121800.tar.xz/tests/attach/crash-test.c -> open5gs_2.7.6.4909.9331.202603131800.tar.xz/tests/attach/crash-test.c
Changed
@@ -442,6 +442,375 @@ testenb_s1ap_close(s1ap); } +#if 0 +static void test6_issues4357_func(abts_case *tc, void *data) +{ + int rv; + ogs_socknode_t *s1ap; + ogs_socknode_t *gtpu; + ogs_pkbuf_t *emmbuf; + ogs_pkbuf_t *esmbuf; + ogs_pkbuf_t *sendbuf; + ogs_pkbuf_t *recvbuf; + ogs_s1ap_message_t message; + + ogs_nas_5gs_mobile_identity_suci_t mobile_identity_suci; + test_ue_t *test_ue = NULL; + 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 */ + 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, "0000000010"); + 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.value = OGS_NAS_ATTACH_TYPE_COMBINED_EPS_IMSI_ATTACH; + + test_ue->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc"; + test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca"; + + sess = test_sess_add_by_apn(test_ue, "internet", OGS_GTP2_RAT_TYPE_EUTRAN); + ogs_assert(sess); + + /* eNB connects to MME */ + s1ap = tests1ap_client(AF_INET); + ABTS_PTR_NOTNULL(tc, s1ap); + + /* eNB connects to SGW */ + gtpu = test_gtpu_server(1, AF_INET); + ABTS_PTR_NOTNULL(tc, gtpu); + + /* Send S1-Setup Reqeust */ + sendbuf = test_s1ap_build_s1_setup_request( + S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive S1-Setup Response */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(NULL, 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 Attach Request */ + 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, OGS_NAS_EPS_PDN_TYPE_IPV4V6); + 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.ms_network_capability = 1; + 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, 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); + 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 response */ + emmbuf = testemm_build_authentication_response(test_ue); + 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 Security mode Command */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* Send Security mode complete */ + test_ue->mobile_identity_imeisv_presence = true; + emmbuf = testemm_build_security_mode_complete(test_ue); + 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 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 */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* 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 Attach Request - INVALID IMSI */ + sess->pti = 1; + test_ue->mobile_identity_imsi.odd_even = 0; + + memset(&sess->pdn_connectivity_param, + 0, sizeof(sess->pdn_connectivity_param)); + sess->pdn_connectivity_param.request_type = + OGS_NAS_EPS_REQUEST_TYPE_INITIAL; + esmbuf = testesm_build_pdn_connectivity_request( + sess, false, OGS_NAS_EPS_PDN_TYPE_IPV4V6); + ABTS_PTR_NOTNULL(tc, esmbuf); + + memset(&test_ue->attach_request_param, + 0, sizeof(test_ue->attach_request_param)); + emmbuf = testemm_build_attach_request(test_ue, esmbuf, true, true); + 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 Attach 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); + + /* Send Attach Request - Valid IMSI */ + sess->pti = 1; + test_ue->mobile_identity_imsi.odd_even = 1; + + memset(&sess->pdn_connectivity_param, + 0, sizeof(sess->pdn_connectivity_param)); + sess->pdn_connectivity_param.request_type = + OGS_NAS_EPS_REQUEST_TYPE_INITIAL; + esmbuf = testesm_build_pdn_connectivity_request( + sess, false, OGS_NAS_EPS_PDN_TYPE_IPV4V6); + ABTS_PTR_NOTNULL(tc, esmbuf); + + memset(&test_ue->attach_request_param, + 0, sizeof(test_ue->attach_request_param)); + 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 response */ + emmbuf = testemm_build_authentication_response(test_ue); + 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 Security mode Command */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* Send Security mode complete */ + test_ue->mobile_identity_imeisv_presence = true; + emmbuf = testemm_build_security_mode_complete(test_ue); + 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 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 */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* 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 Detach Request */ + emmbuf = testemm_build_detach_request(test_ue, 1, true, false); + ABTS_PTR_NOTNULL(tc, emmbuf); + sendbuf = test_s1ap_build_initial_ue_message( + test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Signalling, true); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive OLD UE Context Release Command */ + enb_ue_s1ap_id = test_ue->enb_ue_s1ap_id; + + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* Send OLD 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); + + test_ue->enb_ue_s1ap_id = enb_ue_s1ap_id; + + /* 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 */ + ABTS_INT_EQUAL(tc, OGS_OK, test_db_remove_ue(test_ue)); + + /* eNB disonncect from MME */ + testenb_s1ap_close(s1ap); + + /* eNB disonncect from SGW */ + test_gtpu_close(gtpu); + + test_ue_remove(test_ue); +} +#endif + abts_suite *test_crash(abts_suite *suite) { suite = ADD_SUITE(suite) @@ -484,6 +853,9 @@ #endif abts_run_test(suite, test5_func, NULL); +#if 0 /* Commenting to suppress error messages */ + abts_run_test(suite, test6_issues4357_func, NULL); +#endif 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
.