lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

August 2023

  • 1 participants
  • 1514 discussions
[M] Change in osmo-ci[master]: jobs/master-builds: add xgoldmon
by osmith 29 Aug '23

29 Aug '23
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34236 ) Change subject: jobs/master-builds: add xgoldmon ...................................................................... jobs/master-builds: add xgoldmon Replace the legacy xgoldmon job (not done with jenkins-job-builder) with a new master-xgoldmon job that works more similar to other master jobs: - build in docker - have build commands in a jenkins.sh script Put the jenkins.sh script into osmo-ci, as the upstream repository is outside of Osmocom infrastructure. The motivation for this change is, that the current xgoldmon job is failing since libosmocore depends on liburing by default. This uncovered that the job is still running outside of docker, where the dependency has already been added. The following patches will modernize other jobs which have the same problem. Change-Id: Ice5704eb12f3c3a777961bc18a55fac63df80fd6 --- M jobs/master-builds.yml A scripts/xgoldmon-jenkins.sh 2 files changed, 54 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 6837d78..6a2926c 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -173,7 +173,7 @@ # master-osmo-bsc, master-osmo-bts, master-osmo-ggsn, master-osmo-gmr, master-osmo-hlr, # master-osmo-iuh, master-osmo-mgw, master-osmo-msc, master-osmo-pcap, master-osmo-pcu, # master-osmo-sgsn, master-osmo-sip-connector, master-osmo-tetra, master-osmo-hnodeb - # master-osmocom-bb, SIMtrace, xgoldmon + # master-osmocom-bb, SIMtrace, master-xgoldmon # Optimized: # libosmocore # -> master-libosmo-abis @@ -212,7 +212,7 @@ master-osmo-trx, master-osmocom-bb, SIMtrace, - xgoldmon + master-xgoldmon - libsmpp34: trigger: master-osmo-msc, master-openbsc @@ -519,6 +519,12 @@ - dahdi-tools + - xgoldmon: + git_base_url: https://github.com/2b-as + cmd: | + git clone --depth=1 https://gerrit.osmocom.org/osmo-ci -b master + {docker_run_ccache} {docker_img} {timeout_cmd} /build/osmo-ci/scripts/xgoldmon-jenkins.sh + jobs: - 'master-{repos}' diff --git a/scripts/xgoldmon-jenkins.sh b/scripts/xgoldmon-jenkins.sh new file mode 100755 index 0000000..0635db4 --- /dev/null +++ b/scripts/xgoldmon-jenkins.sh @@ -0,0 +1,23 @@ +#!/bin/sh -ex +# Used by jobs/master-builds.yml for xgoldmon +TOPDIR=/build + +if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then + echo "Error: missing scripts from osmo-ci.git in PATH!" + exit 2 +fi + +set -x + +osmo-clean-workspace.sh + +export deps="$TOPDIR/deps" +export inst="$deps/install" +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" + +mkdir -p deps +osmo-build-dep.sh libosmocore "" '--disable-doxygen' + +cd "$TOPDIR" +$MAKE -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ice5704eb12f3c3a777961bc18a55fac63df80fd6 Gerrit-Change-Number: 34236 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bts[master]: pcu_sock: print SAPI and msg_id when sending confirmation
by pespin 29 Aug '23

29 Aug '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/34240 ) Change subject: pcu_sock: print SAPI and msg_id when sending confirmation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ibd5b4225e597b69eaabaeee437fb637943a55602 Gerrit-Change-Number: 34240 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Aug 2023 13:44:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-pcu[master]: osmobts_sock: cosmetic, put a dot between "v" and version number
by pespin 29 Aug '23

29 Aug '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34239 ) Change subject: osmobts_sock: cosmetic, put a dot between "v" and version number ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: why putting a dot there? To me v11 is totally fine :/ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7c70c4d4440fa9885e1efb80e6f2e4e821ac916f Gerrit-Change-Number: 34239 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Aug 2023 13:43:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-hlr[master]: Add VTY support for TUAK algorithm
by laforge 29 Aug '23

