aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-05-02 13:39:26 +0200
committerosmith <osmith@sysmocom.de>2019-05-15 08:53:22 +0000
commitd103705f01435592dfe97ed33e1e2e3b93ac18fc (patch)
treee1c408194adb006f5012bf968ab2acfe97b8aaef /include
parent03ded913ad60cafa9f79443c845cd01fe8a0c929 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/msc/vlr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 4c119514a..b1c0d5dde 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -146,7 +146,7 @@ struct vlr_subscr {
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 */