Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI

osmith gerrit-no-reply at lists.osmocom.org
Tue May 7 10:05:44 UTC 2019


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13893


Change subject: vlr: when setting IMEISV, also set IMEI
......................................................................

vlr: when setting IMEISV, also set IMEI

Fix IMEI length in vlr_subscr->imei, and copy IMEISV to IMEI when
IMEISV changes. The additional SV digits will get cut off then. This is
needed for the subscriber on demand use case, since we can get the
IMEISV early (see [1]), but need to send the IMEI to the Check IMEI
procedure.

While adjusting the tests, I have noticed that there are code paths
where we ask the MS for the IMEISV first, and later ask the MS for the
IMEI, although we already have the IMEISV. This could be improved in a
future patch.

[1] Change-Id I256224194c3b8caf2b58a88d11dccd32c569201f

Related: OS#2542
Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e
---
M include/osmocom/msc/vlr.h
M src/libvlr/vlr.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_no_authen.err
8 files changed, 66 insertions(+), 61 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/13893/1

diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index ce6a232..a8a3810 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -151,7 +151,7 @@
 	struct osmo_cell_global_id cgi;			/* 2.4.16 */
 
 	char imeisv[GSM23003_IMEISV_NUM_DIGITS+1];	/* 2.2.3 */
-	char imei[GSM23003_IMEISV_NUM_DIGITS+1];	/* 2.1.9 */
+	char imei[GSM23003_IMEI_NUM_DIGITS_NO_CHK+1];	/* 2.1.9 */
 	bool imsi_detached_flag;			/* 2.7.1 */
 	bool conf_by_radio_contact_ind;			/* 2.7.4.1 */
 	bool sub_dataconf_by_hlr_ind;			/* 2.7.4.2 */
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 1afdbec..03d6be6 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -462,6 +462,9 @@
 	OSMO_STRLCPY_ARRAY(vsub->imeisv, imeisv);
 	DEBUGP(DVLR, "set IMEISV on subscriber; IMSI=%s IMEISV=%s\n",
 	       vsub->imsi, vsub->imeisv);
+
+	/* Copy IMEISV to IMEI (additional SV digits get cut off) */
+	vlr_subscr_set_imei(vsub, imeisv);
 }
 
 /* Safely copy the given MSISDN string to vsub->msisdn */
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
index 0153609..2da5108 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
@@ -575,7 +575,7 @@
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 	EXPECT_ACCEPTED(false);
 	thwart_rx_non_initial_requests();
@@ -593,7 +593,7 @@
 	btw("Subscriber has the IMEI");
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d");
+	VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d");
 	vlr_subscr_put(vsub, __func__);
 
 	BTW("subscriber detaches");
@@ -683,7 +683,7 @@
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 	EXPECT_ACCEPTED(false);
 	thwart_rx_non_initial_requests();
@@ -776,7 +776,7 @@
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 	EXPECT_ACCEPTED(false);
 	thwart_rx_non_initial_requests();
@@ -870,7 +870,7 @@
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 	EXPECT_ACCEPTED(false);
 	thwart_rx_non_initial_requests();
@@ -904,7 +904,7 @@
 	btw("Subscriber has the IMEI and TMSI");
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d");
+	VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d");
 	VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x");
 	vlr_subscr_put(vsub, __func__);
 
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err
index 457b77f..0cf1ab2 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err
@@ -1300,10 +1300,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -1359,7 +1359,7 @@
   llist_count(&net->ran_conns) == 0
 - Subscriber has the IMEI
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_gsm_authen_imei: now used by 2 (attached,test_gsm_authen_imei)
-  strcmp(vsub->imei, "423423423423420") == 0
+  strcmp(vsub->imei, "42342342342342") == 0
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_gsm_authen_imei: now used by 1 (attached)
 ---
 - subscriber detaches
