summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-08-24 15:12:59 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-08-24 15:16:03 +0200
commit387526aa99d526a1e36f8c72015b91011abbfc64 (patch)
treebd72f9ed678d4d1b8834ac538f815058bc978ebc
parentb5a861493348ee866a76373e3310d436f80b95ef (diff)
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
-rw-r--r--src/osmo_gsm_tester/osmo_bsc.py8
1 files changed, 8 insertions, 0 deletions
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 @@ class OsmoBsc(log.Origin):
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 @@ class OsmoBsc(log.Origin):
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 @@ class OsmoBsc(log.Origin):
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)