aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
AgeCommit message (Collapse)AuthorFilesLines
2018-01-10msc/gsm_04_80.h: use '#pragma once' instead of includesVadim Yanitskiy1-4/+1
This is a common include guard way for Osmocom projects. Change-Id: I5a12a742719d4deba0b9dfa8bb330c1986a727f6
2018-01-10msc/gsm_04_80.h: cosmetic: whitespace fixVadim Yanitskiy1-2/+2
Change-Id: Ia3632c75cf2d2ce79b42b3b55ef50a72ab1bb94c
2018-01-10msc/gsm_04_80.h: clean up useless declarationsVadim Yanitskiy1-4/+0
This change removes a few USSD specific declarations, which are not actually used now, and probably accidentally migrated from legacy OpenBSC. Change-Id: Id57a24b92790d3ce0f9c7343d060f511e2b979c7
2018-01-05Add control command to expire subscriberMax1-1/+1
It's equivalent of existing vty command: common part is extracted into shared helper function. Change-Id: I267886b7c79ed6d9c2f34a2e60d2972b7f4f4036
2017-12-31VLR: log subscriber updateMax1-0/+6
* move log helpers to generic header * log subscriber update It's handy for troubleshooting issues with subscriber update via GSUP from HLR. Change-Id: I1958aeeb3ea99831c7e2c5ee9a6b59834baf4520
2017-12-29VLR: remove unused parameterMax1-1/+0
The expire_lu is never used but is printed for every subscriber. Let's remove it to avoid confusion. Change-Id: I6f7ad1670836384d1e6a58f47a13464fdbbf8509
2017-12-20fix: properly cancel all Paging on IMSI DetachNeels Hofmeyr1-0/+1
It's not clear cut which code is responsible for canceling pending requests, since the requests list is kept in vlr_subscr, but sending out Paging does certainly not belong in the VLR. Place the requests cleanup in gsm_04_08.c. Add to test_ms_timeout_paging() in msc_vlr_test_ms_timeout.c to verify that a pending paging is canceled on IMSI Detach. Change-Id: Ib8874a9d92f02b0826525b55518332f6899688fd
2017-12-20fix paging: add timeout to discard unsuccessful pagingNeels Hofmeyr2-0/+3
Currently, if there is no reply from the BSS / RNC, a subscriber will remain as "already paged" forever, and is never going to be paged again. Even on IMSI Detach, the pending request will keep a ref count on the vlr_subscr. Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the 'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' / 'T3113' in OsmoBSC, but to not confuse the two, give this a different name.) Add test_ms_timeout_paging() test to verify the timeout works. I hit this while testing Paging across multiple hNodeB, when a UE lost connection to the hNodeB. I noticed that no matter how long I wait, no Paging is sent out anymore, and found this embarrassing issue. Good grief... The choice of 10 seconds is taken from https://osmocom.org/issues/2756 Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5
2017-12-20cosmetic: rename sccp_rx_udt and sccp_rx_dt to a_*Neels Hofmeyr1-2/+2
These rx functions are only used for the A interface, hence the names should not suggest general SCCP rx (which Iu also has). Change-Id: I6815c3d4dea4c2abfdff1cf0239ada6a9254f351
2017-12-18drop unused T* timers (BSC land, not MSC)Neels Hofmeyr1-25/+0
Change-Id: If27899c90b7c79f25cd5fd5e2429cb3012d69744
2017-12-18cosmetic prep: tell vlr_ops.set_ciph_mode() whether UMTS AKA is usedNeels Hofmeyr1-1/+2
In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth tokens. tuple->vec.kc was calculated from the GSM algorithm and is not necessarily a match for the UMTS AKA tokens. To decide (in an upcoming patch) whether to use UMTS AKA derived Kc or the Kc from the auth vector, the set_ciph_mode() from vlr_ops needs to know whether UMTS AKA is being used. This could possibly derived from the msc_conn_ref, but all flags are already available in the vlr_lu_fsm and vlr_access_req_fsm. Hence add a umts_aka flag to the set_ciph_mode() callback invocation. The VLR FSMs thus decide whether UMTS AKA or GSM AKA is to be used during Ciphering Mode Command, which makes more sense than re-implementing the same decision process in the MSC. I considered placing the Kc derivation in vlr_set_ciph_mode() and only tell the MSC's set_ciph_mode() implementation the precise keys it should use, but the RAN particulars, and whether a Kc is used at all, rather belong with the MSC. Related: OS#2745 Prepares: If04e405426c55a81341747a9b450a69188525d5c Change-Id: I983c48347faf4ee1b405d8174b4e006c904157cf
2017-12-18cosmetic prep: publish vlr_use_umts_aka() decisionNeels Hofmeyr1-0/+2
During Set Ciphering Mode on GERAN, it is required to know whether UMTS AKA is used to decide which Kc to pick. Change static function is_umts_auth() into public vlr_use_umts_aka(), so future patches can re-use it. Prepares: If04e405426c55a81341747a9b450a69188525d5c Change-Id: I85d784c62ecbabdb6186a3dae4dcd554e7921041
2017-12-18cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode()Neels Hofmeyr1-1/+2
a_iface_tx_cipher_mode() is a bit too far away from the VLR to be handling its ciphering enums. Instead, construct the gsm0808_encrypt_info in the msc_vlr_set_ciph_mode() callback. Greatly simplify the sanity checking code: a_iface_tx_cipher_mode() no longer needs to re-verify the presence of the gsm0808_encrypt_info contents. Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e
2017-12-18fix BSSMAP Cipher Mode Cmd: properly set permitted algorithmsNeels Hofmeyr1-0/+16
The bit shifting is performed in gsm0808_enc_encrypt_info(), and must not be done when populating the gsm0808_encrypt_info struct. Provide vlr_ciph_to_gsm0808_alg_id() to translate the enum vlr_ciph to the GSM0808_* constants we need to put in the gsm0808_encrypt_info struct instead. Related: OS#2745 Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a
2017-12-14compiler warning: drop double 'const' in a_iface_tx_cipher_mode()Neels Hofmeyr1-1/+1
Change-Id: I3b8baa9a259704e719ce7f12776f2d2125ebdef0
2017-12-05mncc: re-add lchan members to structsPhilipp Maier1-0/+4
The lchan related struct members do not serve any useful purpose in the msc code, since the lchan concept is not in the scope of osmo-msc. However, if removed te struct size will change which will lead into shortened protocol messages as well. This is is detected by osmo-sip-connector and eventually leads into a reject ofthe shortended protocol messages. Re add the missing struct members in order to maintain compatibility This commit reverts the changes made to mncc.h by commit: e2f24d53e4f80b34ec6d656d93127cb598229a96 Change-Id: Ia02373a36df7605507ee3de49173a9fd6547b726
2017-11-27subscr_conn: introduce usage tokens for ref error trackingNeels Hofmeyr2-4/+22
When hunting a conn use count bug, it was very hard to figure out who's (not) using the conn. To ease tracking down this bug and future bugs, explicitly name what a conn is being reserved for, and track in a bit mask. Show in the DREF logs what uses and un-uses a conn. See the test expectation updates, which nicely show how that clarifies the state of the conn in the logs. On errors, log them, but don't fail hard: if one conn use/un-use fails, we don't want to crash the entire MSC before we have to. Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b
2017-11-20sub_pres_vlr_fsm_start: fix heap use after freeNeels Hofmeyr1-3/+4
When sub_pres_vlr_fsm_start() is called, it dispatches an event which may in some cases already cause tear down and free of the parent FSM instance, after which storing the returned instance pointer in that parent's metadata will use freed memory. Instead, pass the target pointer to remember the instance at to sub_pres_vlr_fsm_start() and assign the pointer *before* firing the event. Explain so in a new comment. I haven't checked whether that pointer is actually used at all -- this is the easiest way to fix the use-after-free without getting sucked into semantic questions. Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04
2017-11-20rate_ctr: don't use . as separatorNeels Hofmeyr1-19/+19
Use ':' as separator, so that no mangled rate_ctr descriptions are allocated. When '.' is used, the rate_ctr mangling code creates tallocs of mangled counter descriptors, and hence affects the amount of expected talloc contexts in msc_vlr_tests.c. Change-Id: Ib1db8e3dc6c833174f1b0b1ca051b0861f477408
2017-10-31cosmetic: vlr: rename auth_tuple_max_use_count to _reuse_Neels Hofmeyr1-1/+1
The name auth_tuple_max_use_count suggests that if I want to use each auth tuple exactly once, I need to set it to 1. Curiously, so far you need to set to intended uses - 1. Reflect this in its name by renaming to auth_tuple_max_reuse_count. I first considered to not rename but change the if-conditions so that == 1 means each tuple is used once, and upon struct vlr allocation, set the default to 1. That would also logically entail that setting to 0 means to re-use vectors infinitely often, like now a value < 0 does. That means, when allocating a vlr struct zeroed out, we would by default have the most dangerous/unsafe configuration. It's no problem to set a default to 1 upon allocation, but by renaming the variable instead, we get safer alloc-zero behavior and don't need to change any conditionals in the code (even though the patch ends up considerably larger from all the renaming). Change-Id: I0b036cae1536d5d6fb2304f837ed1a6c3713be55
2017-10-16Remove pkg-config fileMax1-10/+1
It's an artefact of split which is unused anyway. Change-Id: I15c0b4457c108c7791b0f30b79660d9e6d09b269
2017-10-03remove further files and autotest/autoconf bits irrelevant to osmo-mscHarald Welte1-523/+0
Change-Id: I68e879e7474cbd3dd053f23bc4d5d22dc2748c5b
2017-09-15Remove unused osmo_bsc_rf.h headerMax2-67/+0
Change-Id: I7a668665b571d00a6a34629626ddbfb60b6c09cc
2017-09-15Remove BTS-specific attributesMax5-158/+2
Remove *bts_model_* functions as they are only useful to BSC. Change-Id: Ic80d11d6f8167b49a94fc9c6edbc5ff9fbe36587
2017-09-15Remove SI-related codeMax2-50/+1
Get rid of unused data structures and functions related to SI handling. Change-Id: I048885e85a9f97b8b071f3a3f1c362b54a44720e
2017-09-15Remove rest_octets.hMax6-144/+4
The MSC should not fiddle with low-level SI details like rest octets anyway. Unfortunately simply removing the header is impossible as it causes massive fallout due to missing includes. Fixed it as well. The only other parameter which required removal is cell_ro_sel_par which is not referenced anywhere in the code anyway. Change-Id: Ibff77330de056fad4288cd4c48d016aad8105354
2017-09-11a_iface: fix memory leaksPhilipp Maier1-1/+1
Fix multiple memory leaske in A/BSSMAP code Change-Id: I90703c96e6a266a1cfa60b184139375aeb9ae32d
2017-09-08use separated libosmo-mgcp-client, apply rename to mgcp_client_*Neels Hofmeyr1-4/+4
After osmo-mgw changes I8e0b2d2a399b77086a36606f5e427271c6242df1 and I99f7faab637cfcc22ece64a1dbcbe590f2042187, apply linking of new libosmo-mgcp-client and renames to drop the "gw" from mgcp_client_*. Also rename the gsm_network.mgcpgw to mgw, to indicate that the MGCP client is used to contact the MGW (Media Gateway). Depends: I8e0b2d2a399b77086a36606f5e427271c6242df1 (osmo-mgw) I99f7faab637cfcc22ece64a1dbcbe590f2042187 (osmo-mgw) Change-Id: I093ad02ca0e532f659447c785e09678b3e6f220d
2017-09-06rename include/openbsc to include/osmocom/mscNeels Hofmeyr75-0/+6564
Change-Id: I1f96a1285bbd1b4607614856bca935d5c26e2da9