Change in osmo-ttcn3-hacks[master]: sgsn: Fix f_process_attach_accept on ran_index != 0

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.org
Sat Feb 13 08:15:32 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22884 )

Change subject: sgsn: Fix f_process_attach_accept on ran_index != 0
......................................................................

sgsn: Fix f_process_attach_accept on ran_index != 0

Change-Id: I7d859fd710dba96eb9b46c428243281183e1be12
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 4c0a8ab..4e35144 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -765,12 +765,12 @@
 	}
 }
 
-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 @@
 			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 @@
 			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 @@
 	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);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22884
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: I7d859fd710dba96eb9b46c428243281183e1be12
Gerrit-Change-Number: 22884
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210213/022adb36/attachment.htm>


More information about the gerrit-log mailing list