aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2018-12-14 17:37:38 +0100
committerOliver Smith <osmith@sysmocom.de>2019-01-09 15:45:53 +0100
commitf66fea1aaf5165a0140d9d3f8af080431ded21d7 (patch)
treef0180663b0af047fa56c548131123f1c2a59d335
parent5598aaef23dc42d4f9c1af831c92b939a36961d5 (diff)
VLR: send CHECK-IMEI to EIR/HLRosmith/send-imei-to-hlr
When check-imei-req is enabled in the VTY config, do not accept IMEIs sent by the ME directly anymore. Send the IMEI to the EIR/HLR and wait for its ACK or NACK. OsmoHLR also accepts all IMEIs at this point, but this allows to optionally store the IMEI in the HLR DB. Depends: Ib240474b0c3c603ba840cf26babb38a44dfc9364 (osmo-hlr) Related: OS#3733 Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7
-rw-r--r--include/osmocom/msc/vlr.h2
-rw-r--r--src/libvlr/vlr.c65
-rw-r--r--src/libvlr/vlr_core.h1
-rw-r--r--src/libvlr/vlr_lu_fsm.c14
-rw-r--r--tests/msc_vlr/msc_vlr_test_gsm_authen.c14
-rw-r--r--tests/msc_vlr/msc_vlr_test_gsm_authen.err40
-rw-r--r--tests/msc_vlr/msc_vlr_test_gsm_ciph.c14
-rw-r--r--tests/msc_vlr/msc_vlr_test_gsm_ciph.err40
-rw-r--r--tests/msc_vlr/msc_vlr_test_no_authen.c28
-rw-r--r--tests/msc_vlr/msc_vlr_test_no_authen.err80
10 files changed, 245 insertions, 53 deletions
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index b328b70..83c8e1b 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -65,6 +65,8 @@ enum vlr_lu_event {
VLR_ULA_E_ID_IMSI, /* IMSI recieved from MS */
VLR_ULA_E_ID_IMEI, /* IMEI received from MS */
VLR_ULA_E_ID_IMEISV, /* IMEISV received from MS */
+ VLR_ULA_E_HLR_IMEI_ACK, /* Check_IMEI_VLR result from HLR */
+ VLR_ULA_E_HLR_IMEI_NACK,/* Check_IMEI_VLR result from HLR */
VLR_ULA_E_HLR_LU_RES, /* HLR UpdateLocation result */
VLR_ULA_E_UPD_HLR_COMPL,/* UpdatE_HLR_VLR result */
VLR_ULA_E_LU_COMPL_SUCCESS,/* Location_Update_Completion_VLR result */
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index b0e7f79..46349dc 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -642,6 +642,32 @@ int vlr_subscr_req_sai(struct vlr_subscr *vsub,
return vlr_subscr_tx_gsup_message(vsub, &gsup_msg);
}
+/* Initiate Check_IMEI_VLR Procedure (23.018 Chapter 7.1.2.9).
+ * Send the IMEI and wait for ACK. Usually the EIR receives and answers this and checks the device
+ * against a white/grey/blacklist. As of writing, there is no EIR in the Osmocom stack, but HLR
+ * handles the request instead and always replies with ACK. It is theoretically able to save the
+ * IMEI to the HLR DB as side effect (OS#2541). */
+int vlr_subscr_tx_req_check_imei(const struct vlr_subscr *vsub)
+{
+ struct osmo_gsup_message gsup_msg = {0};
+ uint8_t imei_enc[GSM23003_IMEI_NUM_DIGITS+2] = {0};
+ int len;
+
+ /* Encode IMEI */
+ len = gsm48_encode_bcd_number(imei_enc, sizeof(imei_enc), 0, vsub->imei);
+ if (len < 1) {
+ LOGVSUBP(LOGL_ERROR, vsub, "Error: cannot encode IMEI '%s'\n", vsub->imei);
+ return -ENOSPC;
+ }
+ gsup_msg.imei_enc = imei_enc;
+ gsup_msg.imei_enc_len = len;
+
+ /* Send CHECK_IMEI_REQUEST */
+ gsup_msg.message_type = OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST;
+ OSMO_STRLCPY_ARRAY(gsup_msg.imsi, vsub->imsi);
+ return vlr_tx_gsup_message(vsub->vlr, &gsup_msg);
+}
+
/* Tell HLR that authentication failure occurred */
int vlr_subscr_tx_auth_fail_rep(const struct vlr_subscr *vsub)
{
@@ -976,6 +1002,39 @@ static int vlr_subscr_handle_cancel_req(struct vlr_subscr *vsub,
return rc;
}
+/* Handle Check_IMEI_VLR error from HLR */
+static int vlr_subscr_handle_check_imei_err(struct vlr_subscr *vsub,
+ const struct osmo_gsup_message *gsup)
+{
+ if (!vsub->lu_fsm) {
+ LOGVSUBP(LOGL_ERROR, vsub, "Rx GSUP Check_IMEI_VLR error without LU in progress\n");
+ return -ENODEV;
+ }
+
+ LOGVSUBP(LOGL_DEBUG, vsub, "Check_IMEI_VLR failed; gmm_cause: %s\n",
+ get_value_string(gsm48_gmm_cause_names, gsup->cause));
+
+ osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_LU_COMPL_FAILURE, (void *)&gsup->cause);
+ return 0;
+}
+
+/* Handle Check_IMEI_VLR result from HLR */
+static int vlr_subscr_handle_check_imei_res(struct vlr_subscr *vsub,
+ const struct osmo_gsup_message *gsup)
+{
+ if (!vsub->lu_fsm) {
+ LOGVSUBP(LOGL_ERROR, vsub, "Rx GSUP Check_IMEI_VLR result without LU in progress\n");
+ return -ENODEV;
+ }
+
+ if (gsup->imei_result == OSMO_GSUP_IMEI_RESULT_ACK)
+ osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_HLR_IMEI_ACK, (void *)&gsup->cause);
+ else
+ osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_HLR_IMEI_NACK, (void *)&gsup->cause);
+
+ return 0;
+}
+
/* Incoming handler for GSUP from HLR.
* Keep this function non-static for direct invocation by unit tests. */
int vlr_gsupc_read_cb(struct osmo_gsup_client *gsupc, struct msgb *msg)
@@ -1045,6 +1104,12 @@ int vlr_gsupc_read_cb(struct osmo_gsup_client *gsupc, struct msgb *msg)
gsup.message_type);
rc = -GMM_CAUSE_MSGT_NOTEXIST_NOTIMPL;
break;
+ case OSMO_GSUP_MSGT_CHECK_IMEI_ERROR:
+ rc = vlr_subscr_handle_check_imei_err(vsub, &gsup);
+ break;
+ case OSMO_GSUP_MSGT_CHECK_IMEI_RESULT:
+ rc = vlr_subscr_handle_check_imei_res(vsub, &gsup);
+ break;
default:
/* Forward message towards MSC */
rc = vlr->ops.forward_gsup_msg(vsub, &gsup);
diff --git a/src/libvlr/vlr_core.h b/src/libvlr/vlr_core.h
index c249dff..41b8800 100644
--- a/src/libvlr/vlr_core.h
+++ b/src/libvlr/vlr_core.h
@@ -7,5 +7,6 @@ struct osmo_gsup_message;
int vlr_subscr_req_lu(struct vlr_subscr *vsub) __attribute__((warn_unused_result));
int vlr_subscr_req_sai(struct vlr_subscr *vsub, const uint8_t *auts,
const uint8_t *auts_rand) __attribute__((warn_unused_result));
+int vlr_subscr_tx_req_check_imei(const struct vlr_subscr *vsub);
void vlr_subscr_update_tuples(struct vlr_subscr *vsub,
const struct osmo_gsup_message *gsup);
diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index b00f8ce..6791f34 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -652,6 +652,8 @@ static const struct value_string fsm_lu_event_names[] = {
OSMO_VALUE_STRING(VLR_ULA_E_ID_IMSI),
OSMO_VALUE_STRING(VLR_ULA_E_ID_IMEI),
OSMO_VALUE_STRING(VLR_ULA_E_ID_IMEISV),
+ OSMO_VALUE_STRING(VLR_ULA_E_HLR_IMEI_ACK),
+ OSMO_VALUE_STRING(VLR_ULA_E_HLR_IMEI_NACK),
OSMO_VALUE_STRING(VLR_ULA_E_HLR_LU_RES),
OSMO_VALUE_STRING(VLR_ULA_E_UPD_HLR_COMPL),
OSMO_VALUE_STRING(VLR_ULA_E_LU_COMPL_SUCCESS),
@@ -1228,9 +1230,17 @@ static void lu_fsm_wait_lu_compl(struct osmo_fsm_inst *fi, uint32_t event,
LU_COMPL_VLR_E_NEW_TMSI_ACK, NULL);
break;
case VLR_ULA_E_ID_IMEI:
+ /* Got the IMEI from ME, now send it to HLR */
+ vlr_subscr_tx_req_check_imei(lfp->vsub);
+ break;
+ case VLR_ULA_E_HLR_IMEI_ACK:
osmo_fsm_inst_dispatch(lfp->lu_compl_vlr_fsm,
LU_COMPL_VLR_E_IMEI_CHECK_ACK, NULL);
break;
+ case VLR_ULA_E_HLR_IMEI_NACK:
+ osmo_fsm_inst_dispatch(lfp->lu_compl_vlr_fsm,
+ LU_COMPL_VLR_E_IMEI_CHECK_NACK, NULL);
+ break;
case VLR_ULA_E_LU_COMPL_SUCCESS:
lu_fsm_discard_lu_compl_fsm(fi);
@@ -1361,7 +1371,9 @@ static const struct osmo_fsm_state vlr_lu_fsm_states[] = {
S(VLR_ULA_E_LU_COMPL_FAILURE) |
S(VLR_ULA_E_NEW_TMSI_ACK) |
S(VLR_ULA_E_ID_IMEI) |
- S(VLR_ULA_E_ID_IMEISV),
+ S(VLR_ULA_E_ID_IMEISV) |
+ S(VLR_ULA_E_HLR_IMEI_ACK) |
+ S(VLR_ULA_E_HLR_IMEI_NACK),
.out_state_mask = S(VLR_ULA_S_DONE),
.name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_LU_COMPL),
.action = lu_fsm_wait_lu_compl,
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
index 46dd9a1..4174fe2 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
@@ -573,9 +573,13 @@ static void test_gsm_authen_imei()
EXPECT_ACCEPTED(false);
thwart_rx_non_initial_requests();
- btw("MS replies with an Identity Response");
- expect_bssap_clear();
+ btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
+ gsup_expect_tx("30010809710000004026f050090824433224433224f0");
ms_sends_msg("0559084a32244332244302");
+
+ btw("HLR accepts the IMEI");
+ expect_bssap_clear();
+ gsup_rx("32010809710000004026f0510100", NULL);
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("LU was successful, and the conn has already been closed");
@@ -676,9 +680,13 @@ static void test_gsm_authen_tmsi_imei()
EXPECT_ACCEPTED(false);
thwart_rx_non_initial_requests();
- btw("MS replies with an Identity Response");
+ btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
+ gsup_expect_tx("30010809710000004026f050090824433224433224f0");
ms_sends_msg("0559084a32244332244302");
+ btw("HLR accepts the IMEI");
+ gsup_rx("32010809710000004026f0510100", NULL);
+
btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl");
EXPECT_CONN_COUNT(1);
VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err
index e834e91..f2462f1 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err
@@ -1234,16 +1234,26 @@ DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1
DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: SMS:0x01
-- MS replies with an Identity Response
+- MS replies with an Identity Response, VLR sends the IMEI to HLR
MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP
DREF MSISDN:46071: MSC conn use + dtap == 1 (0x2: dtap)
DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
DMM IDENTITY RESPONSE: MI(IMEI)=423423423423420
DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI
+DVLR GSUP tx: 30010809710000004026f050090824433224433224f0
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0
+DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+- HLR accepts the IMEI
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100
+DVLR GSUP rx 14: 32010809710000004026f0510100
+DREF VLR subscr MSISDN:46071 usage increases to: 2
+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK
- sending LU Accept for MSISDN:46071
-DREF VLR subscr MSISDN:46071 usage increases to: 2
+DREF VLR subscr MSISDN:46071 usage increases to: 3
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI}: state_chg to LU_COMPL_VLR_S_DONE
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)
@@ -1255,11 +1265,12 @@ DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: state_chg to RAN_CONN_S_ACCEPTED
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_ACCEPTED}: Received Event RAN_CONN_E_UNUSED
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_ACCEPTED}: state_chg to RAN_CONN_S_RELEASING
-DREF MSISDN:46071: MSC conn use + release == 2 (0x102: dtap,release)
-DREF VLR subscr MSISDN:46071 usage increases to: 3
-DREF VLR subscr MSISDN:46071 usage decreases to: 2
+DREF MSISDN:46071: MSC conn use + release == 1 (0x100: release)
+DREF VLR subscr MSISDN:46071 usage increases to: 4
+DREF VLR subscr MSISDN:46071 usage decreases to: 3
- BSSAP Clear --GERAN-A--> MS
-DREF MSISDN:46071: MSC conn use - dtap == 1 (0x100: release)
+DREF VLR subscr MSISDN:46071 usage decreases to: 2
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0
bssap_clear_sent == 1
- LU was successful, and the conn has already been closed
lu_result_sent == 1
@@ -1463,20 +1474,29 @@ DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1
DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: SMS:0x01
-- MS replies with an Identity Response
+- MS replies with an Identity Response, VLR sends the IMEI to HLR
MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP
DREF MSISDN:46071: MSC conn use + dtap == 1 (0x2: dtap)
DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
DMM IDENTITY RESPONSE: MI(IMEI)=423423423423420
DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI
+DVLR GSUP tx: 30010809710000004026f050090824433224433224f0
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0
+DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+- HLR accepts the IMEI
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100
+DVLR GSUP rx 14: 32010809710000004026f0510100
+DREF VLR subscr MSISDN:46071 usage increases to: 2
+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: lu_compl_vlr_new_tmsi()
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF
- sending LU Accept for MSISDN:46071, with TMSI 0x03020100
-DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+DREF VLR subscr MSISDN:46071 usage decreases to: 1
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0
- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl
llist_count(&net->ran_conns) == 1
lu_result_sent == 1
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
index a641ec2..b7543da 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
@@ -553,9 +553,13 @@ static void test_ciph_imei()
EXPECT_ACCEPTED(false);
thwart_rx_non_initial_requests();
- btw("MS replies with an Identity Response");
- expect_bssap_clear();
+ btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
+ gsup_expect_tx("30010809710000004026f050090824433224433224f0");
ms_sends_msg("0559084a32244332244302");
+
+ btw("HLR accepts the IMEI");
+ expect_bssap_clear();
+ gsup_rx("32010809710000004026f0510100", NULL);
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("LU was successful, and the conn has already been closed");
@@ -758,9 +762,13 @@ static void test_ciph_tmsi_imei()
EXPECT_ACCEPTED(false);
thwart_rx_non_initial_requests();
- btw("MS replies with an Identity Response");
+ btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
+ gsup_expect_tx("30010809710000004026f050090824433224433224f0");
ms_sends_msg("0559084a32244332244302");
+ btw("HLR accepts the IMEI");
+ gsup_rx("32010809710000004026f0510100", NULL);
+
btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl");
EXPECT_CONN_COUNT(1);
VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
index 69ad9a2..70663bc 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
@@ -1178,16 +1178,26 @@ DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1
DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: SMS:0x01
-- MS replies with an Identity Response
+- MS replies with an Identity Response, VLR sends the IMEI to HLR
MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP
DREF MSISDN:46071: MSC conn use + dtap == 1 (0x2: dtap)
DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
DMM IDENTITY RESPONSE: MI(IMEI)=423423423423420
DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI
+DVLR GSUP tx: 30010809710000004026f050090824433224433224f0
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0
+DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+- HLR accepts the IMEI
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100
+DVLR GSUP rx 14: 32010809710000004026f0510100
+DREF VLR subscr MSISDN:46071 usage increases to: 2
+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK
- sending LU Accept for MSISDN:46071
-DREF VLR subscr MSISDN:46071 usage increases to: 2
+DREF VLR subscr MSISDN:46071 usage increases to: 3
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI}: state_chg to LU_COMPL_VLR_S_DONE
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)
@@ -1199,11 +1209,12 @@ DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: state_chg to RAN_CONN_S_ACCEPTED
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_ACCEPTED}: Received Event RAN_CONN_E_UNUSED
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_ACCEPTED}: state_chg to RAN_CONN_S_RELEASING
-DREF MSISDN:46071: MSC conn use + release == 2 (0x102: dtap,release)
-DREF VLR subscr MSISDN:46071 usage increases to: 3
-DREF VLR subscr MSISDN:46071 usage decreases to: 2
+DREF MSISDN:46071: MSC conn use + release == 1 (0x100: release)
+DREF VLR subscr MSISDN:46071 usage increases to: 4
+DREF VLR subscr MSISDN:46071 usage decreases to: 3
- BSSAP Clear --GERAN-A--> MS
-DREF MSISDN:46071: MSC conn use - dtap == 1 (0x100: release)
+DREF VLR subscr MSISDN:46071 usage decreases to: 2
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0
bssap_clear_sent == 1
- LU was successful, and the conn has already been closed
lu_result_sent == 1
@@ -1633,20 +1644,29 @@ DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1
DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: SMS:0x01
-- MS replies with an Identity Response
+- MS replies with an Identity Response, VLR sends the IMEI to HLR
MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP
DREF MSISDN:46071: MSC conn use + dtap == 1 (0x2: dtap)
DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
DMM IDENTITY RESPONSE: MI(IMEI)=423423423423420
DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI
+DVLR GSUP tx: 30010809710000004026f050090824433224433224f0
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0
+DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+- HLR accepts the IMEI
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100
+DVLR GSUP rx 14: 32010809710000004026f0510100
+DREF VLR subscr MSISDN:46071 usage increases to: 2
+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: lu_compl_vlr_new_tmsi()
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF
- sending LU Accept for MSISDN:46071, with TMSI 0x03020100
-DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+DREF VLR subscr MSISDN:46071 usage decreases to: 1
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0
- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl
llist_count(&net->ran_conns) == 1
lu_result_sent == 1
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c
index 3162149..d52d3d6 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.c
@@ -428,11 +428,15 @@ static void test_no_authen_imei()
EXPECT_ACCEPTED(false);
thwart_rx_non_initial_requests();
- btw("MS replies with an Identity Response");
- expect_bssap_clear();
+ btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
+ gsup_expect_tx("30010809710000004026f050090824433224433224f0");
/* 3GPP TS 23.003: 6.2.1 Composition of IMEI: the IMEI ends with a
* spare digit that shall be sent as zero by the MS. */
ms_sends_msg("0559084a32244332244302");
+
+ btw("HLR accepts the IMEI");
+ expect_bssap_clear();
+ gsup_rx("32010809710000004026f0510100", NULL);
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("LU was successful, and the conn has already been closed");
@@ -499,9 +503,13 @@ static void test_no_authen_tmsi_imei()
EXPECT_ACCEPTED(false);
thwart_rx_non_initial_requests();
- btw("MS replies with an Identity Response");
+ btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
+ gsup_expect_tx("30010809710000004026f050090824433224433224f0");
ms_sends_msg("0559084a32244332244302");
+ btw("HLR accepts the IMEI");
+ gsup_rx("32010809710000004026f0510100", NULL);
+
btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl");
EXPECT_CONN_COUNT(1);
VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
@@ -652,9 +660,13 @@ static void test_no_authen_imeisv_imei()
EXPECT_ACCEPTED(false);
thwart_rx_non_initial_requests();
- btw("MS replies with an Identity Response");
- expect_bssap_clear();
+ btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
+ gsup_expect_tx("30010809710000004026f050090824433224433224f0");
ms_sends_msg("0559084a32244332244302");
+
+ btw("HLR accepts the IMEI");
+ expect_bssap_clear();
+ gsup_rx("32010809710000004026f0510100", NULL);
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("LU was successful, and the conn has already been closed");
@@ -874,9 +886,13 @@ static void test_no_authen_imeisv_tmsi_imei()
EXPECT_ACCEPTED(false);
thwart_rx_non_initial_requests();
- btw("MS replies with an Identity Response");
+ btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
+ gsup_expect_tx("30010809710000004026f050090824433224433224f0");
ms_sends_msg("0559084a32244332244302");
+ btw("HLR accepts the IMEI");
+ gsup_rx("32010809710000004026f0510100", NULL);
+
btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl");
EXPECT_CONN_COUNT(1);
VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err
index f865d87..7d00eff 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.err
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.err
@@ -913,16 +913,26 @@ DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1
DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: SMS:0x01
-- MS replies with an Identity Response
+- MS replies with an Identity Response, VLR sends the IMEI to HLR
MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP
DREF MSISDN:46071: MSC conn use + dtap == 1 (0x2: dtap)
DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
DMM IDENTITY RESPONSE: MI(IMEI)=423423423423420
DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI
+DVLR GSUP tx: 30010809710000004026f050090824433224433224f0
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0
+DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+- HLR accepts the IMEI
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100
+DVLR GSUP rx 14: 32010809710000004026f0510100
+DREF VLR subscr MSISDN:46071 usage increases to: 2
+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK
- sending LU Accept for MSISDN:46071
-DREF VLR subscr MSISDN:46071 usage increases to: 2
+DREF VLR subscr MSISDN:46071 usage increases to: 3
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI}: state_chg to LU_COMPL_VLR_S_DONE
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)
@@ -934,11 +944,12 @@ DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: state_chg to RAN_CONN_S_ACCEPTED
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_ACCEPTED}: Received Event RAN_CONN_E_UNUSED
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_ACCEPTED}: state_chg to RAN_CONN_S_RELEASING
-DREF MSISDN:46071: MSC conn use + release == 2 (0x102: dtap,release)
-DREF VLR subscr MSISDN:46071 usage increases to: 3
-DREF VLR subscr MSISDN:46071 usage decreases to: 2
+DREF MSISDN:46071: MSC conn use + release == 1 (0x100: release)
+DREF VLR subscr MSISDN:46071 usage increases to: 4
+DREF VLR subscr MSISDN:46071 usage decreases to: 3
- BSSAP Clear --GERAN-A--> MS
-DREF MSISDN:46071: MSC conn use - dtap == 1 (0x100: release)
+DREF VLR subscr MSISDN:46071 usage decreases to: 2
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0
bssap_clear_sent == 1
- LU was successful, and the conn has already been closed
lu_result_sent == 1
@@ -1094,20 +1105,29 @@ DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1
DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: SMS:0x01
-- MS replies with an Identity Response
+- MS replies with an Identity Response, VLR sends the IMEI to HLR
MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP
DREF MSISDN:46071: MSC conn use + dtap == 1 (0x2: dtap)
DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
DMM IDENTITY RESPONSE: MI(IMEI)=423423423423420
DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI
+DVLR GSUP tx: 30010809710000004026f050090824433224433224f0
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0
+DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+- HLR accepts the IMEI
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100
+DVLR GSUP rx 14: 32010809710000004026f0510100
+DREF VLR subscr MSISDN:46071 usage increases to: 2
+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: lu_compl_vlr_new_tmsi()
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF
- sending LU Accept for MSISDN:46071, with TMSI 0x03020100
-DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+DREF VLR subscr MSISDN:46071 usage decreases to: 1
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0
- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl
llist_count(&net->ran_conns) == 1
lu_result_sent == 1
@@ -1486,16 +1506,26 @@ DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1
DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: SMS:0x01
-- MS replies with an Identity Response
+- MS replies with an Identity Response, VLR sends the IMEI to HLR
MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP
DREF MSISDN:46071: MSC conn use + dtap == 1 (0x2: dtap)
DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
DMM IDENTITY RESPONSE: MI(IMEI)=423423423423420
DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI
+DVLR GSUP tx: 30010809710000004026f050090824433224433224f0
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0
+DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+- HLR accepts the IMEI
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100
+DVLR GSUP rx 14: 32010809710000004026f0510100
+DREF VLR subscr MSISDN:46071 usage increases to: 2
+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK
- sending LU Accept for MSISDN:46071
-DREF VLR subscr MSISDN:46071 usage increases to: 2
+DREF VLR subscr MSISDN:46071 usage increases to: 3
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI}: state_chg to LU_COMPL_VLR_S_DONE
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)
@@ -1507,11 +1537,12 @@ DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: state_chg to RAN_CONN_S_ACCEPTED
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_ACCEPTED}: Received Event RAN_CONN_E_UNUSED
DMM RAN_conn(LU:901700000004620){RAN_CONN_S_ACCEPTED}: state_chg to RAN_CONN_S_RELEASING
-DREF MSISDN:46071: MSC conn use + release == 2 (0x102: dtap,release)
-DREF VLR subscr MSISDN:46071 usage increases to: 3
-DREF VLR subscr MSISDN:46071 usage decreases to: 2
+DREF MSISDN:46071: MSC conn use + release == 1 (0x100: release)
+DREF VLR subscr MSISDN:46071 usage increases to: 4
+DREF VLR subscr MSISDN:46071 usage decreases to: 3
- BSSAP Clear --GERAN-A--> MS
-DREF MSISDN:46071: MSC conn use - dtap == 1 (0x100: release)
+DREF VLR subscr MSISDN:46071 usage decreases to: 2
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0
bssap_clear_sent == 1
- LU was successful, and the conn has already been closed
lu_result_sent == 1
@@ -2047,20 +2078,29 @@ DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1
DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
DRLL subscr MSISDN:46071: Message not permitted for initial conn: SMS:0x01
-- MS replies with an Identity Response
+- MS replies with an Identity Response, VLR sends the IMEI to HLR
MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP
DREF MSISDN:46071: MSC conn use + dtap == 1 (0x2: dtap)
DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
DMM IDENTITY RESPONSE: MI(IMEI)=423423423423420
DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420
DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI
+DVLR GSUP tx: 30010809710000004026f050090824433224433224f0
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0
+DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
+DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+- HLR accepts the IMEI
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100
+DVLR GSUP rx 14: 32010809710000004026f0510100
+DREF VLR subscr MSISDN:46071 usage increases to: 2
+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: lu_compl_vlr_new_tmsi()
DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF
- sending LU Accept for MSISDN:46071, with TMSI 0x03020100
-DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
+DREF VLR subscr MSISDN:46071 usage decreases to: 1
+<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0
- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl
llist_count(&net->ran_conns) == 1
lu_result_sent == 1