Projects
osmocom:master
open5gs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 298
View file
commit_a3a683e5a623b0553add0a65e3686c8e5d550fd3.txt
Added
View file
commit_aa746794e7505229cbcf93eb2b5b8fdbd7c06373.txt
Deleted
View file
open5gs_2.6.4.97.aa746.dsc -> open5gs_2.6.4.98.a3a68.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-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg Architecture: any -Version: 2.6.4.97.aa746 +Version: 2.6.4.98.a3a68 Maintainer: Harald Welte <laforge@gnumonks.org> Uploaders: Sukchan Lee <acetcom@gmail.com> Homepage: https://open5gs.org @@ -31,8 +31,8 @@ open5gs-udr deb net optional arch=any open5gs-upf deb net optional arch=any Checksums-Sha1: - efb5a16b122e2001f865ad8680382740c52314eb 14390676 open5gs_2.6.4.97.aa746.tar.xz + 0e8b9a0039ddb2a3e96c4308a3d381815ad1d948 14392444 open5gs_2.6.4.98.a3a68.tar.xz Checksums-Sha256: - 3ab13252d4422f10b386dd09403d3d8dedbae9099fd5342342b81039bf771f37 14390676 open5gs_2.6.4.97.aa746.tar.xz + f2d9b7a645753f31202a4c2aeec3ae5abc39187434ce00e3a3ce07ec5c113dd3 14392444 open5gs_2.6.4.98.a3a68.tar.xz Files: - 6d940453f49f47a05b0ba8c0914f5e51 14390676 open5gs_2.6.4.97.aa746.tar.xz + e8d380bd448704a85acc6992ad9e8193 14392444 open5gs_2.6.4.98.a3a68.tar.xz
View file
open5gs_2.6.4.97.aa746.tar.xz/.tarball-version -> open5gs_2.6.4.98.a3a68.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.6.4.97-aa746 +2.6.4.98-a3a68
View file
open5gs_2.6.4.97.aa746.tar.xz/debian/changelog -> open5gs_2.6.4.98.a3a68.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.6.4.97.aa746) unstable; urgency=medium +open5gs (2.6.4.98.a3a68) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Thu, 14 Sep 2023 22:42:46 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Sat, 16 Sep 2023 12:03:56 +0000 open5gs (2.6.4) unstable; urgency=medium
View file
open5gs_2.6.4.97.aa746.tar.xz/src/mme/emm-handler.c -> open5gs_2.6.4.98.a3a68.tar.xz/src/mme/emm-handler.c
Changed
@@ -217,8 +217,13 @@ switch (eps_mobile_identity->imsi.type) { case OGS_NAS_EPS_MOBILE_IDENTITY_IMSI: - ogs_assert(sizeof(ogs_nas_mobile_identity_imsi_t) == - eps_mobile_identity->length); + if (sizeof(ogs_nas_mobile_identity_imsi_t) != + eps_mobile_identity->length) { + ogs_error("mobile_identity length (%d != %d)", + (int)sizeof(ogs_nas_mobile_identity_imsi_t), + eps_mobile_identity->length); + return OGS_ERROR; + } memcpy(&mme_ue->nas_mobile_identity_imsi, &eps_mobile_identity->imsi, eps_mobile_identity->length); ogs_nas_eps_imsi_to_bcd(
View file
open5gs_2.6.4.97.aa746.tar.xz/src/mme/s1ap-build.c -> open5gs_2.6.4.98.a3a68.tar.xz/src/mme/s1ap-build.c
Changed
@@ -188,6 +188,88 @@ return ogs_s1ap_encode(&pdu); } +ogs_pkbuf_t *s1ap_build_enb_configuration_update_ack(void) +{ + S1AP_S1AP_PDU_t pdu; + S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; + + ogs_debug("ENBConfigurationUpdateAcknowledge"); + + memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); + pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; + pdu.choice.successfulOutcome = CALLOC(1, sizeof(S1AP_SuccessfulOutcome_t)); + + successfulOutcome = pdu.choice.successfulOutcome; + successfulOutcome->procedureCode = + S1AP_ProcedureCode_id_ENBConfigurationUpdate; + successfulOutcome->criticality = S1AP_Criticality_reject; + successfulOutcome->value.present = + S1AP_SuccessfulOutcome__value_PR_ENBConfigurationUpdateAcknowledge; + + return ogs_s1ap_encode(&pdu); +} + +ogs_pkbuf_t *s1ap_build_enb_configuration_update_failure( + S1AP_Cause_PR group, long cause, long time_to_wait) +{ + S1AP_S1AP_PDU_t pdu; + S1AP_UnsuccessfulOutcome_t *unsuccessfulOutcome = NULL; + S1AP_ENBConfigurationUpdateFailure_t *ENBConfigurationUpdateFailure = NULL; + + S1AP_ENBConfigurationUpdateFailureIEs_t *ie = NULL; + S1AP_Cause_t *Cause = NULL; + S1AP_TimeToWait_t *TimeToWait = NULL; + + ogs_debug("ENBConfigurationUpdateFailure"); + + ogs_debug(" Group%d Cause%d TimeToWait%ld", + group, (int)cause, time_to_wait); + + memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); + pdu.present = S1AP_S1AP_PDU_PR_unsuccessfulOutcome; + pdu.choice.unsuccessfulOutcome = + CALLOC(1, sizeof(S1AP_UnsuccessfulOutcome_t)); + + unsuccessfulOutcome = pdu.choice.unsuccessfulOutcome; + unsuccessfulOutcome->procedureCode = + S1AP_ProcedureCode_id_ENBConfigurationUpdate; + unsuccessfulOutcome->criticality = S1AP_Criticality_reject; + unsuccessfulOutcome->value.present = + S1AP_UnsuccessfulOutcome__value_PR_ENBConfigurationUpdateFailure; + + ENBConfigurationUpdateFailure = + &unsuccessfulOutcome->value.choice.ENBConfigurationUpdateFailure; + + ie = CALLOC(1, sizeof(S1AP_ENBConfigurationUpdateFailureIEs_t)); + ASN_SEQUENCE_ADD(&ENBConfigurationUpdateFailure->protocolIEs, ie); + + ie->id = S1AP_ProtocolIE_ID_id_Cause; + ie->criticality = S1AP_Criticality_ignore; + ie->value.present = S1AP_ENBConfigurationUpdateFailureIEs__value_PR_Cause; + + Cause = &ie->value.choice.Cause; + + if (time_to_wait > -1) { + ie = CALLOC(1, sizeof(S1AP_ENBConfigurationUpdateFailureIEs_t)); + ASN_SEQUENCE_ADD(&ENBConfigurationUpdateFailure->protocolIEs, ie); + + ie->id = S1AP_ProtocolIE_ID_id_TimeToWait; + ie->criticality = S1AP_Criticality_ignore; + ie->value.present = + S1AP_ENBConfigurationUpdateFailureIEs__value_PR_TimeToWait; + + TimeToWait = &ie->value.choice.TimeToWait; + } + + Cause->present = group; + Cause->choice.radioNetwork = cause; + + if (TimeToWait) + *TimeToWait = time_to_wait; + + return ogs_s1ap_encode(&pdu); +} + ogs_pkbuf_t *s1ap_build_downlink_nas_transport( enb_ue_t *enb_ue, ogs_pkbuf_t *emmbuf) {
View file
open5gs_2.6.4.97.aa746.tar.xz/src/mme/s1ap-build.h -> open5gs_2.6.4.98.a3a68.tar.xz/src/mme/s1ap-build.h
Changed
@@ -32,6 +32,10 @@ ogs_pkbuf_t *s1ap_build_setup_failure( S1AP_Cause_PR group, long cause, long time_to_wait); +ogs_pkbuf_t *s1ap_build_enb_configuration_update_ack(void); +ogs_pkbuf_t *s1ap_build_enb_configuration_update_failure( + S1AP_Cause_PR group, long cause, long time_to_wait); + ogs_pkbuf_t *s1ap_build_downlink_nas_transport( enb_ue_t *enb_ue, ogs_pkbuf_t *emmbuf);
View file
open5gs_2.6.4.97.aa746.tar.xz/src/mme/s1ap-handler.c -> open5gs_2.6.4.98.a3a68.tar.xz/src/mme/s1ap-handler.c
Changed
@@ -246,6 +246,129 @@ ogs_assert(r != OGS_ERROR); } +void s1ap_handle_enb_configuration_update( + mme_enb_t *enb, ogs_s1ap_message_t *message) +{ + int i, j, r; + + S1AP_InitiatingMessage_t *initiatingMessage = NULL; + S1AP_ENBConfigurationUpdate_t *ENBConfigurationUpdate = NULL; + + S1AP_ENBConfigurationUpdateIEs_t *ie = NULL; + S1AP_SupportedTAs_t *SupportedTAs = NULL; + S1AP_PagingDRX_t *PagingDRX = NULL; + + ogs_assert(enb); + ogs_assert(enb->sctp.sock); + + ogs_assert(message); + initiatingMessage = message->choice.initiatingMessage; + ogs_assert(initiatingMessage); + ENBConfigurationUpdate = + &initiatingMessage->value.choice.ENBConfigurationUpdate; + ogs_assert(ENBConfigurationUpdate); + + ogs_debug("ENBConfigurationUpdate"); + + for (i = 0; i < ENBConfigurationUpdate->protocolIEs.list.count; i++) { + ie = ENBConfigurationUpdate->protocolIEs.list.arrayi; + switch (ie->id) { + case S1AP_ProtocolIE_ID_id_SupportedTAs: + SupportedTAs = &ie->value.choice.SupportedTAs; + break; + case S1AP_ProtocolIE_ID_id_DefaultPagingDRX: + PagingDRX = &ie->value.choice.PagingDRX; + break; + default: + break; + } + } + + /* Parse Supported TA */ + if (SupportedTAs) { + S1AP_Cause_PR group = S1AP_Cause_PR_NOTHING; + long cause = 0; + + enb->num_of_supported_ta_list = 0; + for (i = 0; i < SupportedTAs->list.count; i++) { + S1AP_SupportedTAs_Item_t *SupportedTAs_Item = NULL; + S1AP_TAC_t *tAC = NULL; + + SupportedTAs_Item = + (S1AP_SupportedTAs_Item_t *)SupportedTAs->list.arrayi; + ogs_assert(SupportedTAs_Item); + tAC = &SupportedTAs_Item->tAC; + ogs_assert(tAC); + + for (j = 0; j < SupportedTAs_Item->broadcastPLMNs.list.count; j++) { + S1AP_PLMNidentity_t *pLMNidentity = NULL; + pLMNidentity = (S1AP_PLMNidentity_t *) + SupportedTAs_Item->broadcastPLMNs.list.arrayj; + ogs_assert(pLMNidentity); + + memcpy(&enb->supported_ta_list + enb->num_of_supported_ta_list.tac, + tAC->buf, sizeof(uint16_t)); + enb->supported_ta_listenb->num_of_supported_ta_list.tac = + be16toh(enb->supported_ta_list + enb->num_of_supported_ta_list.tac); + memcpy(&enb->supported_ta_list + enb->num_of_supported_ta_list.plmn_id, + pLMNidentity->buf, sizeof(ogs_plmn_id_t)); + ogs_debug(" PLMN_IDMCC:%d MNC:%d TAC%d", + ogs_plmn_id_mcc(&enb->supported_ta_list + enb->num_of_supported_ta_list.plmn_id), + ogs_plmn_id_mnc(&enb->supported_ta_list + enb->num_of_supported_ta_list.plmn_id), + enb->supported_ta_listenb->num_of_supported_ta_list.tac); + enb->num_of_supported_ta_list++; + } + } + + /* + * TS36.413 + * Section 8.7.3.4 Abnormal Conditions + * + * If the eNB initiates the procedure by sending a S1 SETUP REQUEST + * message including the PLMN Identity IEs and none of the PLMNs + * provided by the eNB is identified by the MME, then the MME shall + * reject the eNB S1 Setup Request procedure with the appropriate cause + * value, e.g., “Unknown PLMN”. + */ + if (enb_plmn_id_is_foreign(enb)) { + ogs_warn("S1-Setup failure:"); + ogs_warn(" Global-ENB-ID PLMN-ID is foreign"); + group = S1AP_Cause_PR_misc; + cause = S1AP_CauseMisc_unknown_PLMN; + + r = s1ap_send_enb_configuration_update_failure(enb, group, cause); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); + return; + } + + if (!served_tai_is_found(enb)) { + ogs_warn("S1-Setup failure:"); + ogs_warn(" Cannot find Served TAI. " + "Check 'mme.tai' configuration"); + group = S1AP_Cause_PR_misc; + cause = S1AP_CauseMisc_unknown_PLMN; + + r = s1ap_send_enb_configuration_update_failure(enb, group, cause); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); + return; + } + } + + if (PagingDRX) + ogs_debug(" PagingDRX%ld", *PagingDRX); + + r = s1ap_send_enb_configuration_update_ack(enb); + ogs_expect(r == OGS_OK); + ogs_assert(r != OGS_ERROR); +} + void s1ap_handle_initial_ue_message(mme_enb_t *enb, ogs_s1ap_message_t *message) { int i, r;
View file
open5gs_2.6.4.97.aa746.tar.xz/src/mme/s1ap-handler.h -> open5gs_2.6.4.98.a3a68.tar.xz/src/mme/s1ap-handler.h
Changed
@@ -28,6 +28,8 @@ void s1ap_handle_s1_setup_request( mme_enb_t *enb, ogs_s1ap_message_t *message); +void s1ap_handle_enb_configuration_update( + mme_enb_t *enb, ogs_s1ap_message_t *message); void s1ap_handle_initial_ue_message( mme_enb_t *enb, ogs_s1ap_message_t *message); void s1ap_handle_uplink_nas_transport(
View file
open5gs_2.6.4.97.aa746.tar.xz/src/mme/s1ap-path.c -> open5gs_2.6.4.98.a3a68.tar.xz/src/mme/s1ap-path.c
Changed
@@ -309,6 +309,56 @@ return rv; } +int s1ap_send_enb_configuration_update_ack(mme_enb_t *enb) +{ + int rv; + ogs_pkbuf_t *s1ap_buffer; + + ogs_debug("ENBConfigurationUpdateAcknowledge"); + + if (!mme_enb_cycle(enb)) { + ogs_error("eNB has already been removed"); + return OGS_NOTFOUND; + } + + s1ap_buffer = s1ap_build_enb_configuration_update_ack(); + if (!s1ap_buffer) { + ogs_error("s1ap_build_setup_rsp() failed"); + return OGS_ERROR; + } + + rv = s1ap_send_to_enb(enb, s1ap_buffer, S1AP_NON_UE_SIGNALLING); + ogs_expect(rv == OGS_OK); + + return rv; +} + +int s1ap_send_enb_configuration_update_failure( + mme_enb_t *enb, S1AP_Cause_PR group, long cause) +{ + int rv; + ogs_pkbuf_t *s1ap_buffer; + + ogs_debug("ENBConfigurationUpdateFailure"); + + if (!mme_enb_cycle(enb)) { + ogs_error("eNB has already been removed"); + return OGS_NOTFOUND; + } + + s1ap_buffer = s1ap_build_enb_configuration_update_failure( + group, cause, S1AP_TimeToWait_v10s); + if (!s1ap_buffer) { + ogs_error("s1ap_build_setup_failure() failed"); + return OGS_ERROR; + } + + rv = s1ap_send_to_enb(enb, s1ap_buffer, S1AP_NON_UE_SIGNALLING); + ogs_expect(rv == OGS_OK); + + return rv; +} + int s1ap_send_initial_context_setup_request(mme_ue_t *mme_ue) { int rv;
View file
open5gs_2.6.4.97.aa746.tar.xz/src/mme/s1ap-path.h -> open5gs_2.6.4.98.a3a68.tar.xz/src/mme/s1ap-path.h
Changed
@@ -52,6 +52,10 @@ int s1ap_send_s1_setup_failure( mme_enb_t *enb, S1AP_Cause_PR group, long cause); +int s1ap_send_enb_configuration_update_ack(mme_enb_t *enb); +int s1ap_send_enb_configuration_update_failure( + mme_enb_t *enb, S1AP_Cause_PR group, long cause); + int s1ap_send_initial_context_setup_request(mme_ue_t *mme_ue); int s1ap_send_ue_context_modification_request(mme_ue_t *mme_ue); int s1ap_send_ue_context_release_command(
View file
open5gs_2.6.4.97.aa746.tar.xz/src/mme/s1ap-sm.c -> open5gs_2.6.4.98.a3a68.tar.xz/src/mme/s1ap-sm.c
Changed
@@ -87,6 +87,9 @@ case S1AP_ProcedureCode_id_S1Setup : s1ap_handle_s1_setup_request(enb, pdu); break; + case S1AP_ProcedureCode_id_ENBConfigurationUpdate: + s1ap_handle_enb_configuration_update(enb, pdu); + break; case S1AP_ProcedureCode_id_initialUEMessage : s1ap_handle_initial_ue_message(enb, pdu); break;
View file
open5gs_2.6.4.97.aa746.tar.xz/tests/attach/s1setup-test.c -> open5gs_2.6.4.98.a3a68.tar.xz/tests/attach/s1setup-test.c
Changed
@@ -97,12 +97,60 @@ } } +static void s1setup_test3(abts_case *tc, void *data) +{ + int rv; + ogs_socknode_t *nodeNUM_OF_TEST_ENB; + ogs_pkbuf_t *sendbuf; + ogs_pkbuf_t *recvbuf; + ogs_s1ap_message_t message; + int i; + + i = 0; + nodei = tests1ap_client(AF_INET); + ABTS_PTR_NOTNULL(tc, nodei); + + sendbuf = test_s1ap_build_s1_setup_request( + S1AP_ENB_ID_PR_macroENB_ID, 0x54f64+i); + ABTS_PTR_NOTNULL(tc, sendbuf); + + rv = testenb_s1ap_send(nodei, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + recvbuf = testenb_s1ap_read(nodei); + ABTS_PTR_NOTNULL(tc, recvbuf); + + rv = ogs_s1ap_decode(&message, recvbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + ogs_s1ap_free(&message); + ogs_pkbuf_free(recvbuf); + + sendbuf = test_s1ap_build_enb_configuration_update(0); + ABTS_PTR_NOTNULL(tc, sendbuf); + + rv = testenb_s1ap_send(nodei, sendbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + recvbuf = testenb_s1ap_read(nodei); + ABTS_PTR_NOTNULL(tc, recvbuf); + + rv = ogs_s1ap_decode(&message, recvbuf); + ABTS_INT_EQUAL(tc, OGS_OK, rv); + + ogs_s1ap_free(&message); + ogs_pkbuf_free(recvbuf); + + testenb_s1ap_close(nodei); +} + abts_suite *test_s1setup(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, s1setup_test1, NULL); abts_run_test(suite, s1setup_test2, NULL); + abts_run_test(suite, s1setup_test3, NULL); return suite; }
View file
open5gs_2.6.4.97.aa746.tar.xz/tests/common/s1ap-build.c -> open5gs_2.6.4.98.a3a68.tar.xz/tests/common/s1ap-build.c
Changed
@@ -2041,6 +2041,48 @@ return pkbuf; } +ogs_pkbuf_t *test_s1ap_build_enb_configuration_update(int i) +{ + ogs_pkbuf_t *pkbuf = NULL; + const char *payloadTEST_S1AP_MAX_MESSAGE = { + "001d002a0000" + "04003c4003000031 0040000700000040 34f2990089400140 0124400c00004ced" + "a80000004034f299", + "", + "", + + "", + "", + "", + + "", + "", + "", + + }; + uint16_t lenTEST_S1AP_MAX_MESSAGE = { + 46, + 0, + 0, + + 0, + 0, + 0, + + 0, + 0, + 0, + }; + char hexbufOGS_HUGE_LEN; + + pkbuf = ogs_pkbuf_alloc(NULL, OGS_MAX_SDU_LEN); + ogs_assert(pkbuf); + ogs_pkbuf_put_data(pkbuf, + ogs_hex_from_string(payloadi, hexbuf, sizeof(hexbuf)), leni); + + return pkbuf; +} + ogs_pkbuf_t *test_s1ap_build_malformed_s1_setup_request(int i) { ogs_pkbuf_t *pkbuf = NULL;
View file
open5gs_2.6.4.97.aa746.tar.xz/tests/common/s1ap-build.h -> open5gs_2.6.4.98.a3a68.tar.xz/tests/common/s1ap-build.h
Changed
@@ -67,6 +67,7 @@ S1AP_Cause_PR group, long cause); ogs_pkbuf_t *test_s1ap_build_enb_configuration_transfer(int i); +ogs_pkbuf_t *test_s1ap_build_enb_configuration_update(int i); ogs_pkbuf_t *test_s1ap_build_malformed_s1_setup_request(int i); ogs_pkbuf_t *test_s1ap_build_malformed_enb_status_transfer(int i);
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
.