[PATCH] osmo-bts[master]: rsl: Make channel activation fail if encryption algorithm no...

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed May 9 18:11:31 UTC 2018


Review at  https://gerrit.osmocom.org/8091

rsl: Make channel activation fail if encryption algorithm not supported

The code actually always *wanted* to make lchan activation fail in
case we don't support the algorithm, but it failed ot do so.

The problem is encr_info2lchan() which uses bts_supports_cipher() to
determine if the cipher is supported. However, if bts_supports_cipher()
returns 0 (not supported), it uses this value as return value of
encr_info2lchan() where '0' means success (standard osmocom convention).
This results in channel activation proceeding, which it shouldn't.

Change-Id: I46275b8fc2a1a74f68b4cc60e0f64ba226b108cd
Related: OS#3254
---
M src/common/rsl.c
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/src/common/rsl.c b/src/common/rsl.c
index f50c1d2..23778b7 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -824,7 +824,7 @@
 	if (rc != 1) {
 		LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher 0x%02x\n",
 			gsm_lchan_name(lchan), *val);
-		return rc;
+		return -EINVAL;
 	}
 
 	/* length can be '1' in case of no ciphering */

-- 
To view, visit https://gerrit.osmocom.org/8091
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46275b8fc2a1a74f68b4cc60e0f64ba226b108cd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list