[PATCH] osmo-gsm-tester[master]: bsc: Allow tests to select network encryption

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

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Aug 24 15:30:19 UTC 2017


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

bsc: Allow tests to select network encryption

Nowadays encryption parameter in bsc needs to be set to the same cipher as
the one specified in msc, otherwise the cipher negotation will fail.

See OS#2461 for more information on the matter.

Change-Id: I857b3860fb771b36fb3d587d4e92b320f0685a19
---
M src/osmo_gsm_tester/osmo_bsc.py
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/3604/1

diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py
index efbda1f..2eb23fb 100644
--- a/src/osmo_gsm_tester/osmo_bsc.py
+++ b/src/osmo_gsm_tester/osmo_bsc.py
@@ -29,6 +29,7 @@
     config_file = None
     process = None
     bts = None
+    encryption = None
 
     def __init__(self, suite_run, msc, ip_address):
         super().__init__(log.C_RUN, 'osmo-bsc_%s' % ip_address.get('addr'))
@@ -81,6 +82,10 @@
             bts_list.append(bts.conf_for_bsc())
         config.overlay(values, dict(bsc=dict(net=dict(bts_list=bts_list))))
 
+        # runtime parameters:
+        if self.encryption is not None:
+            config.overlay(values, dict(bsc=dict(net=dict(encryption=self.encryption))))
+
         self.dbg('BSC CONFIG:\n' + pprint.pformat(values))
 
         with open(self.config_file, 'w') as f:
@@ -91,6 +96,9 @@
     def addr(self):
         return self.ip_address.get('addr')
 
+    def set_encryption(self, val):
+        self.encryption = val
+
     def bts_add(self, bts):
         self.bts.append(bts)
         bts.set_bsc(self)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I857b3860fb771b36fb3d587d4e92b320f0685a19
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list