29 Aug '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33099 ) ( 5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Add VTY support for TUAK algorithm ...................................................................... Add VTY support for TUAK algorithm Change-Id: If2611658f7cb990b484d7429ab2f944f56fd2eb6 Depends: libosmocore.git Ib905b8d8bdf248e8299bf50666ee1bca8298433d --- M TODO-RELEASE M src/hlr_vty_subscr.c M tests/test_subscriber.vty 3 files changed, 29 insertions(+), 9 deletions(-) Approvals: neels: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index 4c445eb..042d1a7 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,4 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line -libosmogsm UPDATE_DEP_VER update libosmogsm version dependency after Ie775fedba4a3fa12314c0f7c8a369662ef6a40df is released +libosmogsm UPDATE_DEP_VER update libosmogsm version dependency after Ib905b8d8bdf248e8299bf50666ee1bca8298433d is released diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 28cc5b3..59a27c1 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -468,9 +468,10 @@ "Use COMP128v3 algorithm\n" \ "Use XOR-2G algorithm\n" -#define AUTH_ALG_TYPES_3G "milenage" +#define AUTH_ALG_TYPES_3G "(milenage|tuak)" #define AUTH_ALG_TYPES_3G_HELP \ - "Use Milenage algorithm\n" + "Use Milenage algorithm\n" \ + "Use TUAK algorithm\n" bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo, int *minlen, int *maxlen, int *minlen_opc, int *maxlen_opc) @@ -507,6 +508,14 @@ *minlen_opc = MILENAGE_KEY_LEN; if (maxlen_opc) *maxlen_opc = MILENAGE_KEY_LEN; + } else if (!strcasecmp(alg_str, "tuak")) { + *algo = OSMO_AUTH_ALG_TUAK; + *minlen = 16; + *maxlen = 32; + if (minlen_opc) + *minlen_opc = 32; + if (maxlen_opc) + *maxlen_opc = 32; } else return false; return true; @@ -631,11 +640,11 @@ int rc; const char *id_type = argv[0]; const char *id = argv[1]; - const char *alg_type = AUTH_ALG_TYPES_3G; - const char *k = argv[2]; - bool opc_is_op = (strcasecmp("op", argv[3]) == 0); - const char *op_opc = argv[4]; - int ind_bitlen = argc > 6? atoi(argv[6]) : 5; + const char *alg_type = argv[2]; + const char *k = argv[3]; + bool opc_is_op = (strcasecmp("op", argv[4]) == 0); + const char *op_opc = argv[5]; + int ind_bitlen = argc > 7 ? atoi(argv[7]) : 5; struct sub_auth_data_str aud3g = { .type = OSMO_AUTH_TYPE_UMTS, .u.umts = { diff --git a/tests/test_subscriber.vty b/tests/test_subscriber.vty index 9036fb8..5f223dc 100644 --- a/tests/test_subscriber.vty +++ b/tests/test_subscriber.vty @@ -10,7 +10,7 @@ subscriber (imsi|msisdn|id|imei) IDENT update aud2g none subscriber (imsi|msisdn|id|imei) IDENT update aud2g (comp128v1|comp128v2|comp128v3|xor-2g) ki KI subscriber (imsi|msisdn|id|imei) IDENT update aud3g none - subscriber (imsi|msisdn|id|imei) IDENT update aud3g milenage k K (op|opc) OP_C [ind-bitlen] [<0-28>] + subscriber (imsi|msisdn|id|imei) IDENT update aud3g (milenage|tuak) k K (op|opc) OP_C [ind-bitlen] [<0-28>] subscriber (imsi|msisdn|id|imei) IDENT update aud3g xor-3g k K [ind-bitlen] [<0-28>] subscriber (imsi|msisdn|id|imei) IDENT update imei (none|IMEI) subscriber (imsi|msisdn|id|imei) IDENT update network-access-mode (none|cs|ps|cs+ps) @@ -269,6 +269,7 @@ OsmoHLR# subscriber imsi 123456789023000 update aud3g ? none Delete 3G authentication data milenage Use Milenage algorithm + tuak Use TUAK algorithm xor-3g Use XOR-3G algorithm OsmoHLR# subscriber imsi 123456789023000 update aud3g milenage ? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: If2611658f7cb990b484d7429ab2f944f56fd2eb6 Gerrit-Change-Number: 33099 Gerrit-PatchSet: 7 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-hlr[master]: db: extend database schema to support 256bit K and/or OP[c] values
by laforge 29 Aug '23

