Change in osmo-msc[master]: vlr: fix IMEI length

osmith gerrit-no-reply at lists.osmocom.org
Wed May 8 06:46:19 UTC 2019


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


Change subject: vlr: fix IMEI length
......................................................................

vlr: fix IMEI length

Set the length of vlr_subscr->imei to
	GSM23003_IMEI_NUM_DIGITS_NO_CHK (14)
instead of
	GSM23003_IMEISV_NUM_DIGITS (16).

Note that there is also GSM23003_IMEI_NUM_DIGITS (15), which includes
an additional checksum digit. This digit is not intended for digital
transmission, so we don't need to store it. Also by not storing it, we
can simply copy the IMEI-part from the IMEISV to the IMEI without
worrying about the checksum (will be done in a follow up patch).

A good overview of the IMEI/IMEISV structure is here:
https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity#Structure_of_the_IMEI_and_IMEISV_(IMEI_software_version)

Related: OS#2542
Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54
---
M include/osmocom/msc/vlr.h
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
7 files changed, 57 insertions(+), 61 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/04/13904/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/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..43956c8 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
@@ -1711,10 +1711,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 +1803,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..7e08c45 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)
 ---
@@ -1558,7 +1558,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 +1574,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 +1623,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
@@ -2130,7 +2129,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 +2145,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 +2222,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/13904
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: Iaf2569c099874b55acbd748b776394726cc5ce54
Gerrit-Change-Number: 13904
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/20190508/584a8058/attachment.html>


More information about the gerrit-log mailing list