@@ -1546,10 +1546,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -1765,10 +1765,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -1985,10 +1985,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -2077,7 +2077,7 @@
   llist_count(&net->ran_conns) == 0
 - Subscriber has the IMEI and TMSI
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_gsm_authen_tmsi_imei: now used by 2 (attached,test_gsm_authen_tmsi_imei)
-  strcmp(vsub->imei, "423423423423420") == 0
+  strcmp(vsub->imei, "42342342342342") == 0
   vsub->tmsi == 0x03020100
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_gsm_authen_tmsi_imei: now used by 1 (attached)
 ---
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
index cbcc11d..e1ee156 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
@@ -555,7 +555,7 @@
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 	EXPECT_ACCEPTED(false);
 	thwart_rx_non_initial_requests();
@@ -573,7 +573,7 @@
 	btw("Subscriber has the IMEI");
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d");
+	VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d");
 	vlr_subscr_put(vsub, __func__);
 
 	BTW("subscriber detaches");
@@ -766,7 +766,7 @@
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 	EXPECT_ACCEPTED(false);
 	thwart_rx_non_initial_requests();
@@ -800,7 +800,7 @@
 	btw("Subscriber has the IMEI and TMSI");
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d");
+	VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d");
 	VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x");
 	vlr_subscr_put(vsub, __func__);
 
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
index 9ca5b8c..6674734 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
@@ -1243,10 +1243,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -1302,7 +1302,7 @@
   llist_count(&net->ran_conns) == 0
 - Subscriber has the IMEI
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_ciph_imei: now used by 2 (attached,test_ciph_imei)
-  strcmp(vsub->imei, "423423423423420") == 0
+  strcmp(vsub->imei, "42342342342342") == 0
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_ciph_imei: now used by 1 (attached)
 ---
 - subscriber detaches
@@ -1435,6 +1435,7 @@
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: got IMEISV: 4234234234234275F
 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275
+DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph()
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4()
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD
@@ -1711,10 +1712,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -1803,7 +1804,7 @@
   llist_count(&net->ran_conns) == 0
 - Subscriber has the IMEI and TMSI
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_ciph_tmsi_imei: now used by 2 (attached,test_ciph_tmsi_imei)
-  strcmp(vsub->imei, "423423423423420") == 0
+  strcmp(vsub->imei, "42342342342342") == 0
   vsub->tmsi == 0x03020100
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_ciph_tmsi_imei: now used by 1 (attached)
 ---
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c
index 2a4a14e..e5dd0b7 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.c
@@ -430,7 +430,7 @@
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	/* 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");
@@ -448,7 +448,7 @@
 	btw("Subscriber has the IMEI");
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d");
+	VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d");
 	vlr_subscr_put(vsub, __func__);
 
 	BTW("subscriber detaches");
@@ -505,7 +505,7 @@
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 
 	btw("HLR accepts the IMEI");
@@ -530,7 +530,7 @@
 	btw("Subscriber has the IMEI and TMSI");
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d");
+	VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d");
 	VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x");
 	vlr_subscr_put(vsub, __func__);
 
@@ -656,13 +656,12 @@
 	EXPECT_CONN_COUNT(1);
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(vsub->imei[0], == 0, "%d");
 	vlr_subscr_put(vsub, __func__);
 	EXPECT_ACCEPTED(false);
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 
 	btw("HLR accepts the IMEI");
@@ -678,7 +677,7 @@
 	btw("Subscriber has the IMEI");
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d");
+	VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d");
 	vlr_subscr_put(vsub, __func__);
 
 	BTW("subscriber detaches");
@@ -882,13 +881,12 @@
 	EXPECT_CONN_COUNT(1);
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
-	VERBOSE_ASSERT(vsub->imei[0], == 0, "%d");
 	vlr_subscr_put(vsub, __func__);
 	EXPECT_ACCEPTED(false);
 	thwart_rx_non_initial_requests();
 
 	btw("MS replies with an Identity Response, VLR sends the IMEI to HLR");
-	gsup_expect_tx("30010809710000004026f050090824433224433224f0");
+	gsup_expect_tx("30010809710000004026f050080724433224433224");
 	ms_sends_msg("0559084a32244332244302");
 
 	btw("HLR accepts the IMEI");
@@ -914,7 +912,7 @@
 	vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
 	OSMO_ASSERT(vsub);
 	VERBOSE_ASSERT(strcmp(vsub->imeisv, "4234234234234275"), == 0, "%d");
-	VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d");
+	VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d");
 	VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x");
 	vlr_subscr_put(vsub, __func__);
 
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err
index 6f5adb6..538f8c7 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.err
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.err
@@ -987,10 +987,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -1036,7 +1036,7 @@
   llist_count(&net->ran_conns) == 0
 - Subscriber has the IMEI
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imei: now used by 2 (attached,test_no_authen_imei)
-  strcmp(vsub->imei, "423423423423420") == 0
+  strcmp(vsub->imei, "42342342342342") == 0
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imei: now used by 1 (attached)
 ---
 - subscriber detaches
@@ -1176,10 +1176,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -1252,7 +1252,7 @@
   llist_count(&net->ran_conns) == 0
 - Subscriber has the IMEI and TMSI
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_no_authen_tmsi_imei: now used by 2 (attached,test_no_authen_tmsi_imei)
-  strcmp(vsub->imei, "423423423423420") == 0
+  strcmp(vsub->imei, "42342342342342") == 0
   vsub->tmsi == 0x03020100
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_no_authen_tmsi_imei: now used by 1 (attached)
 ---
@@ -1324,6 +1324,7 @@
 DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
 DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275
 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275
+DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1()
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth()
@@ -1488,6 +1489,7 @@
 DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
 DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275
 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275
+DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1()
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth()
@@ -1558,7 +1560,6 @@
 - We will only do business when the IMEI is known
   llist_count(&net->ran_conns) == 1
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (conn,test_no_authen_imeisv_imei)
-  vsub->imei[0] == 0
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (conn)
 ran_conn_is_accepted() == false
   requests shall be thwarted
@@ -1575,10 +1576,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -1624,7 +1625,7 @@
   llist_count(&net->ran_conns) == 0
 - Subscriber has the IMEI
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (attached,test_no_authen_imeisv_imei)
-  strcmp(vsub->imei, "423423423423420") == 0
+  strcmp(vsub->imei, "42342342342342") == 0
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (attached)
 ---
 - subscriber detaches
@@ -1695,6 +1696,7 @@
 DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
 DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275
 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275
+DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1()
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth()
@@ -1857,6 +1859,7 @@
 DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
 DMM IDENTITY RESPONSE: MI=IMEI-SV-5234234234234276
 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=5234234234234276
+DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=52342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1()
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth()
@@ -2060,6 +2063,7 @@
 DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19)
 DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275
 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275
+DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1()
 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth()
@@ -2130,7 +2134,6 @@
 - We will only do business when the IMEI is known
   llist_count(&net->ran_conns) == 1
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_tmsi_imei: now used by 2 (conn,test_no_authen_imeisv_tmsi_imei)
-  vsub->imei[0] == 0
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_tmsi_imei: now used by 1 (conn)
 ran_conn_is_accepted() == false
   requests shall be thwarted
@@ -2147,10 +2150,10 @@
 DREF IMSI-901700000004620: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 set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){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
+DVLR GSUP tx: 30010809710000004026f050080724433224433224
+GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224
 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: )
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED
 DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED
@@ -2224,7 +2227,7 @@
 - Subscriber has the IMEISV, IMEI and TMSI
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_no_authen_imeisv_tmsi_imei: now used by 2 (attached,test_no_authen_imeisv_tmsi_imei)
   strcmp(vsub->imeisv, "4234234234234275") == 0
-  strcmp(vsub->imei, "423423423423420") == 0
+  strcmp(vsub->imei, "42342342342342") == 0
   vsub->tmsi == 0x03020100
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_no_authen_imeisv_tmsi_imei: now used by 1 (attached)
 ---

-- 
To view, visit https://gerrit.osmocom.org/13893
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e
Gerrit-Change-Number: 13893
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190507/50492a20/attachment-0001.html>


More information about the gerrit-log mailing list