29 Aug '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33098 ) Change subject: db: extend database schema to support 256bit K and/or OP[c] values ...................................................................... db: extend database schema to support 256bit K and/or OP[c] values Other UMTS AKA algorithms than MILENAGE (notably TUAK) support K sizes of up to 256bit, or mandate a OP/OPc size of 256 bit. Let's extend our database schema to accommodate such larger sizes. Change-Id: Ibbde68484c904507a15c35cbfdf88cd47d0c7039 --- M sql/hlr.sql M src/ctrl.c M src/db.c M src/db_hlr.c M src/hlr_vty_subscr.c M tests/db_upgrade/db_upgrade_test.ok M tests/test_subscriber.vty 7 files changed, 96 insertions(+), 31 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/sql/hlr.sql b/sql/hlr.sql index e855a6c..4c87f43 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -71,9 +71,9 @@ CREATE TABLE auc_3g ( subscriber_id INTEGER PRIMARY KEY, -- subscriber.id algo_id_3g INTEGER NOT NULL, -- enum osmo_auth_algo value - k VARCHAR(32) NOT NULL, -- hex string: subscriber's secret key (128bit) - op VARCHAR(32), -- hex string: operator's secret key (128bit) - opc VARCHAR(32), -- hex string: derived from OP and K (128bit) + k VARCHAR(64) NOT NULL, -- hex string: subscriber's secret key (128/256bit) + op VARCHAR(64), -- hex string: operator's secret key (128/256bit) + opc VARCHAR(64), -- hex string: derived from OP and K (128/256bit) sqn INTEGER NOT NULL DEFAULT 0, -- sequence number of key usage -- nr of index bits at lower SQN end ind_bitlen INTEGER NOT NULL DEFAULT 5 @@ -91,4 +91,4 @@ -- Set HLR database schema version number -- Note: This constant is currently duplicated in src/db.c and must be kept in sync! -PRAGMA user_version = 6; +PRAGMA user_version = 7; diff --git a/src/ctrl.c b/src/ctrl.c index f0f2ee6..e04195d 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -39,7 +39,7 @@ #define SEL_BY_ID SEL_BY "id-" extern bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo, - int *minlen, int *maxlen); + int *minlen, int *maxlen, int *minlen_opc, int *maxlen_opc); #define hexdump_buf(buf) osmo_hexdump_nospc((void*)buf, sizeof(buf)) @@ -550,7 +550,7 @@ } if (strcmp(tok, "none") == 0) { aud2g.algo = OSMO_AUTH_ALG_NONE; - } else if (!auth_algo_parse(tok, &aud2g.algo, &minlen, &maxlen)) { + } else if (!auth_algo_parse(tok, &aud2g.algo, &minlen, &maxlen, NULL, NULL)) { cmd->reply = "Unknown auth algorithm."; return CTRL_CMD_ERROR; } @@ -630,8 +630,8 @@ struct hlr *hlr = data; const char *by_selector = cmd->node; char *tmp = NULL, *tok, *saveptr; - int minlen = 0; - int maxlen = 0; + int minlen = 0, minlen_opc = 0; + int maxlen = 0, maxlen_opc = 0; struct sub_auth_data_str aud3g = { .type = OSMO_AUTH_TYPE_UMTS, .u.umts = { @@ -657,7 +657,7 @@ } if (strcmp(tok, "none") == 0) { aud3g.algo = OSMO_AUTH_ALG_NONE; - } else if (!auth_algo_parse(tok, &aud3g.algo, &minlen, &maxlen)) { + } else if (!auth_algo_parse(tok, &aud3g.algo, &minlen, &maxlen, &minlen_opc, &maxlen_opc)) { cmd->reply = "Unknown auth algorithm."; return CTRL_CMD_ERROR; } @@ -699,7 +699,7 @@ } aud3g.u.umts.opc = tok; - if (!osmo_is_hexstr(aud3g.u.umts.opc, MILENAGE_KEY_LEN * 2, MILENAGE_KEY_LEN * 2, true)) { + if (!osmo_is_hexstr(aud3g.u.umts.opc, minlen_opc * 2, maxlen_opc * 2, true)) { cmd->reply = talloc_asprintf(cmd, "Invalid OP/OPC."); return CTRL_CMD_ERROR; } diff --git a/src/db.c b/src/db.c index cfe34c3..7b8a415 100644 --- a/src/db.c +++ b/src/db.c @@ -1,4 +1,4 @@ -/* (C) 2015 by Harald Welte <laforge(a)gnumonks.org> +/* (C) 2015-2023 by Harald Welte <laforge(a)gnumonks.org> * * All Rights Reserved * @@ -28,7 +28,7 @@ #include "db_bootstrap.h" /* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */ -#define CURRENT_SCHEMA_VERSION 6 +#define CURRENT_SCHEMA_VERSION 7 #define SEL_COLUMNS \ "id," \ @@ -513,6 +513,46 @@ return rc; } +static int db_upgrade_v7(struct db_context *dbc) +{ + int rc; + /* SQLite doesn't allow us to change the column type in-place, so we + * first rename the old table, create a new table and then copy + * the data over before deleting the old table */ +#define CREATE_AUC_3G_V7 \ +"CREATE TABLE auc_3g (\n" \ +" subscriber_id INTEGER PRIMARY KEY, -- subscriber.id\n" \ +" algo_id_3g INTEGER NOT NULL, -- enum osmo_auth_algo value\n" \ +" k VARCHAR(64) NOT NULL, -- hex string: subscriber's secret key (128/256bit)\n" \ +" op VARCHAR(64), -- hex string: operator's secret key (128/256bit)\n" \ +" opc VARCHAR(64), -- hex string: derived from OP and K (128/256bit)\n" \ +" sqn INTEGER NOT NULL DEFAULT 0, -- sequence number of key usage\n" \ +" -- nr of index bits at lower SQN end\n" \ +" ind_bitlen INTEGER NOT NULL DEFAULT 5\n" \ +");" + const char * const statements[] = { + "BEGIN TRANSACTION", + /* rename old table */ + "ALTER TABLE auc_3g RENAME TO old_auc_3g", + /* create new table */ + CREATE_AUC_3G_V7, + /* copy over old data */ + "INSERT INTO auc_3g SELECT subscriber_id, algo_id_3g, k, op, opc,sqn, ind_bitlen FROM old_auc_3g", + /* delete old table */ + "DROP TABLE old_auc_3g", + /* update user_version */ + "PRAGMA user_version = 7", + "COMMIT", + }; + + rc = db_run_statements(dbc, statements, ARRAY_SIZE(statements)); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 7\n"); + return rc; + } + return rc; +} + typedef int (*db_upgrade_func_t)(struct db_context *dbc); static db_upgrade_func_t db_upgrade_path[] = { db_upgrade_v1, @@ -521,6 +561,7 @@ db_upgrade_v4, db_upgrade_v5, db_upgrade_v6, + db_upgrade_v7, }; static int db_get_user_version(struct db_context *dbc) diff --git a/src/db_hlr.c b/src/db_hlr.c index 8dfbb15..aa2e365 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -1,4 +1,4 @@ -/* (C) 2015 by Harald Welte <laforge(a)gnumonks.org> +/* (C) 2015-2023 by Harald Welte <laforge(a)gnumonks.org> * * All Rights Reserved * @@ -286,12 +286,12 @@ if (aud->algo == OSMO_AUTH_ALG_NONE) break; - if (!osmo_is_hexstr(aud->u.umts.k, 32, 32, true)) { + if (!osmo_is_hexstr(aud->u.umts.k, 32, 64, true)) { LOGP(DAUC, LOGL_ERROR, "Cannot update auth tokens:" " Invalid K: '%s'\n", aud->u.umts.k); return -EINVAL; } - if (!osmo_is_hexstr(aud->u.umts.opc, 32, 32, true)) { + if (!osmo_is_hexstr(aud->u.umts.opc, 32, 64, true)) { LOGP(DAUC, LOGL_ERROR, "Cannot update auth tokens:" " Invalid OP/OPC: '%s'\n", aud->u.umts.opc); return -EINVAL; diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 191a87d..28cc5b3 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -473,8 +473,14 @@ "Use Milenage algorithm\n" bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo, - int *minlen, int *maxlen) + int *minlen, int *maxlen, int *minlen_opc, int *maxlen_opc) { + /* Default: no OP[c]. True for all 2G algorithms, and 3G-XOR. Overridden below for real 3G AKA algorithms. */ + if (minlen_opc) + *minlen_opc = 0; + if (maxlen_opc) + *maxlen_opc = 0; + if (!strcasecmp(alg_str, "none")) { *algo = OSMO_AUTH_ALG_NONE; *minlen = *maxlen = 0; @@ -497,6 +503,10 @@ } else if (!strcasecmp(alg_str, "milenage")) { *algo = OSMO_AUTH_ALG_MILENAGE; *minlen = *maxlen = MILENAGE_KEY_LEN; + if (minlen_opc) + *minlen_opc = MILENAGE_KEY_LEN; + if (maxlen_opc) + *maxlen_opc = MILENAGE_KEY_LEN; } else return false; return true; @@ -552,7 +562,7 @@ .u.gsm.ki = ki, }; - if (!auth_algo_parse(alg_type, &aud2g.algo, &minlen, &maxlen)) { + if (!auth_algo_parse(alg_type, &aud2g.algo, &minlen, &maxlen, NULL, NULL)) { vty_out(vty, "%% Unknown auth algorithm: '%s'%s", alg_type, VTY_NEWLINE); return CMD_WARNING; } @@ -611,13 +621,13 @@ SUBSCR_UPDATE_HELP "Set UMTS authentication data (3G, and 2G with UMTS AKA)\n" AUTH_ALG_TYPES_3G_HELP - "Set Encryption Key K\n" "K as 32 hexadecimal characters\n" - "Set OP key\n" "Set OPC key\n" "OP or OPC as 32 hexadecimal characters\n" + "Set Encryption Key K\n" "K as 32/64 hexadecimal characters\n" + "Set OP key\n" "Set OPC key\n" "OP or OPC as 32/64 hexadecimal characters\n" "Set IND bit length\n" "IND bit length value (default: 5)\n") { struct hlr_subscriber subscr; - int minlen = 0; - int maxlen = 0; + int minlen = 0, minlen_opc = 0; + int maxlen = 0, maxlen_opc = 0; int rc; const char *id_type = argv[0]; const char *id = argv[1]; @@ -636,7 +646,7 @@ }, }; - if (!auth_algo_parse(alg_type, &aud3g.algo, &minlen, &maxlen)) { + if (!auth_algo_parse(alg_type, &aud3g.algo, &minlen, &maxlen, &minlen_opc, &maxlen_opc)) { vty_out(vty, "%% Unknown auth algorithm: '%s'%s", alg_type, VTY_NEWLINE); return CMD_WARNING; } @@ -644,8 +654,7 @@ if (!is_hexkey_valid(vty, "K", aud3g.u.umts.k, minlen, maxlen)) return CMD_WARNING; - if (!is_hexkey_valid(vty, opc_is_op ? "OP" : "OPC", aud3g.u.umts.opc, - MILENAGE_KEY_LEN, MILENAGE_KEY_LEN)) + if (!is_hexkey_valid(vty, opc_is_op ? "OP" : "OPC", aud3g.u.umts.opc, minlen_opc, maxlen_opc)) return CMD_WARNING; if (get_subscr_by_argv(vty, id_type, id, &subscr)) @@ -689,7 +698,7 @@ }, }; - if (!auth_algo_parse("xor-3g", &aud3g.algo, &minlen, &maxlen)) { + if (!auth_algo_parse("xor-3g", &aud3g.algo, &minlen, &maxlen, NULL, NULL)) { vty_out(vty, "%% Unknown auth algorithm: '%s'%s", "xor-3g", VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok index ce5b17c..c719498 100644 --- a/tests/db_upgrade/db_upgrade_test.ok +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -86,6 +86,7 @@ DDB Database <PATH>test.db' has been upgraded to HLR DB schema version 4 DDB Database <PATH>test.db' has been upgraded to HLR DB schema version 5 DDB Database <PATH>test.db' has been upgraded to HLR DB schema version 6 +DDB Database <PATH>test.db' has been upgraded to HLR DB schema version 7 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. Resulting db: @@ -106,9 +107,9 @@ name|type|notnull|dflt_value|pk algo_id_3g|INTEGER|1||0 ind_bitlen|INTEGER|1|5|0 -k|VARCHAR(32)|1||0 -op|VARCHAR(32)|0||0 -opc|VARCHAR(32)|0||0 +k|VARCHAR(64)|1||0 +op|VARCHAR(64)|0||0 +opc|VARCHAR(64)|0||0 sqn|INTEGER|1|0|0 subscriber_id|INTEGER|0||1 @@ -179,5 +180,5 @@ rc = 0 DMAIN hlr starting DDB using database: <PATH>test.db -DDB Database <PATH>test.db' has HLR DB schema version 6 +DDB Database <PATH>test.db' has HLR DB schema version 7 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. diff --git a/tests/test_subscriber.vty b/tests/test_subscriber.vty index dbe9327..9036fb8 100644 --- a/tests/test_subscriber.vty +++ b/tests/test_subscriber.vty @@ -275,14 +275,14 @@ k Set Encryption Key K OsmoHLR# subscriber imsi 123456789023000 update aud3g milenage k ? - K K as 32 hexadecimal characters + K K as 32/64 hexadecimal characters OsmoHLR# subscriber imsi 123456789023000 update aud3g milenage k Deaf0ff1ceD0d0DabbedD1ced1ceF00d ? op Set OP key opc Set OPC key OsmoHLR# subscriber imsi 123456789023000 update aud3g milenage k Deaf0ff1ceD0d0DabbedD1ced1ceF00d opc ? - OP_C OP or OPC as 32 hexadecimal characters + OP_C OP or OPC as 32/64 hexadecimal characters OsmoHLR# subscriber imsi 123456789023000 update aud3g milenage k Deaf0ff1ceD0d0DabbedD1ced1ceF00d opc CededEffacedAceFacedBadFadedBeef ? [ind-bitlen] Set IND bit length -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibbde68484c904507a15c35cbfdf88cd47d0c7039 Gerrit-Change-Number: 33098 Gerrit-PatchSet: 6 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-hlr[master]: db: extend database schema to support 256bit K and/or OP[c] values
by laforge 29 Aug '23

29 Aug '23
Attention is currently required from: neels, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33098 ) Change subject: db: extend database schema to support 256bit K and/or OP[c] values ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibbde68484c904507a15c35cbfdf88cd47d0c7039 Gerrit-Change-Number: 33098 Gerrit-PatchSet: 5 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Aug 2023 13:42:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bts[master]: pcu_sock: print SAPI and msg_id when sending confirmation
by dexter 29 Aug '23

