osmo-msc/include/osmocom/msc
Neels Hofmeyr 2fd69e15d3 fix VLR evil twin on LU with unknown TMSI
When a subscriber first attaches by TMSI only, and later tells the IMSI
via ID Response, it may turn out that this IMSI already exists in the
VLR database. If this happens, the TMSI that the subscriber issued was
not known in the existing VLR entry, indicating that the subscriber has
in the meantime camped on a different core. Which means we can assume
that there cannot be any active connections, and the old subscriber can
be discarded, for the benefit of the new one.

(We could also discard the new one, but it is more complex to reparent
the ongoing FSMs for Compl L3 than to copy some dormant VLR state.)

In vlr_subscr_set_imsi(), check for an existing IMSI entry in the VLR.

If such exists, copy any pending Paging and auth tuple state to the new
subscriber, and discard the old one from the VLR.

In order to safely discard a vlr subscriber by force, add a new vlr_ops
function: subscr_inval(), to tell the MSC that a vlr_subscr is no longer
valid.

Upcoming patch I583682d1a35a70b008d7bb2d89ba7c3109a60b21 better clears
TMSI state from the VLR, making it more likely to hit the evil twin
situation this patch fixes; hence this is, sort of, preparation.

Related: SYS#6860 OS#4721
Change-Id: Ifdabe0b65bffafbf7b8e5cc10e2d225d1ed1cecd
2024-03-28 04:06:58 +01:00
..
Makefile.am ASCI: Add VTY to configure GCR (Group Call Register) 2023-07-21 12:28:03 +02:00
asci_gcr.h ASCI: Add simple implementation of Group Call Register 2023-07-17 12:29:42 +00:00
asci_vty.h ASCI: Add VTY to configure GCR (Group Call Register) 2023-07-21 12:28:03 +02:00
call_leg.h rtp_stream: allow multiple codecs / use codec filter from Assignment 2023-03-18 03:05:34 +01:00
cell_id_list.h copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH 2023-05-18 17:22:26 +07:00
codec_filter.h transaction: move cc.codecs.result -> cc.local 2023-06-15 15:06:46 +02:00
codec_mapping.h add sdp_audio_codec_to_speech_codec_list() 2023-12-13 01:52:22 +00:00
csd_bs.h Add initial CSD support with external MNCC 2023-06-20 12:47:05 +02:00
csd_filter.h Add initial CSD support with external MNCC 2023-06-20 12:47:05 +02:00
db.h switch from libdbi to lbsqlite3 2022-05-17 14:04:44 +02:00
debug.h ASCI: Add log category for VGCS/VBS call and channel FSM 2023-07-09 07:41:33 +00:00
e_link.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
gsm_04_08.h do CN CRCX first 2023-03-18 03:05:34 +01:00
gsm_04_11.h SMS over GSUP: correctly route GSUP responses to MT SMS 2023-09-25 05:13:49 +00:00
gsm_04_11_gsup.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
gsm_04_14.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
gsm_04_80.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
gsm_09_11.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
gsm_data.h ASCI: Add option to switch on or off ASCI support 2023-07-19 08:23:23 +00:00
gsm_data_shared.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
gsm_subscriber.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
gsup_client_mux.h SMS over GSUP: set source_name in GSUP reply messages 2023-09-25 05:20:02 +00:00
mncc.h Add LLC and HLC information to MNCC interface definiton 2024-01-24 08:50:12 +00:00
mncc_call.h copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH 2023-05-18 17:22:26 +07:00
mncc_int.h rename include/openbsc to include/osmocom/msc 2017-09-06 16:41:25 +02:00
msc_a.h implement re-assignment to match codecs 2023-12-13 01:52:22 +00:00
msc_a_remote.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
msc_common.h implement CM Re-Establish for voice calls 2021-07-29 22:40:59 +02:00
msc_ho.h copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH 2023-05-18 17:22:26 +07:00
msc_i.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
msc_i_remote.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
msc_roles.h Fix some typos 2019-11-19 01:04:34 +00:00
msc_t.h ASCI: Use a unique call-id for RTP streams 2023-07-09 07:41:33 +00:00
msc_t_remote.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
msc_vgcs.h ASCI: Add call control for VGCS/VBS 2023-07-17 12:29:42 +00:00
msub.h use new osmo_mobile_identity API everywhere 2020-06-19 03:58:13 +02:00
neighbor_ident.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
osmux.h vty: Add option to enable osmux towards BSCs 2019-05-19 07:28:02 +00:00
paging.h fix VLR evil twin on LU with unknown TMSI 2024-03-28 04:06:58 +01:00
ran_conn.h ASCI: Add call control for VGCS/VBS 2023-07-17 12:29:42 +00:00
ran_infra.h add ran_infra.force_mgw_codecs_to_ran 2023-03-18 03:05:34 +01:00
ran_msg.h ASCI: Add callref to assignment command 2023-07-17 12:29:42 +00:00
ran_msg_a.h refactor: move RESET Osmux TLV parsing to ran_msg_a.c 2020-07-01 23:33:16 +02:00
ran_msg_iu.h refactor: move RESET Osmux TLV parsing to ran_msg_a.c 2020-07-01 23:33:16 +02:00
ran_peer.h fix comment in ran_peer.h 2020-09-25 01:45:08 +02:00
rrlp.h RRLP: migrate and share mode definitions from msc_vty.c 2018-08-05 11:33:20 +00:00
rtp_stream.h ASCI: Allow usage of rtp_stream with other FSM 2023-07-09 07:41:33 +00:00
sccp_ran.h refactor: move RESET Osmux TLV parsing to ran_msg_a.c 2020-07-01 23:33:16 +02:00
sdp_msg.h cosmetic: rename to sdp_audio_codecs_foreach() 2024-02-08 23:42:17 +01:00
sgs_iface.h paging: Send SGsAP-SERVICE-ABORT-REQUEST on paging timeout 2019-09-26 19:23:54 +00:00
sgs_server.h Fix some typos 2019-11-19 01:04:34 +00:00
sgs_vty.h Add SGs Interface 2019-02-04 13:36:26 +01:00
signal.h msc/signal.h: remove unused (since the NiTB split up) signals 2020-01-20 11:40:45 +00:00
silent_call.h large refactoring: support inter-BSC and inter-MSC Handover 2019-05-08 17:02:32 +02:00
sms_queue.h sms: Introduce VTY-configurable minimum SMS validity period 2022-05-19 19:34:41 +00:00
transaction.h SMS over GSUP: correctly route GSUP responses to MT SMS 2023-09-25 05:13:49 +00:00
transaction_cc.h report caller's file,line in trans_cc_filter_run() 2024-02-08 23:42:17 +01:00
vlr.h fix VLR evil twin on LU with unknown TMSI 2024-03-28 04:06:58 +01:00
vlr_sgs.h vlr_sgs: fix VTY setting for SGs counter. 2023-10-30 17:12:46 +01:00
vty.h ASCI: Add VTY to configure GCR (Group Call Register) 2023-07-21 12:28:03 +02:00