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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sgsn: Fix regression regarding g_pars.bssgp.cell_id[] array overflow<br><br>This was introduced in I7d859fd710dba96eb9b46c428243281183e1be12<br>and caused Iu related TTCN3 tests to fail with:<br><br>SGSN_Tests.ttcn:771 Dynamic test case error: Index overflow in a value of type @SGSN_Tests.BssgpCellIds: The index is 3, but the value has only 3 elements.<br><br>Change-Id: Iaae0015f5e7c7eabc426add91b5de1b63bf6d9f6<br>---<br>M sgsn/SGSN_Tests.ttcn<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn</span><br><span>index c6e22cc..b79aae4 100644</span><br><span>--- a/sgsn/SGSN_Tests.ttcn</span><br><span>+++ b/sgsn/SGSN_Tests.ttcn</span><br><span>@@ -768,7 +768,9 @@</span><br><span> function f_process_attach_accept(PDU_GMM_AttachAccept aa, integer ran_index := 0) runs on BSSGP_ConnHdlr {</span><br><span>      /* mandatory IE */</span><br><span>   var hexstring aa_plmn := f_RAI_to_plmn_hexstr(aa.routingAreaIdentification);</span><br><span style="color: hsl(0, 100%, 40%);">-    if (not (g_pars.bssgp_cell_id[ran_index].ra_id.lai.mcc_mnc == aa_plmn)) {</span><br><span style="color: hsl(120, 100%, 40%);">+     /* we cannot use ran_index here, as it would overflow the cell_id object, since ran_idx > NUM_GB</span><br><span style="color: hsl(120, 100%, 40%);">+    * indicates an Iu RAN connection.  All cells are expected to run the same MCC/MNC anyway... */</span><br><span style="color: hsl(120, 100%, 40%);">+       if (not (g_pars.bssgp_cell_id[0].ra_id.lai.mcc_mnc == aa_plmn)) {</span><br><span>              setverdict(fail, "mismatching PLMN in Attach Accept: " & hex2str(aa_plmn)</span><br><span>                               & "; expected " & hex2str(g_pars.bssgp_cell_id[ran_index].ra_id.lai.mcc_mnc));</span><br><span>            mtc.stop;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22937">change 22937</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/+/22937"/><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: Iaae0015f5e7c7eabc426add91b5de1b63bf6d9f6 </div>
<div style="display:none"> Gerrit-Change-Number: 22937 </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-Assignee: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>