29 Aug '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/34240 ) Change subject: pcu_sock: print SAPI and msg_id when sending confirmation ...................................................................... pcu_sock: print SAPI and msg_id when sending confirmation At the moment we do not print the SAPI, nor the msg_id when we send a confirmation back to the PCU Change-Id: Ibd5b4225e597b69eaabaeee437fb637943a55602 elated: OS#5927 --- M src/common/pcu_sock.c 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/34240/1 diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index e100464..1566178 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -628,7 +628,8 @@ /* FIXME: allow multiple BTS */ bts = llist_entry(g_bts_sm->bts_list.next, struct gsm_bts, list); - LOGP(DPCU, LOGL_DEBUG, "Sending PCH confirm\n"); + LOGP(DPCU, LOGL_DEBUG, "Sending confirmation: sapi=%s msg_id=%08x\n", + sapi_string[sapi], msg_id); msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF_2, bts->nr); if (!msg) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ibd5b4225e597b69eaabaeee437fb637943a55602 Gerrit-Change-Number: 34240 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: BTS_Tests: use f_PCUIF_tx_mac_block_agch in TC_pcu_data_req_agch
by laforge 29 Aug '23

29 Aug '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34209 ) Change subject: BTS_Tests: use f_PCUIF_tx_mac_block_agch in TC_pcu_data_req_agch ...................................................................... BTS_Tests: use f_PCUIF_tx_mac_block_agch in TC_pcu_data_req_agch The testcase TC_pcu_data_req_agch uses SAPI PCU_IF_SAPI_AGCH. Since we now have a function f_PCUIF_tx_mac_block_agch() to send MAC blocks over the AGCH using the recently introduced SAPI PCU_IF_SAPI_AGCH_2, lets use this function instead. Related: OS#5927 Change-Id: I341bbd01e8132fab913d307bfb4b2fb873cdde3c --- M bts/BTS_Tests.ttcn 1 file changed, 17 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 6109159..317ed70 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -5792,7 +5792,8 @@ f_l1_tune(L1CTL); f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_data_req(0, 0, 0, 0, 0, PCU_IF_SAPI_AGCH, c_PCU_DATA); + f_PCUIF_tx_mac_block_agch(PCU, g_pcu_conn_id, c_PCU_DATA, confirm := false, + wait_for_cnf := false, msg_id := 'ffffffff'O); T.start; alt { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I341bbd01e8132fab913d307bfb4b2fb873cdde3c Gerrit-Change-Number: 34209 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: PCUIF: Add support for PCU_IF_SAPI_AGCH_2
by laforge 29 Aug '23

