From d792b9e122c8342fa0ce792df0f0a9924925ac82 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 12 Feb 2021 19:49:59 +0100 Subject: sgsn: Fix f_process_attach_accept on ran_index != 0 Change-Id: I7d859fd710dba96eb9b46c428243281183e1be12 --- sgsn/SGSN_Tests.ttcn | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 4c0a8abc..4e351445 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -765,12 +765,12 @@ 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) runs on BSSGP_ConnHdlr { +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[0].ra_id.lai.mcc_mnc == aa_plmn)) { + if (not (g_pars.bssgp_cell_id[ran_index].ra_id.lai.mcc_mnc == aa_plmn)) { setverdict(fail, "mismatching PLMN in Attach Accept: " & hex2str(aa_plmn) - & "; expected " & hex2str(g_pars.bssgp_cell_id[0].ra_id.lai.mcc_mnc)); + & "; expected " & hex2str(g_pars.bssgp_cell_id[ran_index].ra_id.lai.mcc_mnc)); mtc.stop; } g_pars.ra := aa.routingAreaIdentification; @@ -779,7 +779,8 @@ function f_process_attach_accept(PDU_GMM_AttachAccept aa) runs on BSSGP_ConnHdlr setverdict(fail, "unexpected P-TMSI allocation"); mtc.stop; } - f_upd_ptmsi_and_tlli(aa.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets); + f_upd_ptmsi_and_tlli(aa.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets, + ran_index); } if (ispresent(aa.msIdentity)) { setverdict(fail, "unexpected TMSI allocation in non-combined attach"); @@ -802,7 +803,8 @@ function f_process_rau_accept(PDU_GMM_RoutingAreaUpdateAccept ra, integer ran_in setverdict(fail, "unexpected P-TMSI allocation"); mtc.stop; } - f_upd_ptmsi_and_tlli(ra.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets, ran_index); + f_upd_ptmsi_and_tlli(ra.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets, + ran_index); } if (ispresent(ra.msIdentity)) { setverdict(fail, "unexpected TMSI allocation in non-combined attach"); @@ -860,7 +862,7 @@ friend function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres, f_gmm_gsup_lu_isd(); l3_mt := f_receive_l3(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?), ran_index); - f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept, ran_index); /* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */ f_send_l3(ts_GMM_ATTACH_COMPL, ran_index); -- cgit v1.2.3