Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/33091
to look at the new patch set (#3).
Change subject: libosmogsm: Allow auth API caller to specify RES length
......................................................................
libosmogsm: Allow auth API caller to specify RES length
There are 3G algorithms which support different lengths of RES values
(4, 8, 16 byte). For MILENAGE, we never really had to bother, as
the 4-byte RES is simply the first 4 bytes of the 8-byte RES.
However, for TUAK, the expected RES length is an input parameter to
the Keccak crypto functions, so the result of all parameters (including
CK, IK, ...) will be completely different for RES length 4 than RES
length 8.
So let's permit the caller of the osmocom auth API to specify the
requested RES length via the osmo_auth_vector.res_len parameter.
For backwards compatibility of callers of the old osmo_auth_gen_vec/
osmo_auth_gen_vec_auts API: Always force the res_len to 8 in this case,
which was the hard-coded length before this patch.
Change-Id: Ic662843fbe8b5c58e4af39ea630ad5ac13fd6bef
---
M include/osmocom/crypt/auth.h
M src/gsm/auth_core.c
M src/gsm/auth_milenage.c
M tests/osmo-auc-gen/osmo-auc-gen_test.ok
M utils/osmo-auc-gen.c
5 files changed, 87 insertions(+), 28 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/91/33091/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33091
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic662843fbe8b5c58e4af39ea630ad5ac13fd6bef
Gerrit-Change-Number: 33091
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/33094
to look at the new patch set (#4).
Change subject: libosmogsm: Add support for TUAK authentication algorithm
......................................................................
libosmogsm: Add support for TUAK authentication algorithm
The TUAK algorithm is specified in 3GPP TS 35.231, 232 and 233 and
intended as an alternative to MILENAGE. It's based around the
cryptographic function of KeccakP1600, which is part of SHA-3.
This patch adds support for TUAK to the libosmogsm authentication
core API via 'struct osmo_auth_impl'.
Unit tests covering the test cases from the 3GPP specification are added
(and are all passing).
Change-Id: Ib905b8d8bdf248e8299bf50666ee1bca8298433d
---
A .checkpatch.conf
M include/osmocom/crypt/auth.h
M src/gsm/Makefile.am
M src/gsm/auth_core.c
A src/gsm/auth_tuak.c
A src/gsm/tuak/KeccakP-1600-3gpp.c
A src/gsm/tuak/KeccakP-1600-3gpp.h
A src/gsm/tuak/tuak.c
A src/gsm/tuak/tuak.h
M tests/Makefile.am
A tests/auth/tuak_test.c
A tests/auth/tuak_test.ok
12 files changed, 1,187 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/33094/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33094
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib905b8d8bdf248e8299bf50666ee1bca8298433d
Gerrit-Change-Number: 33094
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/33094
to look at the new patch set (#3).
Change subject: libosmogsm: Add support for TUAK authentication algorithm
......................................................................
libosmogsm: Add support for TUAK authentication algorithm
The TUAK algorithm is specified in 3GPP TS 35.231, 232 and 233 and
intended as an alternative to MILENAGE. It's based around the
cryptographic function of KeccakP1600, which is part of SHA-3.
This patch adds support for TUAK to the libosmogsm authentication
core API via 'struct osmo_auth_impl'.
Unit tests covering the test cases from the 3GPP specification are added
(and are all passing).
Change-Id: Ib905b8d8bdf248e8299bf50666ee1bca8298433d
---
A .checkpatch.conf
M include/osmocom/crypt/auth.h
M src/gsm/Makefile.am
M src/gsm/auth_core.c
A src/gsm/auth_tuak.c
A src/gsm/tuak/KeccakP-1600-3gpp.c
A src/gsm/tuak/KeccakP-1600-3gpp.h
A src/gsm/tuak/tuak.c
A src/gsm/tuak/tuak.h
M tests/Makefile.am
A tests/auth/tuak_test.c
A tests/auth/tuak_test.ok
12 files changed, 1,187 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/33094/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33094
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib905b8d8bdf248e8299bf50666ee1bca8298433d
Gerrit-Change-Number: 33094
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/33094
to look at the new patch set (#2).
Change subject: libosmogsm: Add support for TUAK authentication algorithm
......................................................................
libosmogsm: Add support for TUAK authentication algorithm
The TUAK algorithm is specified in 3GPP TS 35.231, 232 and 233 and
intended as an alternative to MILENAGE. It's based around the
cryptographic function of KeccakP1600, which is part of SHA-3.
This patch adds support for TUAK to the libosmogsm authentication
core API via 'struct osmo_auth_impl'.
Unit tests covering the test cases from the 3GPP specification are added
(and are all passing).
Change-Id: Ib905b8d8bdf248e8299bf50666ee1bca8298433d
---
A .checkpatch.conf
M include/osmocom/crypt/auth.h
M src/gsm/Makefile.am
M src/gsm/auth_core.c
A src/gsm/auth_tuak.c
A src/gsm/tuak/KeccakP-1600-3gpp.c
A src/gsm/tuak/KeccakP-1600-3gpp.h
A src/gsm/tuak/tuak.c
A src/gsm/tuak/tuak.h
M tests/Makefile.am
A tests/auth/tuak_test.ok
11 files changed, 878 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/33094/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33094
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib905b8d8bdf248e8299bf50666ee1bca8298433d
Gerrit-Change-Number: 33094
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/33087
to look at the new patch set (#2).
Change subject: libosmogsm: Support authentication with 256-bit K and/or OP/OPc
......................................................................
libosmogsm: Support authentication with 256-bit K and/or OP/OPc
3GPP TS 33.102 Section 6.3.7 states that K can be 128 or 256 bits,
while our 'struct osmo_sub_auth_data' had a fixed-size 128bit field.
This means we cannot use our auth_core for algorithms with larger
key sizes, such as TUAK. Let's introduce osmo_sub_auth_data2 for
larger (and variable) sized K and OP[c].
K and OP[c] can even have diffeent sizes in TUAK, where OP[c] is
always 256bit, but K can bei 128 or 256 bits. So we need separate
length fields for K and OP[c].
I'm adding backwards-compatibility API wrappers, so old applications
just continue to work as they always did.
However, I'm not adding compatibility wrappers for the plug-in API
that can be used to register additional authentication implementations
at runtime. We don't know of any user of that API outside of
libosmocore, so the function signatures of the 'struct osmo_auth_impl'
are modified in an incompatible way.
Change-Id: Ie775fedba4a3fa12314c0f7c8a369662ef6a40df
---
M include/osmocom/crypt/auth.h
M src/gsm/auth_comp128v1.c
M src/gsm/auth_comp128v23.c
M src/gsm/auth_core.c
M src/gsm/auth_milenage.c
M src/gsm/auth_xor.c
M src/gsm/auth_xor_2g.c
M src/gsm/libosmogsm.map
8 files changed, 180 insertions(+), 28 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/33087/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33087
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie775fedba4a3fa12314c0f7c8a369662ef6a40df
Gerrit-Change-Number: 33087
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/33091
to look at the new patch set (#2).
Change subject: libosmogsm: Allow auth API caller to specify RES length
......................................................................
libosmogsm: Allow auth API caller to specify RES length
There are 3G algorithms which support different lengths of RES values
(4, 8, 16 byte). For MILENAGE, we never really had to bother, as
the 4-byte RES is simply the first 4 bytes of the 8-byte RES.
However, for TUAK, the expected RES length is an input parameter to
the Keccak crypto functions, so the result of all parameters (including
CK, IK, ...) will be completely different for RES length 4 than RES
length 8.
So let's permit the caller of the osmocom auth API to specify the
requested RES length via the osmo_auth_vector.res_len parameter.
For backwards compatibility of callers of the old osmo_auth_gen_vec/
osmo_auth_gen_vec_auts API: Always force the res_len to 8 in this case,
which was the hard-coded length before this patch.
Change-Id: Ic662843fbe8b5c58e4af39ea630ad5ac13fd6bef
---
M include/osmocom/crypt/auth.h
M src/gsm/auth_core.c
M src/gsm/auth_milenage.c
M tests/osmo-auc-gen/osmo-auc-gen_test.ok
M utils/osmo-auc-gen.c
5 files changed, 83 insertions(+), 28 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/91/33091/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33091
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic662843fbe8b5c58e4af39ea630ad5ac13fd6bef
Gerrit-Change-Number: 33091
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/33090
to look at the new patch set (#2).
Change subject: osmo-auc-gen: Convert over to osmo_auth_gen_vec*2 API
......................................................................
osmo-auc-gen: Convert over to osmo_auth_gen_vec*2 API
This allows the tool to support K/OPc lengths != 128 bit.
Let's add more length checks of command-line arguments while we're
adding those checks for K/OPc.
Change-Id: Iffed02ec0fc9c9a996da6f218d67314e381cbb29
---
M utils/osmo-auc-gen.c
1 file changed, 47 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/90/33090/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33090
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iffed02ec0fc9c9a996da6f218d67314e381cbb29
Gerrit-Change-Number: 33090
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33090 )
Change subject: osmo-auc-gen: Convert over to osmo_auth_gen_vec*2 API
......................................................................
Patch Set 1:
(1 comment)
File utils/osmo-auc-gen.c:
https://gerrit.osmocom.org/c/libosmocore/+/33090/comment/38a95087_e3d29dff
PS1, Line 117: /* 3GPP TS 33.102 6.3.7: "The authentication key (K) shall have a length of 128 bits or 256 bits." */
> why is this comment added here?
thanks. it's left-over from a previous version of the patch, where some related code was inserted here.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33090
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iffed02ec0fc9c9a996da6f218d67314e381cbb29
Gerrit-Change-Number: 33090
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 30 May 2023 14:25:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/33093 )
Change subject: libosmogsm: Avoid executing MILENAGE crypto twice (for UMTS and GSM)
......................................................................
libosmogsm: Avoid executing MILENAGE crypto twice (for UMTS and GSM)
So far, we were executing the cryptographic functions to generate
MILENAGE authentication tuples *twice* for every call to
milenage_gen_vec: Once for UMTS, and another time for GSM.
Let's do this properly: Execute once for UMTS, an then call the
computationally much simpler C2 and C3 functions to compute the
SRES and Kc values from RES, and CK+IK, respectively.
Change-Id: I20ecf6d32974c1ba196bf56deba5b2cd971eaffb
---
M src/gsm/auth_milenage.c
1 file changed, 19 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/33093/1
diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c
index a439b15..2bd05a6 100644
--- a/src/gsm/auth_milenage.c
+++ b/src/gsm/auth_milenage.c
@@ -54,7 +54,6 @@
uint8_t sqn[6];
uint64_t ind_mask;
uint64_t seq_1;
- int rc;
OSMO_ASSERT(aud->algo == OSMO_AUTH_ALG_MILENAGE);
@@ -138,9 +137,8 @@
sqn, _rand,
vec->autn, vec->ik, vec->ck, vec->res, &res_len);
- rc = gsm_milenage(opc, aud->u.umts.k, _rand, vec->sres, vec->kc);
- if (rc < 0)
- return rc;
+ osmo_auth_c3(vec->kc, vec->ck, vec->ik);
+ osmo_auth_c2(vec->sres, vec->res, vec->res_len, 1);
vec->auth_types = OSMO_AUTH_TYPE_UMTS | OSMO_AUTH_TYPE_GSM;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33093
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I20ecf6d32974c1ba196bf56deba5b2cd971eaffb
Gerrit-Change-Number: 33093
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/33091 )
Change subject: libosmogsm: Allow auth API caller to specify RES length
......................................................................
libosmogsm: Allow auth API caller to specify RES length
There are 3G algorithms which support different lengths of RES values
(4, 8, 16 byte). For MILENAGE, we never really had to bother, as
the 4-byte RES is simply the first 4 bytes of the 8-byte RES.
However, for TUAK, the expected RES length is an input parameter to
the Keccak crypto functions, so the result of all parameters (including
CK, IK, ...) will be completely different for RES length 4 than RES
length 8.
So let's permit the caller of the osmocom auth API to specify the
requested RES length via the osmo_auth_vector.res_len parameter.
For backwards compatibility of callers of the old osmo_auth_gen_vec/
osmo_auth_gen_vec_auts API: Always force the res_len to 8 in this case,
which was the hard-coded length before this patch.
Change-Id: Ic662843fbe8b5c58e4af39ea630ad5ac13fd6bef
---
M include/osmocom/crypt/auth.h
M src/gsm/auth_core.c
M src/gsm/auth_milenage.c
M tests/osmo-auc-gen/osmo-auc-gen_test.ok
M utils/osmo-auc-gen.c
5 files changed, 70 insertions(+), 25 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/91/33091/1
diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h
index 2715164..2f8804b 100644
--- a/include/osmocom/crypt/auth.h
+++ b/include/osmocom/crypt/auth.h
@@ -91,7 +91,7 @@
uint8_t ck[OSMO_A5_MAX_KEY_LEN_BYTES]; /*!< ciphering key */
uint8_t ik[OSMO_A5_MAX_KEY_LEN_BYTES]; /*!< integrity key */
uint8_t res[16]; /*!< authentication result */
- uint8_t res_len; /*!< length (in bytes) of res: 8..16 bytes */
+ uint8_t res_len; /*!< length (in bytes) of res: 4..16 bytes */
uint8_t kc[8]; /*!< Kc for GSM encryption (A5) */
uint8_t sres[4]; /*!< authentication result for GSM */
uint32_t auth_types; /*!< bitmask of OSMO_AUTH_TYPE_* */
diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c
index 7ccdbc8..1fa1d79 100644
--- a/src/gsm/auth_core.c
+++ b/src/gsm/auth_core.c
@@ -216,6 +216,10 @@
struct osmo_sub_auth_data2 aud2;
int rc;
+ /* old API callers are not expected to initialize this struct field,
+ * and always expect an 8-byte RES value */
+ vec->res_len = 8;
+
auth_data2auth_data2(&aud2, aud);
rc = osmo_auth_gen_vec2(vec, &aud2, _rand);
if (aud->type == OSMO_AUTH_TYPE_UMTS)
@@ -282,6 +286,10 @@
struct osmo_sub_auth_data2 aud2;
int rc;
+ /* old API callers are not expected to initialize this struct field,
+ * and always expect an 8-byte RES value */
+ vec->res_len = 8;
+
auth_data2auth_data2(&aud2, aud);
rc = osmo_auth_gen_vec_auts2(vec, &aud2, auts, rand_auts, _rand);
if (aud->type == OSMO_AUTH_TYPE_UMTS) {
diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c
index 9e94293..a439b15 100644
--- a/src/gsm/auth_milenage.c
+++ b/src/gsm/auth_milenage.c
@@ -62,6 +62,8 @@
return -EINVAL;
if (aud->u.umts.opc_len != 16)
return -EINVAL;
+ if (vec->res_len != 4 && vec->res_len != 8)
+ return -EINVAL;
opc = gen_opc_if_needed(aud, gen_opc);
if (!opc)
@@ -135,7 +137,7 @@
milenage_generate(opc, aud->u.umts.amf, aud->u.umts.k,
sqn, _rand,
vec->autn, vec->ik, vec->ck, vec->res, &res_len);
- vec->res_len = res_len;
+
rc = gsm_milenage(opc, aud->u.umts.k, _rand, vec->sres, vec->kc);
if (rc < 0)
return rc;
diff --git a/tests/osmo-auc-gen/osmo-auc-gen_test.ok b/tests/osmo-auc-gen/osmo-auc-gen_test.ok
index 3c41f41..2da0b02 100644
--- a/tests/osmo-auc-gen/osmo-auc-gen_test.ok
+++ b/tests/osmo-auc-gen/osmo-auc-gen_test.ok
@@ -1,7 +1,7 @@
> osmo-auc-gen -3 -a milenage -r 6a61050765caa32c90371370e5d6dc2d -k 1dc4f974325cce611e54f516dc1fec56 -o 2a48162ff3edca4adf0b7b5e527d6c16 -s 0
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 6a61050765caa32c90371370e5d6dc2d
@@ -18,7 +18,7 @@
> osmo-auc-gen -3 -a milenage -r 6a61050765caa32c90371370e5d6dc2d -k 1dc4f974325cce611e54f516dc1fec56 -o 2a48162ff3edca4adf0b7b5e527d6c16 -s 1
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 6a61050765caa32c90371370e5d6dc2d
@@ -35,7 +35,7 @@
> osmo-auc-gen -3 -a milenage -r 6a61050765caa32c90371370e5d6dc2d -k 1dc4f974325cce611e54f516dc1fec56 -o 2a48162ff3edca4adf0b7b5e527d6c16 -s 23
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 6a61050765caa32c90371370e5d6dc2d
@@ -52,7 +52,7 @@
> osmo-auc-gen -3 -a milenage -r 1dc4f974325cce611e54f516dc1fec56 -k 2a48162ff3edca4adf0b7b5e527d6c16 -o 6a61050765caa32c90371370e5d6dc2d -s 42
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 1dc4f974325cce611e54f516dc1fec56
@@ -69,7 +69,7 @@
> osmo-auc-gen -3 -a milenage -r 2a48162ff3edca4adf0b7b5e527d6c16 -k 6a61050765caa32c90371370e5d6dc2d -o 1dc4f974325cce611e54f516dc1fec56 -s 99
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 2a48162ff3edca4adf0b7b5e527d6c16
@@ -86,7 +86,7 @@
> osmo-auc-gen -3 -a milenage -r 6a61050765caa32c90371370e5d6dc2d -k 2a48162ff3edca4adf0b7b5e527d6c16 -o 1dc4f974325cce611e54f516dc1fec56 -s 281474976710655
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 6a61050765caa32c90371370e5d6dc2d
@@ -103,7 +103,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -121,7 +121,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind 5
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -139,7 +139,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind 23
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -157,7 +157,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind 31
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -175,7 +175,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 0
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -193,7 +193,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 1
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -211,7 +211,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 1 --ind 1
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -229,7 +229,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 8
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -247,7 +247,7 @@
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 8 --ind 1
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
RAND: 39fa2f4e3d523d8619a73b4f65c3e14d
@@ -266,27 +266,27 @@
expecting error:
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind -1
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
expecting error:
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind 32
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
expecting error:
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind 42
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
expecting error:
> osmo-auc-gen -3 -a milenage -r 39fa2f4e3d523d8619a73b4f65c3e14d -k EB215756028D60E3275E613320AEC880 -o FB2A3D1B360F599ABAB99DB8669F8308 -A 979498b1f72d3e28c59fa2e72f9c --ind-len 0 --ind 1
-osmo-auc-gen (C) 2011-2012 by Harald Welte
+osmo-auc-gen (C) 2011-2023 by Harald Welte
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c
index 765ca0b..f21707d 100644
--- a/utils/osmo-auc-gen.c
+++ b/utils/osmo-auc-gen.c
@@ -98,6 +98,7 @@
"-s --sqn\tSpecify SQN (only for 3G)\n"
"-i --ind\tSpecify IND slot for new SQN after AUTS (only for 3G)\n"
"-l --ind-len\tSpecify IND bit length (default=5) (only for 3G)\n"
+ "-L --res-len\tSpecify RES byte length (default=8) (only for 3G)\n"
"-A --auts\tSpecify AUTS (only for 3G)\n"
"-r --rand\tSpecify random value\n"
"-I --ipsec\tOutput in triplets.dat format for strongswan\n");
@@ -124,10 +125,12 @@
int fmt_triplets_dat = 0;
uint64_t ind_mask = 0;
- printf("osmo-auc-gen (C) 2011-2012 by Harald Welte\n");
+ printf("osmo-auc-gen (C) 2011-2023 by Harald Welte\n");
printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n");
memset(_auts, 0, sizeof(_auts));
+ memset(vec, 0, sizeof(*vec));
+ vec->res_len = 8; /* default */
while (1) {
int c;
@@ -142,6 +145,7 @@
{ "sqn", 1, 0, 's' },
{ "ind", 1, 0, 'i' },
{ "ind-len", 1, 0, 'l' },
+ { "res-len", 1, 0, 'L' },
{ "rand", 1, 0, 'r' },
{ "auts", 1, 0, 'A' },
{ "help", 0, 0, 'h' },
@@ -150,7 +154,7 @@
rc = 0;
- c = getopt_long(argc, argv, "23a:k:o:f:s:i:l:r:hO:A:I", long_options,
+ c = getopt_long(argc, argv, "23a:k:o:f:s:i:l:L:r:hO:A:I", long_options,
&option_index);
if (c == -1)
@@ -266,6 +270,14 @@
}
test_aud.u.umts.ind_bitlen = atoi(optarg);
break;
+ case 'L':
+ rc = atoi(optarg);
+ if (rc != 4 && rc != 8 && rc != 16) {
+ fprintf(stderr, "Invalid RES length %u\n", rc);
+ exit(2);
+ }
+ vec->res_len = rc;
+ break;
case 'r':
rc = osmo_hexparse(optarg, _rand, sizeof(_rand));
if (rc != sizeof(_rand)) {
@@ -314,8 +326,6 @@
exit(2);
}
- memset(vec, 0, sizeof(*vec));
-
if (test_aud.type == OSMO_AUTH_TYPE_UMTS) {
uint64_t seq_1 = 1LL << test_aud.u.umts.ind_bitlen;
ind_mask = seq_1 - 1;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33091
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic662843fbe8b5c58e4af39ea630ad5ac13fd6bef
Gerrit-Change-Number: 33091
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33090 )
Change subject: osmo-auc-gen: Convert over to osmo_auth_gen_vec*2 API
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File utils/osmo-auc-gen.c:
https://gerrit.osmocom.org/c/libosmocore/+/33090/comment/2c53e989_fae4bc9c
PS1, Line 117: /* 3GPP TS 33.102 6.3.7: "The authentication key (K) shall have a length of 128 bits or 256 bits." */
why is this comment added here?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33090
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iffed02ec0fc9c9a996da6f218d67314e381cbb29
Gerrit-Change-Number: 33090
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 30 May 2023 13:46:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33089 )
Change subject: libosmogsm: Ensure MILENAGE + XOR-3G K length is 128 bit
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33089
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iae8b93cf059abda087101cdd01bbcf92d355753b
Gerrit-Change-Number: 33089
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 30 May 2023 13:44:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33084 )
Change subject: osmo_io: Fix sending msgb structures
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
This change is ready for review.
Patchset:
PS2:
Re-adding the comments from the private change:
> > daniel:
> > Can you elaborate on that? Right now the expectation is that the user calls write_enable separately. I guess we could change the behaviour if we never want to enqueue messages that should not be sent immediately.
> >
> > In that case we should also change the sendmsg function below to behave the same.
> arehbein:
> A couple of reasons which together strongly suggested to me it should be like this:
>
> * osmo_stream_srv_send() was broken because the 'write enable' was missing
> * The doc for osmo_iofd_write_msgb() says /*! Send a message through a connected socket
> * The function name suggests that the write should be caused by it.
>
> Maybe the last two points are also why the write enable was omitted in osmo_stream_srv_send() .
>
> Admittedly, I didn't check the equivalent *_cli_* function...
> however I'm in favor of renaming the function ( osmo_iofd_write_msgb -> osmo_iofd_append_msgb maybe?) and fixing the doc if we stick with the current approach/the one you are mentioning.
I can see that it's confusing as it is right now. Maybe the issue is that we currently require a call to read/write_enable when opening the io_fd.
Instead it should probably be the default. If the user calls read/write_disable it's much more obvious that they'll need to call *_enable again.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33084
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie2a9c93f820fa372a1d527c805fd0fe2cff0eb49
Gerrit-Change-Number: 33084
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 30 May 2023 13:19:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33087 )
Change subject: libosmogsm: Support authentication with 256-bit K and/or OP/OPc
......................................................................
Patch Set 1:
(1 comment)
File include/osmocom/crypt/auth.h:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7611):
https://gerrit.osmocom.org/c/libosmocore/+/33087/comment/ee98614f_1b49e1f0
PS1, Line 52: uint8_t k_len; /*!< K length (in bytes): 16 or 32 */
please, no space before tabs
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33087
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie775fedba4a3fa12314c0f7c8a369662ef6a40df
Gerrit-Change-Number: 33087
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 30 May 2023 13:10:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/33086 )
Change subject: Fix failing Osmocom-release-manuals job
......................................................................
Fix failing Osmocom-release-manuals job
Add a workaround that upgrades the osmocom-nightly package before
installing build dependencies for the given package.
This is not very elegant, it would make more sense if the docker image
we use here did not have the nightly Osmocom repository configured in
the first place (as this job is about creating manuals for tagged
releases). But the image is used by jenkins build verification too and I
don't think it's a good use of time to change this right now.
Fix for:
+ apt-get -y build-dep /build
Note, using directory '/build' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
osmo-gsm-manuals-dev : Depends: osmocom-nightly (= 202305300026) but 202305290026 is to be installed
Change-Id: If28a34d3e5b07216c5310b19623fcc42692f65c3
---
M scripts/manuals/publish-manuals-for-tags.sh
1 file changed, 39 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/scripts/manuals/publish-manuals-for-tags.sh b/scripts/manuals/publish-manuals-for-tags.sh
index 99e117c..49a3d43 100755
--- a/scripts/manuals/publish-manuals-for-tags.sh
+++ b/scripts/manuals/publish-manuals-for-tags.sh
@@ -354,6 +354,12 @@
sh -ex -c "
apt-get update
+ # The docker image has the nightly repository
+ # configured, in which packages can't be installed from
+ # different build dates. Upgrade osmocom-nightly first
+ # to prevent errors in apt-get build-dep below.
+ apt-get -y upgrade osmocom-nightly
+
# Install dependencies
case $repo in
*)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/33086
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If28a34d3e5b07216c5310b19623fcc42692f65c3
Gerrit-Change-Number: 33086
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/33086 )
Change subject: Fix failing Osmocom-release-manuals job
......................................................................
Fix failing Osmocom-release-manuals job
Add a workaround that upgrades the osmocom-nightly package before
installing build dependencies for the given package.
This is not very elegant, it would make more sense if the docker image
we use here did not have the nightly Osmocom repository configured in
the first place (as this job is about creating manuals for tagged
releases). But the image is used by jenkins build verification too and I
don't think it's a good use of time to change this right now.
Fix for:
+ apt-get -y build-dep /build
Note, using directory '/build' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
osmo-gsm-manuals-dev : Depends: osmocom-nightly (= 202305300026) but 202305290026 is to be installed
Change-Id: If28a34d3e5b07216c5310b19623fcc42692f65c3
---
M scripts/manuals/publish-manuals-for-tags.sh
1 file changed, 39 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/86/33086/1
diff --git a/scripts/manuals/publish-manuals-for-tags.sh b/scripts/manuals/publish-manuals-for-tags.sh
index 99e117c..49a3d43 100755
--- a/scripts/manuals/publish-manuals-for-tags.sh
+++ b/scripts/manuals/publish-manuals-for-tags.sh
@@ -354,6 +354,12 @@
sh -ex -c "
apt-get update
+ # The docker image has the nightly repository
+ # configured, in which packages can't be installed from
+ # different build dates. Upgrade osmocom-nightly first
+ # to prevent errors in apt-get build-dep below.
+ apt-get -y upgrade osmocom-nightly
+
# Install dependencies
case $repo in
*)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/33086
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If28a34d3e5b07216c5310b19623fcc42692f65c3
Gerrit-Change-Number: 33086
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33073 )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: osmo-bts-trx: tch_dl_dequeue(): do not drop CSD frames
......................................................................
osmo-bts-trx: tch_dl_dequeue(): do not drop CSD frames
Change-Id: I382b9994db01d58515c89c8de6250cd3239b8861
Related: OS#1572
---
M src/osmo-bts-trx/sched_lchan_tchf.c
1 file changed, 12 insertions(+), 2 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 7c2a05f..f065803 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -374,8 +374,8 @@
int8_t sti, cmi;
bool amr_is_cmr;
- if (rsl_cmode != RSL_CMOD_SPD_SPEECH) {
- LOGL1SB(DL1P, LOGL_NOTICE, l1ts, br, "Dropping speech frame, "
+ if (OSMO_UNLIKELY(rsl_cmode == RSL_CMOD_SPD_SIGN)) {
+ LOGL1SB(DL1P, LOGL_NOTICE, l1ts, br, "Dropping a TCH frame, "
"because we are not in speech mode\n");
goto free_bad_msg;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33073
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I382b9994db01d58515c89c8de6250cd3239b8861
Gerrit-Change-Number: 33073
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
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-MessageType: merged
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33073 )
Change subject: osmo-bts-trx: tch_dl_dequeue(): do not drop CSD frames
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33073
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I382b9994db01d58515c89c8de6250cd3239b8861
Gerrit-Change-Number: 33073
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 30 May 2023 11:05:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32920 )
Change subject: trxcon/l1sched: cosmetic: use variable names like in osmo-bts-trx
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32920
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I8138a45cca4e9063bf7d36ebc920b20b755138dd
Gerrit-Change-Number: 32920
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 30 May 2023 11:03:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33081 )
Change subject: HR1 codec: validate ToC header in RFC5993 RTP input
......................................................................
HR1 codec: validate ToC header in RFC5993 RTP input
osmo-bts-trx always accepted (and previously required) HR1 codec RTP
input in RFC 5993 format; currently we accept this RTP format as
input for all BTS models, but no longer require it. However, we
have never applied any checks to this format's ToC header, even
when we previously required it in osmo-bts-trx. Check this header
and reject invalid payloads that just happen to have the same octet
length as valid ones.
Change-Id: If16d38641913bb46bcd7cc11685407ed17136bfe
---
M src/common/rtp_input_preen.c
1 file changed, 31 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/common/rtp_input_preen.c b/src/common/rtp_input_preen.c
index e5cef6f..dd526fd 100644
--- a/src/common/rtp_input_preen.c
+++ b/src/common/rtp_input_preen.c
@@ -89,6 +89,20 @@
/* RTP input matches our internal format - we are good */
return PL_DECISION_ACCEPT;
case GSM_HR_BYTES_RTP_RFC5993:
+ /* Validate ToC octet: for payload of this length to be valid,
+ * the F bit must be 0 and the FT field must be either 0 (good
+ * speech) or 2 (good SID). */
+ switch (rtp_pl[0] & 0xF0) {
+ case 0x00:
+ break;
+ case 0x20:
+ /* TODO (next patch): signal this SID to the
+ * fr_hr_efr_dtxd_input() handler in l1sap. */
+ break;
+ default:
+ /* invalid payload */
+ return PL_DECISION_DROP;
+ }
/* Strip ToC octet, leaving only "pure" TS 101 318 payload. */
return PL_DECISION_STRIP_HDR_OCTET;
default:
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33081
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If16d38641913bb46bcd7cc11685407ed17136bfe
Gerrit-Change-Number: 33081
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33082 )
Change subject: HR1 codec: act on SID indication in RFC5993 RTP input
......................................................................
HR1 codec: act on SID indication in RFC5993 RTP input
Suppose we receive RTP from the uplink of another BTS, and the
UL-handling BTS has channel-decoded an HR1 frame which it deems
(per GSM 06.41 section 6.1.1) to be a valid SID, even though it is
not a perfect, error-free SID. How will this SID frame be
represented in RFC 5993 transport? My reading of the RFC tells me
that the UL-handling BTS will need to apply an operation like our
osmo_hr_sid_reset() to the payload before sending it out in RTP -
but because the text of the RFC does not explicitly address this
scenario, others may have interpreted it differently.
If we receive an RFC 5993 RTP payload in which FT is set to 2,
indicating good SID, but the actual HR payload is not a perfect SID
(the SID field is not all 1s), the only reasonable interpretation
of such occurrence is that the sender of this payload was another
BTS whose implementors interpreted the RFC as not requiring them
to rejuvenate the SID codeword prior to RTP output. Therefore, let's
treat such payloads as valid SID for our DTXd logic, and rejuvenate
the SID codeword ourselves.
Change-Id: Ife00de6220a8ca7cc180a61734497f1acb7f5b83
---
M include/osmo-bts/msg_utils.h
M include/osmo-bts/rtp_input_preen.h
M src/common/l1sap.c
M src/common/rtp_input_preen.c
4 files changed, 52 insertions(+), 10 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h
index 7ddbe88..fb8e11a 100644
--- a/include/osmo-bts/msg_utils.h
+++ b/include/osmo-bts/msg_utils.h
@@ -22,6 +22,9 @@
/* Access 3rd part of msgb control buffer */
#define rtpmsg_ts(x) ((x)->cb[2])
+/* Access 4th part of msgb control buffer */
+#define rtpmsg_is_rfc5993_sid(x) ((x)->cb[3])
+
/**
* Classification of OML message. ETSI for plain GSM 12.21
* messages and IPA/Osmo for manufacturer messages.
diff --git a/include/osmo-bts/rtp_input_preen.h b/include/osmo-bts/rtp_input_preen.h
index 822ee4a..744ae2a 100644
--- a/include/osmo-bts/rtp_input_preen.h
+++ b/include/osmo-bts/rtp_input_preen.h
@@ -17,4 +17,4 @@
enum pl_input_decision
rtp_payload_input_preen(struct gsm_lchan *lchan, const uint8_t *rtp_pl,
- unsigned rtp_pl_len);
+ unsigned rtp_pl_len, bool *rfc5993_sid_flag);
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 75177a5..9d824e3 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1314,9 +1314,17 @@
* directly coupled to the GSM 05.03 channel decoder,
* and cannot be reconstructed downstream from frame
* payload bits. The only kind of SID we can detect
- * here is the perfect, error-free kind. */
- is_sid = osmo_hr_check_sid(msgb_l2(resp_msg),
- msgb_l2len(resp_msg));
+ * here is the perfect, error-free kind. However,
+ * if we received RFC 5993 payload and the sender
+ * told us it is valid SID, honor that indication
+ * and rejuvenate the SID codeword. */
+ if (rtpmsg_is_rfc5993_sid(resp_msg)) {
+ is_sid = true;
+ osmo_hr_sid_reset(msgb_l2(resp_msg));
+ } else {
+ is_sid = osmo_hr_check_sid(msgb_l2(resp_msg),
+ msgb_l2len(resp_msg));
+ }
}
break;
case GSM48_CMODE_SPEECH_EFR:
@@ -2152,6 +2160,7 @@
{
struct gsm_lchan *lchan = rs->priv;
struct msgb *msg;
+ bool rfc5993_sid = false;
/* if we're in loopback mode, we don't accept frames from the
* RTP socket anymore */
@@ -2159,7 +2168,7 @@
return;
/* initial preen */
- switch (rtp_payload_input_preen(lchan, rtp_pl, rtp_pl_len)) {
+ switch (rtp_payload_input_preen(lchan, rtp_pl, rtp_pl_len, &rfc5993_sid)) {
case PL_DECISION_DROP:
return;
case PL_DECISION_ACCEPT:
@@ -2184,6 +2193,8 @@
rtpmsg_seq(msg) = seq_number;
/* Store RTP header Timestamp in control buffer */
rtpmsg_ts(msg) = timestamp;
+ /* Store RFC 5993 SID flag likewise */
+ rtpmsg_is_rfc5993_sid(msg) = rfc5993_sid;
/* make sure the queue doesn't get too long */
lchan_dl_tch_queue_enqueue(lchan, msg, 1);
diff --git a/src/common/rtp_input_preen.c b/src/common/rtp_input_preen.c
index dd526fd..c418e80 100644
--- a/src/common/rtp_input_preen.c
+++ b/src/common/rtp_input_preen.c
@@ -82,7 +82,8 @@
}
static enum pl_input_decision
-input_preen_hr(const uint8_t *rtp_pl, unsigned rtp_pl_len)
+input_preen_hr(const uint8_t *rtp_pl, unsigned rtp_pl_len,
+ bool *rfc5993_sid_flag)
{
switch (rtp_pl_len) {
case GSM_HR_BYTES:
@@ -96,8 +97,7 @@
case 0x00:
break;
case 0x20:
- /* TODO (next patch): signal this SID to the
- * fr_hr_efr_dtxd_input() handler in l1sap. */
+ *rfc5993_sid_flag = true;
break;
default:
/* invalid payload */
@@ -113,7 +113,7 @@
enum pl_input_decision
rtp_payload_input_preen(struct gsm_lchan *lchan, const uint8_t *rtp_pl,
- unsigned rtp_pl_len)
+ unsigned rtp_pl_len, bool *rfc5993_sid_flag)
{
/* If rtp continuous-streaming is enabled, we shall emit RTP packets
* with zero-length payloads as BFI markers. In a TrFO scenario such
@@ -132,7 +132,7 @@
if (lchan->type == GSM_LCHAN_TCH_F)
return input_preen_fr(rtp_pl, rtp_pl_len);
else
- return input_preen_hr(rtp_pl, rtp_pl_len);
+ return input_preen_hr(rtp_pl, rtp_pl_len, rfc5993_sid_flag);
case GSM48_CMODE_SPEECH_EFR:
return input_preen_efr(rtp_pl, rtp_pl_len);
case GSM48_CMODE_SPEECH_AMR:
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33082
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ife00de6220a8ca7cc180a61734497f1acb7f5b83
Gerrit-Change-Number: 33082
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/32907 )
Change subject: stream: Add IPA send function/IPA-mode read to srv
......................................................................
Patch Set 3:
(2 comments)
File include/osmocom/netif/stream.h:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7605):
https://gerrit.osmocom.org/c/libosmo-netif/+/32907/comment/dabb1e4f_0b198775
PS3, Line 75: enum ipaccess_proto_ext pe, struct msgb *msg);
code indent should use tabs where possible
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7605):
https://gerrit.osmocom.org/c/libosmo-netif/+/32907/comment/92640130_f8d9df08
PS3, Line 75: enum ipaccess_proto_ext pe, struct msgb *msg);
please, no spaces at the start of a line
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/32907
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: arehbein/osmo_io_ipa
Gerrit-Change-Id: I61e1fe59166c46595efe8c1f32b8f2607cb6c529
Gerrit-Change-Number: 32907
Gerrit-PatchSet: 3
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 30 May 2023 10:56:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
arehbein has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/32974 )
Change subject: stream: Move helper functions
......................................................................
stream: Move helper functions
Prepare for next commits
Change-Id: I318965538e5329c44d0910694621b5e1f1db0626
---
M src/stream.c
1 file changed, 32 insertions(+), 21 deletions(-)
diff --git a/src/stream.c b/src/stream.c
index 150b85f..d1682c2 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -1184,6 +1184,27 @@
osmo_stream_cli_open(cli);
}
+/* msgb_l1(msg) is expected to be set */
+static inline enum ipaccess_proto msg_get_ipa_proto(struct msgb *msg)
+{
+ struct ipa_head *ih = msgb_l1(msg);
+ OSMO_ASSERT(ih);
+ return ih->proto;
+}
+
+/* msgb->l1h is expected to be set, msgb->l2h is expected to be set if
+ * we have IPAC_PROTO_OSMO specified in the header.
+ * Returns the protocol extension (enum ipaccess_proto) or -ENOPROTOOPT if
+ * we don't have IPAC_PROTO_OSMO specified in the IPA header */
+static inline int msg_get_ipa_proto_ext(struct msgb *msg)
+{
+ if (msg_get_ipa_proto(msg) != IPAC_PROTO_OSMO)
+ return -ENOPROTOOPT;
+ struct ipa_head_ext *ihe = msgb_l2(msg);
+ OSMO_ASSERT(ihe);
+ return ihe->proto;
+}
+
/*! \brief Enqueue data to be sent via an Osmocom stream client
* \param[in] cli Stream Client through which we want to send
* \param[in] msg Message buffer to enqueue in transmit queue */
@@ -1937,27 +1958,6 @@
talloc_free(conn);
}
-/* msgb_l1(msg) is expected to be set */
-static inline enum ipaccess_proto msg_get_ipa_proto(struct msgb *msg)
-{
- struct ipa_head *ih = msgb_l1(msg);
- OSMO_ASSERT(ih);
- return ih->proto;
-}
-
-/* msgb->l1h is expected to be set, msgb->l2h is expected to be set if
- * we have IPAC_PROTO_OSMO specified in the header.
- * Returns the protocol extension (enum ipaccess_proto) or -ENOPROTOOPT if
- * we don't have IPAC_PROTO_OSMO specified in the IPA header */
-static inline int msg_get_ipa_proto_ext(struct msgb *msg)
-{
- if (msg_get_ipa_proto(msg) != IPAC_PROTO_OSMO)
- return -ENOPROTOOPT;
- struct ipa_head_ext *ihe = msgb_l2(msg);
- OSMO_ASSERT(ihe);
- return ihe->proto;
-}
-
/*! \brief Enqueue IPA data to be sent via an Osmocom stream server
* \param[in] conn Stream Server through which we want to send
* \param[in] p Protocol transported by IPA. When set to IPAC_PROTO_UNSPECIFIED, the protocol will be
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/32974
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: arehbein/osmo_io_ipa
Gerrit-Change-Id: I318965538e5329c44d0910694621b5e1f1db0626
Gerrit-Change-Number: 32974
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: merged