[PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_outbound_connect to test if BSC rejects in...

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Dec 15 13:19:19 UTC 2017


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

BSC_Tests: Add TC_outbound_connect to test if BSC rejects inbound SCCP connections

Change-Id: Ie9087df9ff9b48c8be242b1ae66cbca936b07121
---
M bsc/BSC_Tests.ttcn
M library/BSSAP_CodecPort.ttcn
2 files changed, 18 insertions(+), 2 deletions(-)


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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 090ed0c..41e3a84 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -381,6 +381,20 @@
 	}
 }
 
+/***********************************************************************
+ * Assignment Testing
+ ***********************************************************************/
+
+/* Verify that the BSC refuses any BSSAP connection from the MSC (They are all BSC->MSC direction) */
+testcase TC_outbound_connect() runs on test_CT {
+	f_init();
+	f_bssap_reset();
+
+	BSSAP.send(ts_BSSAP_CONNECT_req(g_sccp_addr_peer, g_sccp_addr_own, 2342, ts_BSSMAP_AssignmentReq));
+	BSSAP.receive(tr_BSSAP_DISC_ind(2342, ?, ?));
+	setverdict(pass);
+}
+
 /* Test behavior if MSC answers with CREF to CR */
 testcase TC_assignment_cic_only() runs on test_CT {
 	var BSSAP_N_CONNECT_ind rx_c_ind;
@@ -1110,6 +1124,7 @@
 	execute( TC_chan_rel_hard_rlsd() );
 	execute( TC_chan_rel_a_reset() );
 
+	execute( TC_outbound_connect() );
 	execute( TC_assignment_cic_only() );
 
 	execute( TC_rll_est_ind_inact_lchan() );
diff --git a/library/BSSAP_CodecPort.ttcn b/library/BSSAP_CodecPort.ttcn
index 5e43608..7470dd4 100644
--- a/library/BSSAP_CodecPort.ttcn
+++ b/library/BSSAP_CodecPort.ttcn
@@ -21,13 +21,14 @@
 
 template BSSAP_N_CONNECT_req ts_BSSAP_CONNECT_req(SCCP_PAR_Address called,
 						 SCCP_PAR_Address calling,
-						 template PDU_BSSAP bssap := *) := {
+						 SCCP_PAR_Connection_Id conn_id,
+						 template PDU_BSSAP bssap := omit) := {
 	calledAddress := called,
 	callingAddress := calling,
 	expeditedDataSel := omit,
 	qualityOfService := omit,
 	userData := bssap,
-	connectionId := omit,
+	connectionId := conn_id,
 	importance := omit
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9087df9ff9b48c8be242b1ae66cbca936b07121
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list