29 Aug '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34066 ) Change subject: PCUIF: Add support for PCU_IF_SAPI_AGCH_2 ...................................................................... PCUIF: Add support for PCU_IF_SAPI_AGCH_2 In PCUIF v.11 it will be possible to get confirmations for IMMEDIATE ASSIGNMENT messages sent through the AGCH. Related: OS#5927 Change-Id: I40e05a2e68cca77d3c2f41df9af8d35762488abf --- M library/PCUIF_CodecPort.ttcn M library/PCUIF_Types.ttcn 2 files changed, 76 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index d180f17..b49c513 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -196,6 +196,51 @@ } } +/* This function can be used to transmit arbitrary GSM MAC blocks via the AGCH. The BTS will only confirm those MAC + * blocks that contain actually a valid immediate assignment message. Otherweise no confirmation is sent back */ +function f_PCUIF_tx_mac_block_agch(PCUIF_CODEC_PT pt, integer conn_id, octetstring mac_block, boolean confirm := true, + uint8_t bts_nr := 0, boolean wait_for_cnf := true, OCT4 msg_id := '01020304'O) { + var PCUIF_send_data sd; + timer T := 3.0; + + if (mp_pcuif_version < 11) { + if (wait_for_cnf == true) { + setverdict(fail, "confirmation for AGCH not supported in PCUIF v.10 or earlier"); + } + pt.send(t_SD_PCUIF(conn_id, + ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_AGCH, mac_block))); + } else { + var PCUIF_agch agch; + agch.msg_id := msg_id; + agch.data := mac_block; + agch.confirm := confirm; + pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_AGCH_2, enc_PCUIF_agch(agch)))); + } + + /* Exit early when the caller is not interested in the confirmation message */ + if (wait_for_cnf == false) { + return; + } + + T.start; + alt { + [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_AGCH_2))) -> value sd { + if (mp_pcuif_version < 11) { + setverdict(fail, "got tr_PCUIF_DATA_CNF_DT, but AGCH confirmation is not supported in PCUIF v.10 or earlier"); + mtc.stop; + } else { + log("IMM.ASS was sent on AGCH"); + return; + } + } + [] pt.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for PCU DATA.cnf (AGCH)"); + mtc.stop; + } + } + return; +} diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 509c93c..b8bd6e9 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -54,7 +54,8 @@ PCU_IF_SAPI_PDTCH ('05'O), PCU_IF_SAPI_PRACH ('06'O), PCU_IF_SAPI_PTCCH ('07'O), - PCU_IF_SAPI_PCH_2 ('08'O) + PCU_IF_SAPI_PCH_2 ('08'O), + PCU_IF_SAPI_AGCH_2 ('09'O) } with { variant "FIELDLENGTH(8)" }; type record PCUIF_Flags { @@ -321,6 +322,22 @@ external function dec_PCUIF_pch(in octetstring stream) return PCUIF_pch with { extension "prototype(convert) decode(RAW)" }; +/* Record to send a (confirmed) IMMEDIATE ASSIGNMENT message via AGCH. The record is sent by the PCU to the BTS as a + * data request (data_req) under SAPI PCU_IF_SAPI_AGCH_2. */ +type record PCUIF_agch { + OCT4 msg_id, + octetstring data length(23), + boolean confirm +} with { + variant (msg_id) "BYTEORDER(last)" + variant (data) "FIELDLENGTH(23)" +}; + +external function enc_PCUIF_agch(in PCUIF_agch pdu) return octetstring + with { extension "prototype(convert) encode(RAW)" }; +external function dec_PCUIF_agch(in octetstring stream) return PCUIF_agch + with { extension "prototype(convert) decode(RAW)" }; + type union PCUIF_MsgUnion { PCUIF_data data_req, PCUIF_data data_cnf, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I40e05a2e68cca77d3c2f41df9af8d35762488abf Gerrit-Change-Number: 34066 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: PCUIF: use confirm flag in struct gsm_pcu_if_pch
by laforge 29 Aug '23

