summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-08-23 17:39:54 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-08-23 17:40:29 +0200
commitb5a861493348ee866a76373e3310d436f80b95ef (patch)
tree971349329fca333a35214a35e961fec65f1aa6f1
parent0755cdb138ba58db4ece6bb7611dbbd5086e2f67 (diff)
Add support for authentication VTY param in msc and bsc
-rw-r--r--example/defaults.conf2
-rw-r--r--src/osmo_gsm_tester/osmo_msc.py10
-rw-r--r--src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl1
-rw-r--r--src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl1
4 files changed, 14 insertions, 0 deletions
diff --git a/example/defaults.conf b/example/defaults.conf
index 95bd172..082f159 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -15,6 +15,7 @@ bsc:
long_name: osmo-gsm-tester-msc
auth_policy: closed
encryption: a5 0
+ authentication: optional
msc:
net:
@@ -24,6 +25,7 @@ msc:
long_name: osmo-gsm-tester-msc
auth_policy: closed
encryption: a5 0
+ authentication: optional
bsc_bts:
location_area_code: 23
diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py
index 92a9d61..f023b29 100644
--- a/src/osmo_gsm_tester/osmo_msc.py
+++ b/src/osmo_gsm_tester/osmo_msc.py
@@ -32,6 +32,7 @@ class OsmoMsc(log.Origin):
config = None
smsc = None
encryption = None
+ authentication = None
def __init__(self, suite_run, hlr, mgcpgw, ip_address):
super().__init__(log.C_RUN, 'osmo-msc_%s' % ip_address.get('addr'))
@@ -81,6 +82,9 @@ class OsmoMsc(log.Origin):
# runtime parameters:
if self.encryption is not None:
config.overlay(values, dict(msc=dict(net=dict(encryption=self.encryption))))
+ if self.authentication is not None:
+ config.overlay(values, dict(msc=dict(net=dict(authentication=self.authentication))))
+
self.config = values
@@ -97,6 +101,12 @@ class OsmoMsc(log.Origin):
def set_encryption(self, val):
self.encryption = val
+ def set_authentication(self, val):
+ if val is None:
+ self.authroziation = None
+ return
+ self.authentication = "required" if val else "optional"
+
def mcc(self):
return self.config['msc']['net']['mcc']
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 0e2f759..57ab8a3 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -29,6 +29,7 @@ network
auth policy ${bsc.net.auth_policy}
location updating reject cause 13
encryption ${bsc.net.encryption}
+ authentication ${bsc.net.authentication}
neci 1
rrlp mode none
mm info 1
diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
index 1abaf20..6851ea9 100644
--- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
@@ -16,6 +16,7 @@ network
auth policy ${msc.net.auth_policy}
location updating reject cause 13
encryption ${msc.net.encryption}
+ authentication ${msc.net.authentication}
cs7 instance 0
point-code 0.0.1
msc