Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Only add CellId to BVC-RESET[-ACK] conditionally

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

laforge gerrit-no-reply at lists.osmocom.org
Sun Oct 4 21:43:56 UTC 2020


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


Change subject: BSSGP_Emulation: Only add CellId to BVC-RESET[-ACK] conditionally
......................................................................

BSSGP_Emulation: Only add CellId to BVC-RESET[-ACK] conditionally

We always used to include the CellID IE, but 3GPP TS 48.018 is
actually quite specific about when it should be present and when not.

Change-Id: Iffd023f0272c9ccb087bdd225fcfb08424a46bdf
---
M library/BSSGP_Emulation.ttcnpp
1 file changed, 25 insertions(+), 5 deletions(-)



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

diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index 185fd82..931ff37 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -236,8 +236,17 @@
 	}
 }
 
-private function f_sendReset() runs on BSSGP_CT {
-	var PDU_BSSGP pdu := valueof(ts_BVC_RESET(BSSGP_CAUSE_OM_INTERVENTION, g_cfg.bvci, g_cfg.cell_id));
+private function f_sendReset(BssgpBvci bvci) runs on BSSGP_CT {
+	var PDU_BSSGP pdu;
+
+	/* The Cell Identifier IE is mandatory in the BVC-RESET PDU sent from BSS to
+	 * SGSN in order to reset a BVC corresponding to a PTP functional entity. The
+	 * Cell Identifier IE shall not be used in any other BVC-RESET PDU. */
+	if (g_cfg.sgsn_role) {
+		pdu := valueof(ts_BVC_RESET(BSSGP_CAUSE_OM_INTERVENTION, bvci, omit));
+	} else {
+		pdu := valueof(ts_BVC_RESET(BSSGP_CAUSE_OM_INTERVENTION, bvci, g_cfg.cell_id));
+	}
 	log("PDU: ", pdu);
 	log("ENC: ", enc_PDU_BSSGP(pdu));
 
@@ -435,6 +444,17 @@
 	mtc.stop;
 }
 
+private function f_send_bvc_reset_ack(BssgpBvci bvci) runs on BSSGP_CT {
+	/* The Cell Identifier IE is mandatory in the BVC-RESET-ACK PDU sent from BSS to
+	 * SGSN in response to reset a BVC corresponding to a PTP functional entity. The Cell
+	 * Identifier IE shall not be used in any other BVC-RESET-ACK PDU */
+	if (g_cfg.sgsn_role) {
+		BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(bvci, omit), 0));
+	} else {
+		BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(bvci, g_cfg.cell_id), 0));
+	}
+}
+
 altstep as_allstate() runs on BSSGP_CT {
 	var BSSGP_Client_CT vc_conn;
 	var NsUnitdataIndication udi;
@@ -453,14 +473,14 @@
 	/* Respond to RESET with correct BVCI/CellID */
 	[] BSCP.receive(f_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, g_cfg.cell_id), 0)) -> value udi {
 		log("Rx BVC-RESET for Our BVCI=", g_cfg.bvci);
-		BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, g_cfg.cell_id), 0));
+		f_send_bvc_reset_ack(g_cfg.bvci);
 		f_change_state(BVC_S_UNBLOCKED);
 	}
 
 	/* Respond to RESET for signalling BVCI 0 */
 	[] BSCP.receive(f_BnsUdInd(tr_BVC_RESET(?, 0, g_cfg.cell_id), 0)) -> value udi {
 		log("Rx BVC-RESET for Signaling BVCI=0");
-		BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(0, g_cfg.cell_id), 0));
+		f_send_bvc_reset_ack(0);
 	}
 
 	/* Respond to RESET with wrong NSEI/NSVCI */
@@ -486,7 +506,7 @@
 		/* if we just became NS-unblocked, send a BCC-RESET */
 		if (nsi.old_state != NSE_S_ALIVE_UNBLOCKED and nsi.new_state == NSE_S_ALIVE_UNBLOCKED) {
 			if (g_cfg.sgsn_role == false) {
-				f_sendReset();
+				f_sendReset(g_cfg.bvci);
 			}
 			/* Idea: We could send BVC-UNBLOCK here like some SGSN do */
 		}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20450
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: Iffd023f0272c9ccb087bdd225fcfb08424a46bdf
Gerrit-Change-Number: 20450
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201004/e951ea1f/attachment.htm>


More information about the gerrit-log mailing list