Change in osmo-ttcn3-hacks[master]: msc: fix inter-msc ho tests: do not attempt to send "*"

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

neels gerrit-no-reply at lists.osmocom.org
Thu Jul 1 10:12:11 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24816 )


Change subject: msc: fix inter-msc ho tests: do not attempt to send "*"
......................................................................

msc: fix inter-msc ho tests: do not attempt to send "*"

Recently, encryption testing was added to the inter-MSC HO test. Instead
of sending the chosenEncryptionAlgorithm from the receive-template side
forward the actual received one (rx "*" usually means tx is "omit").

Change-Id: Icae084cfd63d666f3b0778fade7ba558bd161a0f
---
M msc/MSC_Tests.ttcn
1 file changed, 12 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/24816/1

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index b12fb5e..5c63b63 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -5954,6 +5954,7 @@
 
 private function f_tc_ho_inter_msc_out(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
 	var CallParameters cpars;
+	var PDU_BSSAP ho_request;
 
 	cpars := valueof(t_CallParams('12345'H, 0));
 	if (pars.use_ipv6) {
@@ -6015,13 +6016,18 @@
 	f_gsup_find_ie(prep_ho_req, OSMO_GSUP_SOURCE_NAME_IE, source_name_ie);
 	var octetstring local_msc_name := source_name_ie.source_name;
 
+	/* To forward the actual chosen encryption algorithm, decode the received PDU */
+	var GSUP_IeValue an_apdu_ie;
+	f_gsup_find_ie(prep_ho_req, OSMO_GSUP_AN_APDU_IE, an_apdu_ie);
+	ho_request := dec_PDU_BSSAP(an_apdu_ie.an_apdu.pdu);
+
 	/* Remote MSC has figured out its BSC and signals success */
 	var PDU_ML3_NW_MS rr_ho_cmd := valueof(ts_RR_HandoverCommand);
 	var octetstring rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd);
 	var PDU_BSSAP ho_req_ack := valueof(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc),
-					aoIPTransportLayer := omit,
-					speechCodec := ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}),
-					chosenEncryptionAlgorithm := chosenEncryptionAlgorithm));
+			aoIPTransportLayer := omit,
+			speechCodec := ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}),
+			chosenEncryptionAlgorithm := ho_request.pdu.bssmap.handoverRequest.chosenEncryptionAlgorithm));
 	GSUP.send(ts_GSUP_E_PrepareHandoverResult(
 				pars.imsi,
 				ho_number,
@@ -6159,9 +6165,8 @@
 	/* MSC asks local BSS to prepare Handover to it */
 	f_get_expected_encryption(encryptionInformation, chosenEncryptionAlgorithm, kC128, a5_perm_alg);
 	expect_ho_request := tr_BSSMAP_HandoverRequest(encryptionInformation, chosenEncryptionAlgorithm, kC128);
-	var PDU_BSSAP ho_request;
 	alt {
-	[] BSSAP.receive(expect_ho_request);
+	[] BSSAP.receive(expect_ho_request) -> value ho_request;
 	[] BSSAP.receive(tr_BSSMAP_HandoverRequest) -> value ho_request {
 		log("Error: Wrong handoverRequest received. Expected: ", expect_ho_request,
 		    " got ", ho_request);
@@ -6179,8 +6184,8 @@
 	var BSSMAP_IE_AoIP_TransportLayerAddress tla :=
 		valueof(f_ts_BSSMAP_IE_AoIP_TLA(cpars.bss_rtp_ip, cpars.bss_rtp_port));
 	BSSAP.send(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc),
-							tla, ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}),
-							chosenEncryptionAlgorithm := chosenEncryptionAlgorithm));
+			tla, ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}),
+			chosenEncryptionAlgorithm := ho_request.pdu.bssmap.handoverRequest.chosenEncryptionAlgorithm));
 
 	/* HandoverCommand goes out via remote MSC-I */
 	var GSUP_PDU prep_subsq_ho_res;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24816
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: Icae084cfd63d666f3b0778fade7ba558bd161a0f
Gerrit-Change-Number: 24816
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210701/a641b400/attachment.htm>


More information about the gerrit-log mailing list