Change in osmo-ttcn3-hacks[master]: bsc: change encryption a5 via VTY where needed

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

laforge gerrit-no-reply at lists.osmocom.org
Sun Jul 11 17:41:59 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24897 )

Change subject: bsc: change encryption a5 via VTY where needed
......................................................................

bsc: change encryption a5 via VTY where needed

Do not assume that osmo-bsc.cfg contains "0 1 3 4" for master and "0 1 3"
for latest anymore. An upcoming test will need to change the value as
the test runs and needs a defined value to reset to.

Assume that osmo-bsc.cfg contains "0 1 3" and change it to "0 1 3 4"
only for TC_ciph_mode_a5_4.

Related: OS#4975
Related: docker-playground I55135ca00ef51de5cf6eaec75cfc20c21beef665
Change-Id: I3cf36c6ef86a0db050507f3737f4b0c10dcd52ed
---
M bsc/BSC_Tests.ttcn
M bsc/osmo-bsc.cfg
2 files changed, 16 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index b85aa63..6bea49e 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3304,6 +3304,19 @@
 	fn.apply(id);
 }
 
+private function f_vty_encryption_a5(charstring options) runs on test_CT {
+	f_vty_transceive(BSCVTY, "configure terminal");
+	f_vty_transceive(BSCVTY, "network");
+	f_vty_transceive(BSCVTY, "encryption a5 " & options);
+	f_vty_transceive(BSCVTY, "exit");
+	f_vty_transceive(BSCVTY, "exit");
+}
+
+private function f_vty_encryption_a5_reset() runs on test_CT {
+	/* keep in sync with docker-playground.git ttcn3-bsc-test/osmo-bsc.cfg */
+	f_vty_encryption_a5("0 1 3");
+}
+
 /* Establish signalling channel (non-assignment case) followed by cipher mode */
 private function f_tc_ciph_mode_a5(charstring id) runs on MSC_ConnHdlr {
 	var template PDU_BSSAP exp_compl := f_gen_exp_compl();
@@ -3356,9 +3369,11 @@
 	pars.encr := valueof(t_EncrParams('10'O, f_rnd_octstring(8), f_rnd_octstring(16)));
 
 	f_init(1, true);
+	f_vty_encryption_a5("0 1 3 4");
 	f_sleep(1.0);
 	vc_conn := f_start_handler(refers(f_tc_ciph_mode_a5), pars);
 	vc_conn.done;
+	f_vty_encryption_a5_reset();
 	f_shutdown_helper();
 }
 /* establish initial channel, enable ciphering followed by assignment to ciphered channel */
diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg
index 7b0fa2a..b64a63d 100644
--- a/bsc/osmo-bsc.cfg
+++ b/bsc/osmo-bsc.cfg
@@ -69,7 +69,7 @@
 network
  network country code 1
  mobile network code 1
- encryption a5 0 1 3 4
+ encryption a5 0 1 3
  neci 1
  paging any use tch 0
  handover 1

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24897
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: I3cf36c6ef86a0db050507f3737f4b0c10dcd52ed
Gerrit-Change-Number: 24897
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210711/238dc1eb/attachment.htm>


More information about the gerrit-log mailing list