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.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21337 )
Change subject: BSSGP_Emulation: Fix inbound BVC-RESET
......................................................................
BSSGP_Emulation: Fix inbound BVC-RESET
We cannot handle this in as_ptp_allstate(), as the respective clauses
are never hit: In as_ptp_unblocked() we broadcast all BSSGP messages
without a TLLI, "hiding" the BVC-RESET handling.
Change-Id: Ie3e7a997554e6af42ae7e7294829b6f8d2447d60
---
M library/BSSGP_Emulation.ttcnpp
1 file changed, 24 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/21337/1
diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index 2a87b35..c430f87 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -994,6 +994,8 @@
f_ptp_change_state(BVC_S_UNBLOCKED);
}
+ [] as_ptp_handle_inbound_reset();
+
[] g_T2.timeout {
/* BVC-RESET-ACK PDU was not received within T2: retransmit */
f_ptp_sendReset(g_last_reset_cause);
@@ -1041,6 +1043,8 @@
f_ptp_sendBlock(g_last_block_cause);
}
+ [] as_ptp_handle_inbound_reset();
+
/* simply acknowledge all per-BVC Flow Control Messages */
[g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_FC_BVC, g_cfg.bvci)) -> value udi {
var OCT1 tag := udi.bssgp.pDU_BSSGP_FLOW_CONTROL_BVC.tag.unstructured_Value;
@@ -1148,6 +1152,26 @@
}
}
+private altstep as_ptp_handle_inbound_reset() runs on BSSGP_BVC_CT {
+ var NsUnitdataIndication udi;
+ /* we are a SGSN: BSS/PCU-originated RESET must have a cell ID */
+ [g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, g_cfg.cell_id), 0)) -> value udi {
+ log("Rx BVC-RESET from BVCI=", g_cfg.bvci);
+ /* Respond to RESET with correct BVCI but without CellID */
+ BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, omit), 0, g_bvc_lsp));
+ /* FIXME: reset all state? What about clients? */
+ f_ptp_change_state(BVC_S_UNBLOCKED);
+ }
+ /* we are a BSS/PCU: SGSN-originated RESET must not have a cell ID */
+ [not g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, omit), 0)) -> value udi {
+ log("Rx BVC-RESET from BVCI=", g_cfg.bvci);
+ /* Respond to RESET with correct BVCI with CellID */
+ BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, g_cfg.cell_id), 0, g_bvc_lsp));
+ /* FIXME: reset all state? What about clients? */
+ f_ptp_change_state(BVC_S_UNBLOCKED);
+ }
+}
+
/* Events permitted in all states */
private altstep as_ptp_allstate() runs on BSSGP_BVC_CT {
var NsUnitdataIndication udi;
@@ -1171,23 +1195,6 @@
}
}
- /* we are a SGSN: BSS/PCU-originated RESET must have a cell ID */
- [g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, g_cfg.cell_id), 0)) -> value udi {
- log("Rx BVC-RESET from BVCI=", g_cfg.bvci);
- /* Respond to RESET with correct BVCI but without CellID */
- BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, omit), 0, g_bvc_lsp));
- /* FIXME: reset all state? What about clients? */
- f_ptp_change_state(BVC_S_UNBLOCKED);
- }
- /* we are a BSS/PCU: SGSN-originated RESET must not have a cell ID */
- [not g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, omit), 0)) -> value udi {
- log("Rx BVC-RESET from BVCI=", g_cfg.bvci);
- /* Respond to RESET with correct BVCI with CellID */
- BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, g_cfg.cell_id), 0, g_bvc_lsp));
- /* FIXME: reset all state? What about clients? */
- f_ptp_change_state(BVC_S_UNBLOCKED);
- }
-
/* Ignore those for now */
[] BVC.receive(ASP_Event:?) { }
[] BVC.receive(BssgpStatusIndication:?) { }
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21337
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: Ie3e7a997554e6af42ae7e7294829b6f8d2447d60
Gerrit-Change-Number: 21337
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/20201125/fdc466a0/attachment.htm>