diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index c6e22ccc6..b79aae40b 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -768,7 +768,9 @@ function f_upd_ptmsi_and_tlli(OCT4 p_tmsi, integer ran_index := 0) runs on BSSGP function f_process_attach_accept(PDU_GMM_AttachAccept aa, integer ran_index := 0) runs on BSSGP_ConnHdlr { /* mandatory IE */ var hexstring aa_plmn := f_RAI_to_plmn_hexstr(aa.routingAreaIdentification); - if (not (g_pars.bssgp_cell_id[ran_index].ra_id.lai.mcc_mnc == aa_plmn)) { + /* we cannot use ran_index here, as it would overflow the cell_id object, since ran_idx > NUM_GB + * indicates an Iu RAN connection. All cells are expected to run the same MCC/MNC anyway... */ + if (not (g_pars.bssgp_cell_id[0].ra_id.lai.mcc_mnc == aa_plmn)) { setverdict(fail, "mismatching PLMN in Attach Accept: " & hex2str(aa_plmn) & "; expected " & hex2str(g_pars.bssgp_cell_id[ran_index].ra_id.lai.mcc_mnc)); mtc.stop;