lynxis lazus submitted this change.
8 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
SGSN: BSSGP_ConnHdlr: f_gmm_attach(): allow the SGSN to request the IMEI
The IMEI might be requested when the GMM Attach happen.
Change-Id: Id49c9e6ef7517a6a831315ac1f9915c50b88beb6
---
M sgsn/BSSGP_ConnHdlr.ttcn
1 file changed, 31 insertions(+), 21 deletions(-)
diff --git a/sgsn/BSSGP_ConnHdlr.ttcn b/sgsn/BSSGP_ConnHdlr.ttcn
index c5501aa..40cb6b6 100644
--- a/sgsn/BSSGP_ConnHdlr.ttcn
+++ b/sgsn/BSSGP_ConnHdlr.ttcn
@@ -237,18 +237,8 @@
}
}
-altstep as_mm_identity(integer ran_index := 0) runs on BSSGP_ConnHdlr {
+altstep as_mm_identity_imei(integer ran_index := 0) runs on BSSGP_ConnHdlr {
var MobileIdentityLV mi;
- [is_gb(ran_index)] BSSGP[ran_index].receive(tr_GMM_ID_REQ('001'B)) {
- mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
- f_send_l3(ts_GMM_ID_RESP(mi), ran_index);
- repeat;
- }
- [is_iu(ran_index)] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_ID_REQ('001'B))) {
- mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
- f_send_l3(ts_GMM_ID_RESP(mi), ran_index);
- repeat;
- }
[is_gb(ran_index)] BSSGP[ran_index].receive(tr_GMM_ID_REQ('010'B)) {
mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
f_send_l3(ts_GMM_ID_RESP(mi), ran_index);
@@ -261,18 +251,33 @@
}
}
+altstep as_mm_identity_imsi(integer ran_index := 0) runs on BSSGP_ConnHdlr {
+ var MobileIdentityLV mi;
+ [is_gb(ran_index)] BSSGP[ran_index].receive(tr_GMM_ID_REQ('001'B)) {
+ mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+ f_send_l3(ts_GMM_ID_RESP(mi), ran_index);
+ repeat;
+ }
+ [is_iu(ran_index)] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_ID_REQ('001'B))) {
+ mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+ f_send_l3(ts_GMM_ID_RESP(mi), ran_index);
+ repeat;
+ }
+}
+
+altstep as_mm_identity(integer ran_index := 0) runs on BSSGP_ConnHdlr {
+ [] as_mm_identity_imsi(ran_index);
+ [] as_mm_identity_imei(ran_index);
+}
+
/* receive a L3 (GMM/SM) message over whatever is the appropriate lower-layer bearer */
-function f_receive_l3(template PDU_L3_SGSN_MS rx_tpl := ?, integer ran_index := 0)
-runs on BSSGP_ConnHdlr return PDU_L3_SGSN_MS {
+altstep as_receive_l3(template PDU_L3_SGSN_MS rx_tpl, inout PDU_L3_SGSN_MS l3_mt, integer ran_index := 0)
+runs on BSSGP_ConnHdlr {
var PDU_DTAP_PS_MT mt;
- var PDU_L3_SGSN_MS l3_mt;
- alt {
[is_gb(ran_index)] BSSGP[ran_index].receive(rx_tpl) -> value l3_mt { }
[is_iu(ran_index)] BSSAP.receive(tr_PDU_DTAP_PS_MT(rx_tpl)) -> value mt {
l3_mt := mt.dtap;
- }
}
- return l3_mt;
}
/* (copied from msc/BSC_ConnectionHandler.ttcn) */
@@ -423,7 +428,7 @@
var template PDU_L3_SGSN_MS auth_ciph_req := tr_GMM_AUTH_REQ(g_pars.vec.rand);
auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN := autn;
- l3_mt := f_receive_l3(auth_ciph_req, ran_index);
+ as_receive_l3(auth_ciph_req, l3_mt, ran_index);
var BIT4 ac_ref := l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.acReferenceNumber.valueField;
var template (value) PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref, g_pars.vec.sres);
@@ -550,7 +555,8 @@
}
function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres, integer ran_index := 0,
- template (omit) RoutingAreaIdentificationV old_ra := omit) runs on BSSGP_ConnHdlr {
+ template (omit) RoutingAreaIdentificationV old_ra := omit,
+ boolean allow_id_imei_req := false) runs on BSSGP_ConnHdlr {
var RoutingAreaIdentificationV old_ra_val;
var template (value) PDU_L3_MS_SGSN attach_req;
var PDU_L3_SGSN_MS l3_mt;
@@ -574,8 +580,12 @@
/* Expect SGSN to perform LU with HLR */
as_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, ran_index);
+ alt {
+ [allow_id_imei_req] as_mm_identity_imei(ran_index) { repeat; }
+ [] as_receive_l3(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?), l3_mt, ran_index) {
+ 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 change 38398. To unsubscribe, or for help writing mail filters, visit settings.