Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 12: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 12 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 16 Jan 2019 10:42:51 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 11: (1 comment) https://gerrit.osmocom.org/#/c/12478/11/src/libvlr/vlr.c File src/libvlr/vlr.c: https://gerrit.osmocom.org/#/c/12478/11/src/libvlr/vlr.c@664 PS11, Line 664: {0} > Do we really need to zero-init this array? We don't, as gsm48_encode_bcd_number() doesn't read from this buffer before writing to it. I've verified this with valgrind just to be sure. The {0} is removed now, thanks for pointing it out! -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 11 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 16 Jan 2019 10:36:39 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Hello Stefan Sperling, Vadim Yanitskiy, Pau Espin Pedrol, Max, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12478 to look at the new patch set (#12). Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 918 insertions(+), 57 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/12 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 12 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 11: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/12478/11/src/libvlr/vlr.c File src/libvlr/vlr.c: https://gerrit.osmocom.org/#/c/12478/11/src/libvlr/vlr.c@664 PS11, Line 664: {0} Do we really need to zero-init this array? -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 11 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 16 Jan 2019 01:19:44 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 11: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 11 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 15 Jan 2019 16:12:19 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Hello Stefan Sperling, Vadim Yanitskiy, Pau Espin Pedrol, Max, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12478 to look at the new patch set (#11). Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 918 insertions(+), 57 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/11 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 11 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 10: Code-Review+1 (2 comments) just cosmetics... https://gerrit.osmocom.org/#/c/12478/10/src/libvlr/vlr.c File src/libvlr/vlr.c: https://gerrit.osmocom.org/#/c/12478/10/src/libvlr/vlr.c@664 PS10, Line 664: * IMEI to the HLR DB as side effect (OS#2541). */ In general, it's a good thing to spread context info, but not so good if that info is volatile: if at some point we would add an EIR or a IMEI white/blacklist, then we'd have to revisit all these places and correct the context info, in a completely separate code tree. So I guess it would be better to leave the info close to its home, like, rather avoid explaining OsmoHLR in OsmoMSC code, and avoid explaining OsmoMSC in OsmoHLR code; if you have to, use as non-specific references to other programs as possible. Further complication here is that even if using the Osmocom stack, some users may choose a GSUP<->MAP translation and/or use a completely different HLR than OsmoHLR. So I'd just shut up about it here and explain everything in OsmoHLR, preferably in only one place, to avoid diverse info. https://gerrit.osmocom.org/#/c/12478/10/src/libvlr/vlr.c@668 PS10, Line 668: uint8_t imei_enc[GSM23003_IMEI_NUM_DIGITS+2] = {0}; (maybe mention +2 for the IE header?) -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 10 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 14 Jan 2019 17:24:47 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Hello Stefan Sperling, Vadim Yanitskiy, Pau Espin Pedrol, Max, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12478 to look at the new patch set (#10). Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 922 insertions(+), 57 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/10 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 10 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 9 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 11 Jan 2019 14:23:22 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Hello Stefan Sperling, Vadim Yanitskiy, Pau Espin Pedrol, Max, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12478 to look at the new patch set (#9). Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 914 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/9 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 9 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 8: (2 comments) https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr_lu_fsm.c@1234 PS8, Line 1234: vlr_subscr_tx_req_check_imei > Should we still do this if check-imei-req is disabled in the VTY config? When check-imei-req is disabled, the MSC/VLR will not even ask the MS to send the IMEI. The VLR_ULA_E_ID_IMEI event won't come in then, so we won't reach this code line. https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr_lu_fsm.c@1242 PS8, Line 1242: NULL > Wait, vlr_subscr_handle_check_imei() is passing the cause here, but we don't > use it? Yeah, I've just realized this as well (see my other answer above) :) -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 11 Jan 2019 14:13:19 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 8: (2 comments) https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr.c File src/libvlr/vlr.c: https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr.c@1016 PS8, Line 1016: (void *)>cause); > What is the meaning of cause in successful case? Oh, I realize now that I had copied the (void *)>cause argument from vlr_subscr_handle_lu_err() above, without thinking too much about it. You are right, on ACK and NACK the gsup->cause is not set. And even where it is set at ERROR below, we already log it. So there is not really a point in sending the gsup->cause as userdata along with osmo_fsm_inst_dispatch. The function that gets called from the dispatch, lu_compl_vlr_wait_imei() in vlr_lu_fsm.c, ignores the data argument anyway. I'll just remove the argument. Good catch, thanks! https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr.c@1018 PS8, Line 1018: (void *)>cause); > Same here, isn't it only being sent when msgt == > OSMO_GSUP_MSGT_CHECK_IMEI_ERROR? (see above) -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 11 Jan 2019 14:10:27 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 8: (2 comments) https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr_lu_fsm.c@1234 PS8, Line 1234: vlr_subscr_tx_req_check_imei Should we still do this if check-imei-req is disabled in the VTY config? https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr_lu_fsm.c@1242 PS8, Line 1242: NULL Wait, vlr_subscr_handle_check_imei() is passing the cause here, but we don't use it? -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 11 Jan 2019 14:03:09 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 8: (1 comment) https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr.c File src/libvlr/vlr.c: https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr.c@1006 PS8, Line 1006: const You're losing 'const' when calling osmo_fsm_inst_dispatch(), so maybe just drop it to avoid explicit (void *) cast? This is just an idea, up to you. -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 11 Jan 2019 13:55:52 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 8: (2 comments) https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr.c File src/libvlr/vlr.c: https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr.c@1016 PS8, Line 1016: (void *)>cause); What is the meaning of cause in successful case? https://gerrit.osmocom.org/#/c/12478/8/src/libvlr/vlr.c@1018 PS8, Line 1018: (void *)>cause); Same here, isn't it only being sent when msgt == OSMO_GSUP_MSGT_CHECK_IMEI_ERROR? -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 11 Jan 2019 13:45:32 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 7: (1 comment) Updated, ready for another review. https://gerrit.osmocom.org/#/c/12478/6/src/libvlr/vlr.c File src/libvlr/vlr.c: https://gerrit.osmocom.org/#/c/12478/6/src/libvlr/vlr.c@1017 PS6, Line 1017: osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_LU_COMPL_FAILURE, (void *)>cause); > (a cast to void* is never needed) It is necessary here, because >cause is a const, and osmo_fsm_inst_dispatch() expects userdata here, with the type void* (without const). So GCC complains when removing the (void *). -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 7 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 11 Jan 2019 09:35:26 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Hello Stefan Sperling, Pau Espin Pedrol, Vadim Yanitskiy, Max, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12478 to look at the new patch set (#8). Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 914 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/8 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 7: Thanks for the review! > maybe drop the FIXME from vlr_lu_fsm.c:506? I am not what it means, therefore I am not sure if it can be dropped: > /* FIXME: IMEI Check Fail to VLR Application (Detach IMSI VLR) */ (According to the git log, that FIXME is from the big "add libvlr implementation" commit from you and Harald.) -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 7 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 10 Jan 2019 12:42:44 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. Patch Set 6: Code-Review-1 (6 comments) very nice so far. Also add an msc_vlr_test that NACKs and one that ERRs the IMSI? Or are you doing that in TTCN3 already? maybe drop the FIXME from vlr_lu_fsm.c:506? https://gerrit.osmocom.org/#/c/12478/6/src/libvlr/vlr.c File src/libvlr/vlr.c: https://gerrit.osmocom.org/#/c/12478/6/src/libvlr/vlr.c@1017 PS6, Line 1017: osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_LU_COMPL_FAILURE, (void *)>cause); state LU_COMPL_VLR_S_WAIT_IMEI in vlr_lu_fsm.c doesn't allow event VLR_ULA_E_LU_COMPL_FAILURE? (a cast to void* is never needed) https://gerrit.osmocom.org/#/c/12478/6/src/libvlr/vlr.c@1033 PS6, Line 1033: osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_HLR_IMEI_NACK, (void *)>cause); what's the difference between the error above and this NACK? These events do not evaluate any data argument, do they? https://gerrit.osmocom.org/#/c/12478/6/tests/msc_vlr/msc_vlr_test_gsm_authen.c File tests/msc_vlr/msc_vlr_test_gsm_authen.c: https://gerrit.osmocom.org/#/c/12478/6/tests/msc_vlr/msc_vlr_test_gsm_authen.c@579 PS6, Line 579: insert here another EXPECT_ACCEPTED(false) and thwart_rx_non_initial_requests(). https://gerrit.osmocom.org/#/c/12478/6/tests/msc_vlr/msc_vlr_test_gsm_authen.c@686 PS6, Line 686: and here https://gerrit.osmocom.org/#/c/12478/6/tests/msc_vlr/msc_vlr_test_gsm_ciph.c File tests/msc_vlr/msc_vlr_test_gsm_ciph.c: https://gerrit.osmocom.org/#/c/12478/6/tests/msc_vlr/msc_vlr_test_gsm_ciph.c@559 PS6, Line 559: and here https://gerrit.osmocom.org/#/c/12478/6/tests/msc_vlr/msc_vlr_test_gsm_ciph.c@768 PS6, Line 768: and here -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 6 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 09 Jan 2019 14:46:54 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12478 to look at the new patch set (#6). Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 245 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/6 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 6 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102)
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12478 to look at the new patch set (#4). Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 M tests/test_nodes.vty 11 files changed, 246 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/4 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102)
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 245 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/3 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-CC: Jenkins Builder (102)
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/12478 ) Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 245 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/2 -- To view, visit https://gerrit.osmocom.org/12478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife868ed71c36cdd02638072abebf61fc949080a7 Gerrit-Change-Number: 12478 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-CC: Jenkins Builder (102)
Change in osmo-msc[master]: VLR: send CHECK-IMEI to EIR/HLR
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/12478 Change subject: VLR: send CHECK-IMEI to EIR/HLR .. VLR: send CHECK-IMEI to EIR/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 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_core.h M src/libvlr/vlr_lu_fsm.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 10 files changed, 245 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/12478/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 029ef31..bf2f9fc 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -65,6 +65,8 @@ 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 7de78bf..ac340d1 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -642,6 +642,32 @@ return vlr_subscr_tx_gsup_message(vsub, _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, _msg); +} + /* Tell HLR that authentication failure occurred */ int vlr_subscr_tx_auth_fail_rep(const struct vlr_subscr *vsub) { @@ -976,6 +1002,39 @@ 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 *)>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 *)>cause); + else + osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_HLR_IMEI_NACK, (void *)>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 @@ gsup.message_type); rc = -GMM_CAUSE_MSGT_NOTEXIST_NOTIMPL;