Change in osmo-bts[master]: a5/4 support

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Hoernchen gerrit-no-reply at lists.osmocom.org
Wed Jun 9 02:01:56 UTC 2021


Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/24631 )


Change subject: a5/4 support
......................................................................

a5/4 support

Change-Id: Ib8e04fe79f30b443a54c38f395a7a3626ff97c45
Related: SYS#5324
---
M src/common/scheduler.c
M src/osmo-bts-trx/main.c
M tests/cipher/cipher_test.c
3 files changed, 5 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/31/24631/1

diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 3ab94a2..5dd808d 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -1200,7 +1200,7 @@
 	/* no algorithm given means a5/0 */
 	if (algo <= 0)
 		algo = 0;
-	else if (lchan->encr.key_len != 8) {
+	else if (lchan->encr.key_len > 16) {
 		LOGPLCHAN(lchan, DL1C, LOGL_ERROR,
 			  "Algo A5/%d not supported with given key_len=%u\n",
 			  algo, lchan->encr.key_len);
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 7134939..7c2fda8 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -127,7 +127,7 @@
 
 	bts->model_priv = bts_trx;
 	bts->variant = BTS_OSMO_TRX;
-	bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
+	bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3) | CIPHER_A5(4);
 
 	/* The nominal value for each TRX is later overwritten through VTY cmd
 	 * 'nominal-tx-power' if present, otherwise through TRXC cmd NOMTXPOWER.
diff --git a/tests/cipher/cipher_test.c b/tests/cipher/cipher_test.c
index 9d78a88..9303ed2 100644
--- a/tests/cipher/cipher_test.c
+++ b/tests/cipher/cipher_test.c
@@ -50,14 +50,14 @@
 		ASSERT_TRUE(bts_supports_cipher(bts, i) == 0);
 	}
 
-	/* checking default A5/1 to A5/3 support */
-	bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
+	/* checking default A5/1 to A5/4 support */
+	bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3) | CIPHER_A5(4);
 	ASSERT_TRUE(bts_supports_cipher(bts, 0x0) == -ENOTSUP);
 	ASSERT_TRUE(bts_supports_cipher(bts, 0x1) == 1); /* A5/0 */
 	ASSERT_TRUE(bts_supports_cipher(bts, 0x2) == 1); /* A5/1 */
 	ASSERT_TRUE(bts_supports_cipher(bts, 0x3) == 1); /* A5/2 */
 	ASSERT_TRUE(bts_supports_cipher(bts, 0x4) == 1); /* A5/3 */
-	ASSERT_TRUE(bts_supports_cipher(bts, 0x5) == 0); /* A5/4 */
+	ASSERT_TRUE(bts_supports_cipher(bts, 0x5) == 1); /* A5/4 */
 	ASSERT_TRUE(bts_supports_cipher(bts, 0x6) == 0); /* A5/5 */
 	ASSERT_TRUE(bts_supports_cipher(bts, 0x7) == 0); /* A5/6 */
 	ASSERT_TRUE(bts_supports_cipher(bts, 0x8) == 0); /* A5/7 */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24631
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib8e04fe79f30b443a54c38f395a7a3626ff97c45
Gerrit-Change-Number: 24631
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210609/933fadb4/attachment.htm>


More information about the gerrit-log mailing list