29 Aug '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34194 ) Change subject: PCUIF: use confirm flag in struct gsm_pcu_if_pch ...................................................................... PCUIF: use confirm flag in struct gsm_pcu_if_pch In the recent PCUIF change of osmo-pcu (see Depends) a confirm flag is added to struct gsm_pcu_if_pch. This flag tells the receiving end (OsmoBSC or OsmoBTS) that the sending of the received MAC block has to be confirmed towards the PCU. OsmoBTS and OsmoPCU now rely on the conformation flag. Let's update the BTS_and PCU testsuites accordingly. Related: OS#5927 Depends: osmo-pcu.git Ia202862aafc1f0cb6601574ef61eb9155de11f04 Change-Id: I7017ca20ca7e0b77d0f363121e4f17280e39e8ac --- M bts/BTS_Tests.ttcn M library/PCUIF_CodecPort.ttcn M library/PCUIF_Types.ttcn M pcu/PCUIF_Components.ttcn 4 files changed, 30 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index d39bb77..6109159 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -5823,6 +5823,7 @@ pch.msg_id := '01020304'O; pch.imsi := "00101000000000123"; pch.data := c_PCU_DATA; + pch.confirm := false; f_pcu_data_req(0, 0, 0, 0, 0, PCU_IF_SAPI_PCH_2, enc_PCUIF_pch(pch)); } diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index e56303e..d180f17 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -159,6 +159,7 @@ pch.msg_id := msg_id; pch.imsi := hex2str(imsi); pch.data := imm_ass; + pch.confirm := true; pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH_2, enc_PCUIF_pch(pch)))); } diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 8583504..509c93c 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -308,7 +308,8 @@ type record PCUIF_pch { OCT4 msg_id, charstring imsi length(17), - octetstring data length(23) + octetstring data length(23), + boolean confirm } with { variant (msg_id) "BYTEORDER(last)" variant (imsi) "FIELDLENGTH(17)" diff --git a/pcu/PCUIF_Components.ttcn b/pcu/PCUIF_Components.ttcn index d7e2ed5..5868625 100644 --- a/pcu/PCUIF_Components.ttcn +++ b/pcu/PCUIF_Components.ttcn @@ -142,7 +142,8 @@ PCUIF_data raw, OCT4 msg_id optional, charstring imsi optional, - GsmRrMessage rr_msg + GsmRrMessage rr_msg, + boolean confirm }; template BTS_PDTCH_Block tr_PCUIF_DATA_PDTCH(template uint8_t bts_nr, template PCUIF_data raw, @@ -162,12 +163,14 @@ template PCUIF_data raw, template GsmRrMessage rr_msg := ?, template OCT4 msg_id := *, - template charstring imsi := *) := { + template charstring imsi := *, + template boolean confirm := *) := { bts_nr := bts_nr, raw := raw, msg_id := msg_id, imsi := imsi, - rr_msg := rr_msg + rr_msg := rr_msg, + confirm := confirm }; /* Generic port for messages and events */ @@ -553,6 +556,7 @@ pcu_msg_rr.msg_id := pch.msg_id; pcu_msg_rr.imsi := pch.imsi; pcu_msg_rr.rr_msg := dec_GsmRrMessage(pch.data); + pcu_msg_rr.confirm := pch.confirm; } else { pcu_msg_rr.msg_id := omit; pcu_msg_rr.imsi := omit; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7017ca20ca7e0b77d0f363121e4f17280e39e8ac Gerrit-Change-Number: 34194 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • ...
  • 152
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.