Change in osmo-ttcn3-hacks[master]: gbproxy: Check SGSN-orignated BVC RESET if BSS BVC is gone

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

daniel gerrit-no-reply at lists.osmocom.org
Fri Sep 24 13:08:28 UTC 2021


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


Change subject: gbproxy: Check SGSN-orignated BVC RESET if BSS BVC is gone
......................................................................

gbproxy: Check SGSN-orignated BVC RESET if BSS BVC is gone

IF the BSS-BVC is gone gbproxy blocks the BVC towards the SGSN (this is
the only thing it can do since there is no BVC-REMOVE). If the SGSN ever
decides to reset that BVC the gbproxy should not ACK it, but instead
consider the BVCI unknown.

Change-Id: Ic57b39a77adf71abda99ef8af7da1592e2225a0d
Related: SYS#5628, OS#5236
---
M gbproxy/GBProxy_Tests.ttcn
M library/BSSGP_Emulation.ttcnpp
2 files changed, 40 insertions(+), 2 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 035a47d..fa1e956 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -1158,6 +1158,21 @@
 	setverdict(pass);
 }
 
+private function f_disable_ns_pcu(integer pcu_idx) runs on test_CT
+{
+	var integer i;
+
+	connect(self:NS_CTRL, g_pcu[pcu_idx].vc_NS:NS_CTRL);
+	for (i := 0; i < lengthof(mp_nsconfig_pcu[pcu_idx].nsvc); i := i + 1) {
+		var uint16_t nsvci := mp_nsconfig_pcu[pcu_idx].nsvc[i].nsvci;
+		var NsDisableVcRequest tx_disar;
+		tx_disar.nsvci := nsvci;
+		log(tx_disar);
+		NS_CTRL.send(tx_disar);
+	}
+	disconnect(self:NS_CTRL, g_pcu[pcu_idx].vc_NS:NS_CTRL);
+}
+
 testcase TC_ul_unitdata_pool_failure() runs on test_CT
 {
 	var integer i;
@@ -2708,11 +2723,32 @@
 	setverdict(pass);
 }
 /* Send a BVC-RESET for a PTP BVC from the SGSN side: expect it to propagate */
-testcase TC_bvc_reset_ptp_from_sgsn() runs on test_CT
+testcase TC_bvc_reset_ptp_from_sgsn() runs on GlobalTest_CT
 {
 	f_init();
+	f_global_init();
 	f_sleep(3.0);
 	f_reset_ptp_bvc_from_sgsn(0, 0);
+	/* Make sure NS for BVC is down and try again */
+	log("Disabling BSS NSE");
+	f_disable_ns_pcu(0);
+	f_sleep(10.0);
+	var BssgpBvcConfig bvc_cfg := g_pcu[0].cfg.bvc[0];
+	SGSN_MGMT.send(BssgpResetRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to f_get_sgsn_bvc_ct(0, bvc_cfg.bvci);
+
+	/* Check for NS-STATUS with BVCI unknown, ignore other messages */
+	var template (present) PDU_BSSGP exp_rx :=
+		tr_BSSGP_STATUS(bvc_cfg.bvci, BSSGP_CAUSE_BVCI_UNKNOWN, ?);
+
+	alt {
+	[] G_SGSN[0].receive(exp_rx) {
+		setverdict(pass);
+		}
+	[] G_SGSN[0].receive {
+		repeat;
+	}
+	}
+
 	f_cleanup();
 }
 
diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index 593abd8..8d27fd1 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -323,7 +323,9 @@
 
 	/* Messages with BVCI = 0 (Signaling) in BVCI field of NS */
 	[] BSCP.receive(f_BnsUdInd(tr_GLOBAL_SIG, 0)) -> value udi {
-		GLOBAL.send(udi.bssgp);
+		if (GLOBAL.checkstate("Connected")) {
+			GLOBAL.send(udi.bssgp);
+		}
 		}
 	[] BSCP.receive(f_BnsUdInd(tr_RIM, 0)) -> value udi {
 		if (RIM.checkstate("Connected")) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25575
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: Ic57b39a77adf71abda99ef8af7da1592e2225a0d
Gerrit-Change-Number: 25575
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210924/7480ca2d/attachment.htm>


More information about the gerrit-log mailing list