Projects
osmocom:master
open5gs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 466
View file
commit_1111b06ac466cd9620c0135b0eabee16450b2aa8.txt
Deleted
View file
commit_53a63e1b4084d83fded638a7c14e92a93dcf4ea5.txt
Added
View file
open5gs_2.7.1.30.1111b.dsc
Deleted
@@ -1,39 +0,0 @@ -Format: 3.0 (native) -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.1.30.1111b -Maintainer: Harald Welte <laforge@gnumonks.org> -Uploaders: Sukchan Lee <acetcom@gmail.com> -Homepage: https://open5gs.org -Standards-Version: 4.3.0 -Vcs-Browser: https://github.com/open5gs/open5gs -Vcs-Git: git://github.com/open5gs/open5gs -Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev -Package-List: - open5gs deb net optional arch=any - open5gs-amf deb net optional arch=any - open5gs-ausf deb net optional arch=any - open5gs-bsf deb net optional arch=any - open5gs-common deb net optional arch=any - open5gs-dbg deb net optional arch=any - open5gs-hss deb net optional arch=any - open5gs-mme deb net optional arch=any - open5gs-nrf deb net optional arch=any - open5gs-nssf deb net optional arch=any - open5gs-pcf deb net optional arch=any - open5gs-pcrf deb net optional arch=any - open5gs-scp deb net optional arch=any - open5gs-sepp deb net optional arch=any - open5gs-sgwc deb net optional arch=any - open5gs-sgwu deb net optional arch=any - open5gs-smf deb net optional arch=any - open5gs-udm deb net optional arch=any - open5gs-udr deb net optional arch=any - open5gs-upf deb net optional arch=any -Checksums-Sha1: - 3291aae5e844bc5e6e0ee16ea665dff84341ff71 14495692 open5gs_2.7.1.30.1111b.tar.xz -Checksums-Sha256: - 84f39c2e002a662d0331479ef84d03b658270f0b477c1d906ef58d3dc1493a54 14495692 open5gs_2.7.1.30.1111b.tar.xz -Files: - 55a45cf051f79f74cb74ed42cf2e2a4e 14495692 open5gs_2.7.1.30.1111b.tar.xz
View file
open5gs_2.7.1.31.53a6.dsc
Added
@@ -0,0 +1,39 @@ +Format: 3.0 (native) +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.1.31.53a6 +Maintainer: Harald Welte <laforge@gnumonks.org> +Uploaders: Sukchan Lee <acetcom@gmail.com> +Homepage: https://open5gs.org +Standards-Version: 4.3.0 +Vcs-Browser: https://github.com/open5gs/open5gs +Vcs-Git: git://github.com/open5gs/open5gs +Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev +Package-List: + open5gs deb net optional arch=any + open5gs-amf deb net optional arch=any + open5gs-ausf deb net optional arch=any + open5gs-bsf deb net optional arch=any + open5gs-common deb net optional arch=any + open5gs-dbg deb net optional arch=any + open5gs-hss deb net optional arch=any + open5gs-mme deb net optional arch=any + open5gs-nrf deb net optional arch=any + open5gs-nssf deb net optional arch=any + open5gs-pcf deb net optional arch=any + open5gs-pcrf deb net optional arch=any + open5gs-scp deb net optional arch=any + open5gs-sepp deb net optional arch=any + open5gs-sgwc deb net optional arch=any + open5gs-sgwu deb net optional arch=any + open5gs-smf deb net optional arch=any + open5gs-udm deb net optional arch=any + open5gs-udr deb net optional arch=any + open5gs-upf deb net optional arch=any +Checksums-Sha1: + 2f9c79ed75700eaff63c83b784aa7c4e07cf8309 14496220 open5gs_2.7.1.31.53a6.tar.xz +Checksums-Sha256: + df35345e16a437c80a8a551c426d519e976b3d28efd8ad5c066d4affd0675856 14496220 open5gs_2.7.1.31.53a6.tar.xz +Files: + 10a873a5738367162f0de91a190360a1 14496220 open5gs_2.7.1.31.53a6.tar.xz
View file
open5gs_2.7.1.30.1111b.tar.xz/.tarball-version -> open5gs_2.7.1.31.53a6.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.7.1.30-1111b +2.7.1.31-53a6
View file
open5gs_2.7.1.30.1111b.tar.xz/debian/changelog -> open5gs_2.7.1.31.53a6.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.7.1.30.1111b) unstable; urgency=medium +open5gs (2.7.1.31.53a6) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Sun, 26 May 2024 06:13:03 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Fri, 31 May 2024 13:49:25 +0000 open5gs (2.7.1) unstable; urgency=medium
View file
open5gs_2.7.1.30.1111b.tar.xz/lib/gtp/xact.c -> open5gs_2.7.1.31.53a6.tar.xz/lib/gtp/xact.c
Changed
@@ -803,6 +803,20 @@ xact->step, xact->seqxact->step-1.type, OGS_ADDR(&xact->gnode->addr, buf), OGS_PORT(&xact->gnode->addr)); + /* + * Even for remotely created transactions, there are things + * that need to be done, such as returning memory + * when the transaction is deleted after a holding timeout. + * We added a Callback Function for that purpose. + * + * You can set it up and use it as follows. + * + * xact->cb = gtp_remote_holding_timeout; + * xact->data = bearer; + */ + if (xact->cb) + xact->cb(xact, xact->data); + ogs_gtp_xact_delete(xact); } }
View file
open5gs_2.7.1.30.1111b.tar.xz/lib/gtp/xact.h -> open5gs_2.7.1.31.53a6.tar.xz/lib/gtp/xact.h
Changed
@@ -58,6 +58,26 @@ */ typedef struct ogs_gtp_xact_s { ogs_lnode_t node; /**< A node of list */ + + /* + * Issues #3240 + * + * SMF->SGW-C->MME: First Update Bearer Request + * MME->UE: First Modify EPS bearer context request + * SMF->SGW-C->MME: Second Update Bearer Request + * MME->UE: Second Modify EPS bearer context request + * UE->MME: First Modify EPS bearer context accept + * MME->SGW-C->SMF: First Update Bearer Response + * UE->MME: Second Modify EPS bearer context accept + * MME->SGW-C->SMF: Second Update Bearer Response + * + * In the above situation, while NAS-ESM messages are exchanged + * between the MME and UE, the bearer may have multiple transactions + * that need to be managed. to_update_node is used as a node + * in the Transaction List related to Update Bearer Request/Response. + */ + ogs_lnode_t to_update_node; + ogs_pool_id_t index; uint8_t gtp_version; /**< 1 or 2 */
View file
open5gs_2.7.1.30.1111b.tar.xz/src/mme/mme-context.c -> open5gs_2.7.1.31.53a6.tar.xz/src/mme/mme-context.c
Changed
@@ -4149,6 +4149,8 @@ ogs_assert(bearer); memset(bearer, 0, sizeof *bearer); + ogs_list_init(&bearer->update.xact_list); + ogs_pool_alloc(&mme_ue->ebi_pool, &bearer->ebi_node); ogs_assert(bearer->ebi_node); @@ -4176,6 +4178,7 @@ void mme_bearer_remove(mme_bearer_t *bearer) { mme_event_t e; + ogs_gtp_xact_t *xact = NULL, *next_xact = NULL; ogs_assert(bearer); ogs_assert(bearer->mme_ue); @@ -4195,6 +4198,11 @@ if (bearer->ebi_node) ogs_pool_free(&bearer->mme_ue->ebi_pool, bearer->ebi_node); + ogs_list_for_each_entry_safe(&bearer->update.xact_list, + next_xact, xact, to_update_node) { + ogs_list_remove(&bearer->update.xact_list, &xact->to_update_node); + } + ogs_pool_free(&mme_bearer_pool, bearer); }
View file
open5gs_2.7.1.30.1111b.tar.xz/src/mme/mme-context.h -> open5gs_2.7.1.31.53a6.tar.xz/src/mme/mme-context.h
Changed
@@ -873,9 +873,27 @@ mme_ue_t *mme_ue; mme_sess_t *sess; + /* + * Issues #3240 + * + * SMF->SGW-C->MME: First Update Bearer Request + * MME->UE: First Modify EPS bearer context request + * SMF->SGW-C->MME: Second Update Bearer Request + * MME->UE: Second Modify EPS bearer context request + * UE->MME: First Modify EPS bearer context accept + * MME->SGW-C->SMF: First Update Bearer Response + * UE->MME: Second Modify EPS bearer context accept + * MME->SGW-C->SMF: Second Update Bearer Response + * + * We'll start by managing only Update Bearer Request/Response + * as a list so that we can manage multiple of them. + */ struct { ogs_gtp_xact_t *xact; - } create, update, delete, notify; + } create, delete, notify; + struct { + ogs_list_t xact_list; + } update; } mme_bearer_t; void mme_context_init(void);
View file
open5gs_2.7.1.30.1111b.tar.xz/src/mme/mme-gtp-path.c -> open5gs_2.7.1.31.53a6.tar.xz/src/mme/mme-gtp-path.c
Changed
@@ -427,7 +427,7 @@ { int rv; - ogs_gtp_xact_t *xact = NULL; + ogs_gtp_xact_t *xact = NULL, *next_xact = NULL; mme_ue_t *mme_ue = NULL; sgw_ue_t *sgw_ue = NULL; @@ -439,7 +439,27 @@ ogs_assert(mme_ue); sgw_ue = mme_ue->sgw_ue; ogs_assert(sgw_ue); - xact = ogs_gtp_xact_cycle(bearer->update.xact); + + /* + * Issues #3240 + * + * SMF->SGW-C->MME: First Update Bearer Request + * MME->UE: First Modify EPS bearer context request + * SMF->SGW-C->MME: Second Update Bearer Request + * MME->UE: Second Modify EPS bearer context request + * UE->MME: First Modify EPS bearer context accept + * MME->SGW-C->SMF: First Update Bearer Response + * UE->MME: Second Modify EPS bearer context accept + * MME->SGW-C->SMF: Second Update Bearer Response + * + * After sending the Update Bearer Response, remove the corresponding + * Transaction Node from the list managed by the Bearer Context. + */ + ogs_list_for_each_entry_safe( + &bearer->update.xact_list, next_xact, xact, to_update_node) { + ogs_list_remove(&bearer->update.xact_list, &xact->to_update_node); + break; + } if (!xact) { ogs_warn("GTP transaction(UPDATE) has already been removed"); return OGS_OK;
View file
open5gs_2.7.1.30.1111b.tar.xz/src/mme/mme-path.c -> open5gs_2.7.1.31.53a6.tar.xz/src/mme/mme-path.c
Changed
@@ -218,7 +218,13 @@ mme_gtp_send_update_bearer_response( bearer, OGS_GTP2_CAUSE_UNABLE_TO_PAGE_UE)); } else { - ogs_gtp_xact_t *xact = ogs_gtp_xact_cycle(bearer->update.xact); + ogs_gtp_xact_t *xact = NULL; + + /* Get the first Entry */ + ogs_list_for_each_entry( + &bearer->update.xact_list, xact, to_update_node) { + break; + } if (!xact) { ogs_error("No GTP xact"); goto cleanup;
View file
open5gs_2.7.1.30.1111b.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.7.1.31.53a6.tar.xz/src/mme/mme-s11-handler.c
Changed
@@ -59,6 +59,94 @@ return OGS_NAS_ESM_CAUSE_NETWORK_FAILURE; } +static void gtp_remote_holding_timeout(ogs_gtp_xact_t *xact, void *data) +{ + char bufOGS_ADDRSTRLEN; + mme_bearer_t *bearer = data; + uint8_t type; + + ogs_assert(xact); + bearer = mme_bearer_cycle(bearer); + ogs_assert(bearer); + + type = xact->seqxact->step-1.type; + + ogs_warn("%d %s HOLDING TIMEOUT " + "for step %d type %d peer %s:%d", + xact->xid, + xact->org == OGS_GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", + xact->step, type, + OGS_ADDR(&xact->gnode->addr, buf), + OGS_PORT(&xact->gnode->addr)); + + /* + * Issues #3240 + * + * SMF->SGW-C->MME: First Update Bearer Request + * MME->UE: First Modify EPS bearer context request + * SMF->SGW-C->MME: Second Update Bearer Request + * MME->UE: Second Modify EPS bearer context request + * UE->MME: First Modify EPS bearer context accept + * MME->SGW-C->SMF: First Update Bearer Response + * UE->MME: Second Modify EPS bearer context accept + * MME->SGW-C->SMF: Second Update Bearer Response + */ + switch (type) { + case OGS_GTP2_UPDATE_BEARER_REQUEST_TYPE: + /* + * In this case, a timeout occurs while waiting + * for Modify EPS bearer context accept from UE. + * + * If the UE does not send a Modify EPS bearer context accept, + * the MME fails to send an Update Bearer Response. + * + * Therefore, we need to delete the Transaction Node + * that was managed by the Bearer Context from the List. + */ + if (ogs_list_exists( + &bearer->update.xact_list, + &xact->to_update_node) == true) { + ogs_list_remove(&bearer->update.xact_list, &xact->to_update_node); + } else { + ogs_error("%d %s HAVE ALREADY BEEN REMOVED " + "for step %d type %d peer %s:%d", + xact->xid, + xact->org == OGS_GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", + xact->step, type, + OGS_ADDR(&xact->gnode->addr, buf), + OGS_PORT(&xact->gnode->addr)); + } + break; + case OGS_GTP2_UPDATE_BEARER_RESPONSE_TYPE: + /* + * The following is the case where the UE sends + * Modify EPS bearer context accept to the MME. + * + * In this case, the MME sends Update Bearer Response + * to SGW-C and deletes the Transaction Node. + * + * Therefore, there is no need to delete the Transaction Node + * from the list managed by the Bearer Context here. + */ + if (ogs_list_exists( + &bearer->update.xact_list, + &xact->to_update_node) == true) { + ogs_error("%d %s SHOULD HAVE REMOVED " + "for step %d type %d peer %s:%d", + xact->xid, + xact->org == OGS_GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", + xact->step, type, + OGS_ADDR(&xact->gnode->addr, buf), + OGS_PORT(&xact->gnode->addr)); + } + break; + default: + ogs_fatal("Unknown type%d", type); + ogs_assert_if_reached(); + break; + } +} + void mme_s11_handle_echo_request( ogs_gtp_xact_t *xact, ogs_gtp2_echo_request_t *req) { @@ -1045,13 +1133,31 @@ } /* - * Save Transaction. It will be handled after EMM-attached + * Issues #3240 * - * You should not remove OLD bearer->xact. - * If GTP-xact Holding timer is expired, - * OLD bearer->xact memory will be automatically removed. + * SMF->SGW-C->MME: First Update Bearer Request + * MME->UE: First Modify EPS bearer context request + * SMF->SGW-C->MME: Second Update Bearer Request + * MME->UE: Second Modify EPS bearer context request + * UE->MME: First Modify EPS bearer context accept + * MME->SGW-C->SMF: First Update Bearer Response + * UE->MME: Second Modify EPS bearer context accept + * MME->SGW-C->SMF: Second Update Bearer Response + * + * If the UE does not send a Modify EPS bearer context accept, + * the MME cannot send an Update Bearer Response to the SGW-C. + * + * In this case, REMOTE holding timeout occurs, and a callback function + * is registered as follows to free memory. + * + * Also, as shown above, multiple Update Bearer Request/Response can occur, + * so we manage the Transaction Node as a list within the Bearer Context. */ - bearer->update.xact = xact; + + xact->cb = gtp_remote_holding_timeout; + xact->data = bearer; + + ogs_list_add(&bearer->update.xact_list, &xact->to_update_node); if (req->bearer_contexts.bearer_level_qos.presence == 1) { /* Bearer QoS */
View file
open5gs_2.7.1.30.1111b.tar.xz/tests/volte/rx-test.c -> open5gs_2.7.1.31.53a6.tar.xz/tests/volte/rx-test.c
Changed
@@ -3410,6 +3410,398 @@ } #endif +static void test_issues3240_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; + + uint8_t *rx_sid = NULL; + + 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, "1032548691"); + ogs_assert(test_ue); + + test_ue->e_cgi.cell_id = 0x1079baf; + test_ue->nas.ksi = 0; + 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_ims(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.pco = 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 InitialContextSetupRequest + + * 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 InitialContextSetupResponse */ + 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 GTP-U ICMP Packet */ + rv = test_gtpu_send_ping(gtpu, bearer, TEST_PING_IPV4); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive GTP-U ICMP Packet */ + recvbuf = test_gtpu_read(gtpu); + ABTS_PTR_NOTNULL(tc, recvbuf); + ogs_pkbuf_free(recvbuf); + + /* Send PDN Connectivity Request */ + sess = test_sess_add_by_apn(test_ue, "ims", OGS_GTP2_RAT_TYPE_EUTRAN); + ogs_assert(sess); + sess->pti = 5; + + sess->pdn_connectivity_param.apn = 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, true, OGS_NAS_EPS_PDN_TYPE_IPV4V6); + 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 E-RABSetupRequest + + * Activate default EPS bearer context request */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + S1AP_ProcedureCode_id_E_RABSetup, + test_ue->s1ap_procedure_code); + + /* Send E-RABSetupResponse */ + bearer = test_bearer_find_by_ue_ebi(test_ue, 6); + ogs_assert(bearer); + sendbuf = test_s1ap_build_e_rab_setup_response(bearer); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send Activate default EPS bearer context accept */ + esmbuf = testesm_build_activate_default_eps_bearer_context_accept( + bearer, true); + 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); + + /* Send GTP-U ICMP Packet */ + rv = test_gtpu_send_ping(gtpu, bearer, TEST_PING_IPV4); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive GTP-U ICMP Packet */ + recvbuf = test_gtpu_read(gtpu); + ABTS_PTR_NOTNULL(tc, recvbuf); + ogs_pkbuf_free(recvbuf); + + /* Send AA-Request */ + test_rx_send_aar_audio(&rx_sid, sess, + OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 1, 1); + + /* Receive E-RABSetupRequest + + * Activate dedicated EPS bearer context request */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + S1AP_ProcedureCode_id_E_RABSetup, + test_ue->s1ap_procedure_code); + + /* Send E-RABSetupResponse */ + bearer = test_bearer_find_by_ue_ebi(test_ue, 7); + ogs_assert(bearer); + sendbuf = test_s1ap_build_e_rab_setup_response(bearer); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send Activate dedicated EPS bearer context accept */ + esmbuf = testesm_build_activate_dedicated_eps_bearer_context_accept(bearer); + 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); + + /* DELAY is needed in dedicated EPS bearer */ + ogs_msleep(100); + + /* Send GTP-U ICMP Packet */ + rv = test_gtpu_send_ping(gtpu, bearer, TEST_PING_IPV4); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Receive GTP-U ICMP Packet */ + recvbuf = test_gtpu_read(gtpu); + ABTS_PTR_NOTNULL(tc, recvbuf); + ogs_pkbuf_free(recvbuf); + + /* Send AA-Request without Flow */ + test_rx_send_aar_audio(&rx_sid, sess, + OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 2, 1); + + /* Receive E-RABModifyRequest + + * Modify EPS bearer context request */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + S1AP_ProcedureCode_id_E_RABModify, + test_ue->s1ap_procedure_code); + + /* Send E-RABModifyResponse */ + sendbuf = test_s1ap_build_e_rab_modify_response(bearer); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send AA-Request without Flow */ + test_rx_send_aar_audio(&rx_sid, sess, + OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 1, 1); + + /* BEFORE receiving Modify EPS bearer context accept + * + * Receive E-RABModifyRequest + + * Modify EPS bearer context request */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + ABTS_INT_EQUAL(tc, + S1AP_ProcedureCode_id_E_RABModify, + test_ue->s1ap_procedure_code); + + /* Send Modify EPS bearer context accept */ + esmbuf = testesm_build_modify_eps_bearer_context_accept(bearer); + 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); + + /* Wait for sending Update Bearer Response */ + ogs_msleep(100); + + /* Send E-RABModifyResponse */ + sendbuf = test_s1ap_build_e_rab_modify_response(bearer); + ABTS_PTR_NOTNULL(tc, sendbuf); + rv = testenb_s1ap_send(s1ap, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + /* Send Modify EPS bearer context accept */ + esmbuf = testesm_build_modify_eps_bearer_context_accept(bearer); + 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); + + /* Wait for sending Update Bearer Response */ + ogs_msleep(100); + + /* 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 UEContextReleaseCommand */ + 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 UEContextReleaseComplete */ + 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 UEContextReleaseCommand */ + recvbuf = testenb_s1ap_read(s1ap); + ABTS_PTR_NOTNULL(tc, recvbuf); + tests1ap_recv(test_ue, recvbuf); + + /* Send UEContextReleaseComplete */ + 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); +} + abts_suite *test_rx(abts_suite *suite) { suite = ADD_SUITE(suite) @@ -3424,6 +3816,7 @@ #if 0 /* disable this issues3109 test because of a lot of ERROR messages. */ abts_run_test(suite, test_issues3109_func, NULL); #endif + abts_run_test(suite, test_issues3240_func, NULL); 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
.