pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38597?usp=email )
Change subject: hnbgw: Tear down SCCP conn from CN under normal conditions
......................................................................
hnbgw: Tear down SCCP conn from CN under normal conditions
Specs mention that under normal conditions the CN is the one expected to
tear down the SCCP underlaying connection upon recieving
Iu-ReleaseComplete.
Change-Id: I920cabcb63ca352db0ed06e4c35dade52bae5399
---
M hnbgw/ConnHdlr.ttcn
M library/SCCP_Templates.ttcn
2 files changed, 19 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/38597/1
diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn
index 1b053d0..13c8d4c 100644
--- a/hnbgw/ConnHdlr.ttcn
+++ b/hnbgw/ConnHdlr.ttcn
@@ -72,6 +72,7 @@
import from L3_Common all;
import from SCCPasp_Types all;
+import from SCCP_Templates all;
/***********************************************************************
* code running inside per-UE ConnHdlr
@@ -444,19 +445,6 @@
/* expect to receive it on the Iu side */
rx := f_bssap_expect(exp_rx);
-
- /* expect disconnect on the Iu side */
- T.start;
- alt {
- [] BSSAP.receive(tr_MSC_CONN_PRIM_DISC_IND) {
- setverdict(pass);
- }
- [] T.timeout {
- setverdict(fail, "Timeout waiting for Iu disconnect");
- return rx;
- }
-
- }
return rx;
}
@@ -545,13 +533,13 @@
/* HNB <- CN: Iu-ReleaseCmd, HNB -> CN: Iu-ReleaseCompl */
function f_cn_iu_release_procedure(boolean mgcp_teardown := false, boolean pfcp_teardown
:= false) runs on ConnHdlr {
var RANAP_PDU tx;
- timer T := 5.0;
+ timer T;
tx := valueof(ts_RANAP_IuReleaseCommand(g_pars.rab_rel_cause));
f_iu2iuh(tx);
if (mgcp_teardown) {
- T.start;
+ T.start(5.0);
alt {
[] as_mgcp_dlcx() {}
[] T.timeout {
@@ -570,6 +558,21 @@
tx := valueof(ts_RANAP_IuReleaseComplete());
f_iuh2iu_disconnect(tx, RUA_IEs.Cause:{radioNetwork:=normal});
+
+ /* Once CN receives Iu-ReleaseComplete, it tears down the SCCP conn under Iu: */
+ BSSAP.send(ts_MSC_CONN_PRIM_DISC_REQ(sccp_par_reason_end_user_originated));
+ /* There's no signalling from lower layers regarding when RLC is
+ * received, hence only make sure the IUT is not sending an RLSD on its own
+ * after a timeout, which would mean it didn't process our RLSD */
+ T.start(2.0);
+ alt {
+ [] BSSAP.receive(tr_MSC_CONN_PRIM_DISC_IND) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Rx Unexpected RLSD to our
RLSD");
+ }
+ [] T.timeout {
+ setverdict(pass);
+ }
+ }
}
/* Reply to a received CRCX with an OK (or the reply configured in cpars), using the
given parameters.
diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn
index 40a6156..f36dc5a 100644
--- a/library/SCCP_Templates.ttcn
+++ b/library/SCCP_Templates.ttcn
@@ -15,6 +15,7 @@
import from SCCPasp_Types all;
import from SCCP_Emulation all;
+const integer sccp_par_reason_end_user_originated := 0; /* End user originated */
const integer sccp_par_reason_end_user_failure := 2; /* End user failure */
/* construct a SCCP_PAR_Address with just SSN and no PC or GT */
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38597?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I920cabcb63ca352db0ed06e4c35dade52bae5399
Gerrit-Change-Number: 38597
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>