<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21337">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BSSGP_Emulation: Fix inbound BVC-RESET<br><br>We cannot handle this in as_ptp_allstate(), as the respective clauses<br>are never hit:  In as_ptp_unblocked() we broadcast all BSSGP messages<br>without a TLLI, "hiding" the BVC-RESET handling.<br><br>Change-Id: Ie3e7a997554e6af42ae7e7294829b6f8d2447d60<br>---<br>M library/BSSGP_Emulation.ttcnpp<br>1 file changed, 24 insertions(+), 17 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp</span><br><span>index 2a87b35..c430f87 100644</span><br><span>--- a/library/BSSGP_Emulation.ttcnpp</span><br><span>+++ b/library/BSSGP_Emulation.ttcnpp</span><br><span>@@ -994,6 +994,8 @@</span><br><span>             f_ptp_change_state(BVC_S_UNBLOCKED);</span><br><span>         }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ [] as_ptp_handle_inbound_reset();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  [] g_T2.timeout {</span><br><span>            /* BVC-RESET-ACK PDU was not received within T2: retransmit */</span><br><span>               f_ptp_sendReset(g_last_reset_cause);</span><br><span>@@ -1041,6 +1043,8 @@</span><br><span>                 f_ptp_sendBlock(g_last_block_cause);</span><br><span>         }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ [] as_ptp_handle_inbound_reset();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* simply acknowledge all per-BVC Flow Control Messages */</span><br><span>   [g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_FC_BVC, g_cfg.bvci)) -> value udi {</span><br><span>              var OCT1 tag := udi.bssgp.pDU_BSSGP_FLOW_CONTROL_BVC.tag.unstructured_Value;</span><br><span>@@ -1148,6 +1152,26 @@</span><br><span>                }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+private altstep as_ptp_handle_inbound_reset() runs on BSSGP_BVC_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+      var NsUnitdataIndication udi;</span><br><span style="color: hsl(120, 100%, 40%);">+ /* we are a SGSN: BSS/PCU-originated RESET must have a cell ID */</span><br><span style="color: hsl(120, 100%, 40%);">+     [g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, g_cfg.cell_id), 0)) -> value udi {</span><br><span style="color: hsl(120, 100%, 40%);">+           log("Rx BVC-RESET from BVCI=", g_cfg.bvci);</span><br><span style="color: hsl(120, 100%, 40%);">+         /* Respond to RESET with correct BVCI but without CellID */</span><br><span style="color: hsl(120, 100%, 40%);">+           BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, omit), 0, g_bvc_lsp));</span><br><span style="color: hsl(120, 100%, 40%);">+          /* FIXME: reset all state? What about clients? */</span><br><span style="color: hsl(120, 100%, 40%);">+             f_ptp_change_state(BVC_S_UNBLOCKED);</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+     /* we are a BSS/PCU: SGSN-originated RESET must not have a cell ID */</span><br><span style="color: hsl(120, 100%, 40%);">+ [not g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, omit), 0)) -> value udi {</span><br><span style="color: hsl(120, 100%, 40%);">+                log("Rx BVC-RESET from BVCI=", g_cfg.bvci);</span><br><span style="color: hsl(120, 100%, 40%);">+         /* Respond to RESET with correct BVCI with CellID */</span><br><span style="color: hsl(120, 100%, 40%);">+          BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, g_cfg.cell_id), 0, g_bvc_lsp));</span><br><span style="color: hsl(120, 100%, 40%);">+         /* FIXME: reset all state? What about clients? */</span><br><span style="color: hsl(120, 100%, 40%);">+             f_ptp_change_state(BVC_S_UNBLOCKED);</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Events permitted in all states */</span><br><span> private altstep as_ptp_allstate() runs on BSSGP_BVC_CT {</span><br><span>   var NsUnitdataIndication udi;</span><br><span>@@ -1171,23 +1195,6 @@</span><br><span>               }</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   /* we are a SGSN: BSS/PCU-originated RESET must have a cell ID */</span><br><span style="color: hsl(0, 100%, 40%);">-       [g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, g_cfg.cell_id), 0)) -> value udi {</span><br><span style="color: hsl(0, 100%, 40%);">-             log("Rx BVC-RESET from BVCI=", g_cfg.bvci);</span><br><span style="color: hsl(0, 100%, 40%);">-           /* Respond to RESET with correct BVCI but without CellID */</span><br><span style="color: hsl(0, 100%, 40%);">-             BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, omit), 0, g_bvc_lsp));</span><br><span style="color: hsl(0, 100%, 40%);">-            /* FIXME: reset all state? What about clients? */</span><br><span style="color: hsl(0, 100%, 40%);">-               f_ptp_change_state(BVC_S_UNBLOCKED);</span><br><span style="color: hsl(0, 100%, 40%);">-    }</span><br><span style="color: hsl(0, 100%, 40%);">-       /* we are a BSS/PCU: SGSN-originated RESET must not have a cell ID */</span><br><span style="color: hsl(0, 100%, 40%);">-   [not g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_RESET(?, g_cfg.bvci, omit), 0)) -> value udi {</span><br><span style="color: hsl(0, 100%, 40%);">-          log("Rx BVC-RESET from BVCI=", g_cfg.bvci);</span><br><span style="color: hsl(0, 100%, 40%);">-           /* Respond to RESET with correct BVCI with CellID */</span><br><span style="color: hsl(0, 100%, 40%);">-            BVC.send(ts_ptp_BnsUdReq(ts_BVC_RESET_ACK(g_cfg.bvci, g_cfg.cell_id), 0, g_bvc_lsp));</span><br><span style="color: hsl(0, 100%, 40%);">-           /* FIXME: reset all state? What about clients? */</span><br><span style="color: hsl(0, 100%, 40%);">-               f_ptp_change_state(BVC_S_UNBLOCKED);</span><br><span style="color: hsl(0, 100%, 40%);">-    }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>    /* Ignore those for now */</span><br><span>   [] BVC.receive(ASP_Event:?) { }</span><br><span>      [] BVC.receive(BssgpStatusIndication:?) { }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21337">change 21337</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21337"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie3e7a997554e6af42ae7e7294829b6f8d2447d60 </div>
<div style="display:none"> Gerrit-Change-Number: 21337 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>