aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2022-10-27msc_a,vlr: add is_ciphering_required (accurately named)Neels Hofmeyr2-0/+3
For establishing Layer 3, pass a flag from msc_a to VLR that indicates to fail if encryption is not possible. An earlier patch [1] renamed a previously existing flag require_ciphering to is_ciphering_to_be_attempted, because the naming was not accurate. This new flag now indicates what its name suggests. This new flag is needed for upcoming patch [2] to distinguish between optional and mandatory encryption. [1] Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9 [2] I5feda196fa481dd8a46b0e4721c64b7c6600f0d1 Related: OS#4830 Change-Id: I52090c5f5db997030da7c2ed9beca9c51f55f4cf
2022-10-27msc_a,vlr: rename ciphering_required to is_ciphering_to_be_attemptedNeels Hofmeyr2-3/+3
Clarify the name to avoid confusion in upcoming patches. This function actually returns whether any ciphering mode besides A5/0 is enabled, and does not imply that ciphering is mandatory. A5/0 may well be allowed when this function returns true. Related: OS#4830 Change-Id: Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
2022-10-19Introduce support for libosmo-mgcp-client MGW poolingPau Espin Pedrol2-1/+5
Large RAN installations may benefit from distributing the RTP voice stream load over multiple media gateways. libosmo-mgcp-client supports MGW pooling since version 1.8.0 (more than one year ago). OsmoBSC has already been making use of it since then (see osmo-bsc.git 8d22e6870637ed6d392a8a77aeaebc51b23a8a50); lets use this feature in osmo-msc too. This commit is also part of a series of patches cleaning up libosmo-mgcp-client and slowly getting rid of the old non-mgw-pooled VTY configuration, in order to keep only 1 way to configure libosmo-mgcp-client through VTY. Related: SYS#5091 Related: SYS#5987 Change-Id: I7670ba56fe989706579224a364595fdd4b4708ff
2022-10-03mncc: move MNCC_F_ALL from mncc.c to mncc.hVadim Yanitskiy1-0/+3
Move it closer to the other MNCC_F_* entries, so that it's more likely that it gets updated when new flags are added. Change-Id: If1a12a696b87184c9eee14f475594c317927427b Related: OS#5282
2022-09-15cosmetic: use proper name for SMPP handlersMax1-2/+2
Change-Id: I0d714e927e287a0ea9362008ed050a492510e22b
2022-09-15Use libsmpputil functions in smpp_mirror toolMax1-0/+2
Related: OS#5568 Change-Id: Icb046570803acb3eff89e2a4eb979c4899d485f7
2022-09-15Make esme struct sharedMax3-24/+31
This helps to merge similar code from smpp_mirror and smpp_* in follow-up patches. Related: OS#5568 Change-Id: I8f7ac2c00d16660925dd0b03aa1a0973edf9eb70
2022-08-05Add ESME-specific loggingMax1-0/+6
Related: OS#5568 Change-Id: Ie5ddde762350385f8d18ee1d441584a41b0290ec
2022-08-05Introduce libsmpputilMax6-5/+194
As part of preparation for libosmo-netif migration let's move common SMPP code into separate build-time library and use it for both smpp_mirror and OsmoMSC renaming the files if necessary. While at it we also fix id/password legth limits in smpp_mirror and drop unused fields from ESME struct. Related: OS#5568 Change-Id: I61910651bc7c188dc2fb67d96189a66a47e7e8fb
2022-07-25sdp_msg: s/sdp_audio_codec_/sdp_audio_codecs_Neels Hofmeyr1-9/+9
Some functions act on a struct sdp_audio_codecs but begin with the name sdp_audio_codec (singular). That's confusing. Related: SYS#5066 Change-Id: Id87eb350c1f17f8dbf776909824bfa06634c1d04
2022-07-25sdp_msg: add sdp_audio_codecs_cmp(), add compare flagsNeels Hofmeyr1-1/+4
A problem with SDP fmtp handling is visible in this patch: when cmp_fmtp is true, we compare fmtp strings 1:1, which is not how things should be done. The intention is to fix fmtp handling in a later patch. At least there now is a flag to bypass fmtp comparison altogether. Related: SYS#5066 Change-Id: I18d33e189674229501afec950aa1c732386455a2
2022-07-25sdp_msg: s/_name_/_to_str_/gNeels Hofmeyr1-11/+11
foo_name is intended for a short id, foo_to_str is more accurate naming here. Related: SYS#5066 Change-Id: I21d73b2e2633dd4841ff69a0c5fdf9b1a4c0615f
2022-05-19sms: Introduce VTY-configurable minimum SMS validity periodHarald Welte1-0/+1
This is meant as a safeguard against users or user equipment which doesn't set a reasonable validity period. Using this setting, the SMSC administrator can set a minimum SMS validity period. Any SMS submitted with lower validity period will be extended to that minimum. Change-Id: I192528a6f9059d158fa12876a247d61bd7edaec8 Related: OS#5567
2022-05-19sms: Make default SMS validity period configurable via VTYHarald Welte1-0/+1
Change-Id: Ie2c81c1d5795dd9aaf07b9766013f20b01abc762
2022-05-19sms_queue: Make deletion of messages from DB VTY-configurableHarald Welte1-0/+4
This introduces some VTY settings that determine if delivered or expired messages should be removed from he SQL database or not. Change-Id: Id6174875d5c01c40d987077651b27ae1acbcaa93
2022-05-19sms: Give smsc its own VTY config nodeHarald Welte2-2/+2
The pre-historic sms_queue code used to have very strange aspects, such as having some parameters (max-failure, max-pending) which could only be sent from the 'enable' node, but not from a config file. Before adding more configuration parameters, let's clean this up by introducing a proper VTY config node for the 'smsc'; move the existing config commands there and add new ones for max-failure and max-pending. As the sms_queue data structure is only allocated after the config file parsing happens, we are introducing a new 'sms_queue_config' data structure. This encapsulates the public readable/writable config parameters. Change-Id: Ie8e0ab1a9f979337ff06544b9ab3820954d9804a
2022-05-17sms: Encapsulate SMS queue related config parametersHarald Welte2-2/+12
Introduce a 'struct sms_queue_config' that holds all config parameters related to the SMS queue. Change-Id: I559ab7a6e0502a1a12a662ebd5591875d47ec7b2
2022-05-17switch from libdbi to lbsqlite3Harald Welte1-4/+5
The choice of libdbi was one of the biggest early mistakes in (back then) OpenBSC development. A database abstraction library that prevents you from using proper prepared statements. Let's finally abandon it and use sqlite3 directly, just like we do in osmo-hlr. I decided to remove the database migration code as it would be relatively cumbersome to port all of it to direct sqlite3 with prepared statements, and it is prone to introduction of all kinds of errors. Since we don't have a body of older database files and comprehensive migration tests, it is safer to not offer migration code of uncertain quality. The last schema revision (5) was introduced 5 years ago in 2017 (osmo-msc v1.1.0), so it is considered an exceptionally rare case. People can install osmo-msc 1.1.0 through 1.8.0 to upgrade to v5 before using this new 'direct sqlite3' version of osmo-msc. Change-Id: Ia334904289f92d014e7bd16b02b3b5817c12c790 Related: OS#5559, OS#5563, OS#5564
2022-05-15vlr: Add rate counters and stat itemsHarald Welte1-0/+4
This should give us some more insight into what is happening inside the MSC's VLR in terms of number of subcribers, rate of successful / unsuccessful GSUP procedures, etc. Related: OS#1974 Change-Id: I681bcfc1875363478190151f2931cad197323ee8
2021-12-14treewide: remove FSF addressOliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I1b68e0aa26d81fbfe26abaa287d2bd5eec2cfd0f
2021-11-30libvlr: vlr_set_ciph_mode(): avoid redundant checkVadim Yanitskiy1-1/+0
This function is never called when ciph_required is false, so there is no need for an additional check in this function. Change-Id: I900ddd5f1882f8cee234ab1074adcf25830a092c
2021-11-27libmsc/gsm_04_08: refactor require ciphering into an own functionAlexander Couzens2-0/+2
Make it more readable. Change-Id: I9e407f65b282e645feabe714f7f4c3e44fae21e9
2021-11-05Validate the choosen UTRAN encryption algorithmAlexander Couzens1-0/+6
RANAP Security Command can include an encryption IE. If it includes it the RNC can still ignore it (e.g. unsupported encryption) and return the Security Command Complete with an choosen encryption IE: "no encryption". Validate the encryption element and ensure the encryption is included in the encryption mask. Closes: OS#4144 Change-Id: Icfc135c8b8ae862defe7114db492af600c26407f
2021-11-05Make UTRAN encryption algorithms configurableHarald Welte2-5/+3
Allow the user fine-grained control over which UMTS encryption algorithms are permitted, rather than always permitting UEA1 and UEA2 or neither. This brings the handling of UEA in line with the handling of A5 for GERAN. Change-Id: I91f9e50f9c1439aa19528f887b83ae9de628fcfd Closes: OS#4144 Depends: osmo-iuh.git I6d2d033b0427bdc84fee61e0f3cb7b29935214bf
2021-11-05Fix enabling of UMTS UEA encryptionHarald Welte1-0/+3
The existing code allowed the user to configure UMTS encryption in the vty, but we never actually passed this information down to RANAP. As a result, the RAN had no chance of ever enabling encryption on the air interface. Change-Id: Ieaaa6b23b7337b7edb902fad8031e195e0c5e9d2 Related: OS#4144
2021-11-03mncc: rework passing GCR over the MNCC interfaceVadim Yanitskiy1-2/+5
Using *unpacked* 'struct osmo_gcr_parsed' in the MNCC PDUs makes the protocol even more complicated than it currently is, and moreover complicates implementing MNCCv8 in the ttcn3-sip-test. Replace 'struct osmo_gcr_parsed' in 'struct gsm_mncc' with a fixed-length buffer, which is supposed to hold the Global Call Reference encoded as per 3GPP TS 29.205. Indicate presence of GCR using the MNCC_F_GCR flag. Change-Id: I259b6d7e4cbe26159b9b496356fc7c1c27d54521 Fixes: I705c860e51637b4537cad65a330ecbaaca96dd5b Related: OS#5164, OS#5282
2021-10-25Add support for LCLS to the MSCKeith Whyte5-2/+12
This commit is largely based on work by Max <msuraev@sysmocom.de> Adds LCLS parameters for A-interface transactions This commit also adds a vty option to facilitate globally disabling LCLS for all calls on this MSC. Add a global call reference (GCR) to MNCC and therefore bump the MNCC version to version 8. (This commit has to be merged at the same time as the corresponing commit in the osmo-sip-connector for mncc-external use.) Depends: osmo-sip-connector Id40d7e0fed9356f801b3627c118150055e7232b1 Change-Id: I705c860e51637b4537cad65a330ecbaaca96dd5b
2021-08-24vlr_sgs: Balance use_count incremented in vlr_sgs_loc_updatePau Espin Pedrol1-1/+1
During a recent pcap trace, it was spotted that subscriber coming from SGs had a use count with 16 "SGs" items, and later it incremented to 17. Further investigation shows that the related use_count item was never decreased, meaning every time an SGs-LU was sent by the MME, the item was incremented further and never decremented. Let's rename the item to be referenced while in LU, and then decremented when LU is done. At that time, either the LU was accepted and the subscriber object has a use_count item "attached", or it was rejected and we already sent the reject messages, so we are fine deleting it if needed. Related: SYS#5337 Change-Id: I22c386f02ffa57428f700b003cc2cf23133598d0
2021-08-24vlr_sgs.h: Set proper logic order of items in enum sgs_ue_fsm_statePau Espin Pedrol1-1/+1
Set order of states in the same order as they appear in the specs (see chapter 4.2.2 mentioned above the enum). Furthermore, from FSM state transition point of view it also makes sense to put them in this new order, since one should pass through SGS_UE_ST_LA_UPD_PRES to get to SGS_UE_ST_ASSOCIATED. Change-Id: Ia9216965e9f30caedffa3cb53d14da7f7fd37b4e
2021-07-29implement CM Re-Establish for voice callsNeels Hofmeyr3-0/+6
Related: SYS#5130 Change-Id: I6fa37d6ca9fcb1637742b40e37b68d67664c9b60
2021-07-28add vlr_subscr_find_by_miNeels Hofmeyr1-0/+8
Will be used by I6fa37d6ca9fcb1637742b40e37b68d67664c9b60 "implement CM Re-Establish for voice calls" Related: SYS#5130 Change-Id: I5291d098a02268bd1c2e30195ae61e4a13e8709c
2021-06-24support A5/4 in Cipher Mode CommandNeels Hofmeyr1-0/+2
Related: SYS#5324 Change-Id: I780a739b9bfbefd4f58be051794fe1a491823e67
2021-04-29Fill Last Used E-UTRAN PLMN Id when in CSFBPau Espin Pedrol3-1/+7
Since recently, osmo-bsc behaves strictly as per specs, meaning it will only send the "Cell selection indicator after release of all TCH and SDCCH IE" in RR Channel Release iff: * "Last Used E-UTRAN PLMN Id" was received in the CommonID sent MSC->BSC * "Last Used E-UTRAN PLMN Id" was received insider "old BSS to new BSS Information" in the HandoverRequest sent MSC->BSC. On the other hand, CSFB_Indicator from ClearCommand MSC->BSC is nw ignored and not taken into account. Hence, let's update osmo-msc to also behave correctly by sending the Last Used E-UTRAN PLMN ID at CommonID tx time to avoid regressions in CSFB support when running against newer osmo-bsc. Let's keep sending the CSFB Indicator in ClearCommand as we used too, in order to keep compatibility with older BSCs (as per spec). Related: SYS#5337 Change-Id: Ic5f175b179973d0a50d94f00e15f5a3e332605fc
2021-02-18gsm_network: drop unused neighbor_list memberNeels Hofmeyr1-4/+2
Change-Id: I57463ab94773de1377526f9a1c72fe3d37a31827
2020-09-26Convert paging response timer into an osmocom own X4 timerAlexander Couzens1-2/+0
All timeout values should use tdef. Change-Id: Ic050eb49ba0c5811b43d8d8b44145a1115fd8546
2020-09-25fix comment in ran_peer.hNeels Hofmeyr1-1/+1
Change-Id: Iff985dfe28265d32cae6a931636d5018a439d39e
2020-09-25drop duplicate ran_peer_find() vs ran_peer_find_by_addr()Neels Hofmeyr1-2/+1
This is the same function existing twice with different names. Keep only one. Change-Id: If54b54fa61ece0f95564d403e1439fc5f5ededdf
2020-09-14mncc: Support IPv6 addresses (new version mncc 7)pespin/ipv6Pau Espin Pedrol1-3/+3
Change-Id: I6002b648bcb2055dcbbdae3f688f6e2cb7282b7f
2020-08-28vty: allow configuring db path from cfg fileKeith Whyte1-0/+2
So far, the cmdline argument was the only way to set a database file. Add a similar config to VTY as 'msc' / 'sms-database'. The cmdline arg is stronger than the 'database' cfg item. DB is not reloaded from VTY command. Change-Id: I18d954c30fcceb0b36a620b927fd3a93dcc79f49
2020-07-01refactor: move RESET Osmux TLV parsing to ran_msg_a.cNeels Hofmeyr3-4/+9
ran_peer.c is not the proper place to parse messages, because it should be RAN agnostic. All parsing and encoding belongs in ran_msg_a.c and ran_msg_iu.c. Move the Osmux TLV parsing into the is_reset_msg op: add supports_osmux out-parameter (and add a logging fi pointer). To be able to modify msg->l3h, also make the msgb arg non-const. In ranap_is_reset_msg(), always return non-support for Osmux. In bssmap_is_reset_msg(), return 0 if no TLVs were parsed, 1/-1 if an Osmux TLV was present/not present. Update the osmux support flag directly where the ConnectionLess message is received, so that there is only one place responsible for that. Related: OS#4595 Change-Id: I1ad4a3f9356216dd4bf8c48fba29fd23438810a7
2020-06-22msc_a: add callref as call id to ASSIGNMENT REQ.Philipp Maier1-0/+2
The BSSMAP message ASSIGNMENT REQUEST may contain an optional CALL IDENTIFIER IE. While this IE is optional some BSC implementions may require it. Change-Id: I4288f47e4a6d61ec672f431723f6e72c7c6b0799 Related: OS#4582
2020-06-19add rudimentary NRI support for MSC poolingNeels Hofmeyr1-0/+2
This patch served for a manual testing counterpart for osmo-bsc to implement MSC pooling. This enables a basic MSC pooling setup, but for a production setup, osmo-msc would still lack various features related to unloading subscribers to another MSC as explained in 3GPP TS 23.236. Change-Id: Iafe0878a0a2c8669080d757b34a398ea75fced36
2020-06-19use new osmo_mobile_identity API everywhereNeels Hofmeyr3-5/+6
Depends: Ic3f969e739654c1e8c387aedeeba5cce07fe2307 (libosmocore) Change-Id: Idfc8e576e10756aeaacf5569f6178068313eb7ea
2020-01-29libmsc/gsm_04_11.h: remove unused sms_deliver definitionVadim Yanitskiy1-18/+0
Change-Id: Icd4b0c45d994dd02d9118890eb5a1261a2008eca
2020-01-27msc/sccp_ran.h: fix: do not pass -1 to osmo_rat_type_name()Vadim Yanitskiy1-2/+2
The problem is that osmo_rat_type_name() calls get_value_string(), so we first cast -1 to 'const enum osmo_rat_type' and then to 'uint32_t'. Let's rather use OSMO_RAT_UNKNOWN. Found by GCC with -Wextra in CFLAGS: warning: operand of ?: changes signedness from ‘int’ to ‘const enum osmo_rat_type’ due to unsignedness of other operand [-Wsign-compare] Change-Id: I63ba355102d3cc035ba90121e06aba7cf1776aa0
2020-01-25libmsc: move subscriber expiration timer T3212 to libvlrVadim Yanitskiy1-3/+0
Since the split of OsmoNiTB, OsmoMSC does not deal with the radio access network directly. Therefore the only purpose of T3212 is to control subscriber expiration in the local VLR. The timeout value indicated in System Information Type 3 needs to be configured separately in the BSC/RNC. This means that we don't need to store it in deci-hours anymore. Let's move T3212 to the group of VLR specific timers, so it can be configured and introspected using the generic 'timer' command, and deprecate the old '[no] periodic location update' command. It should be also noted that in the old code subscriber expiration timeout was actually set to twice the T3212 value plus one minute. After this change, we apply the configured value 'as-is', but keep the old behaviour for 'periodic location update' command. Change-Id: I9b12066599a7c834a53a93acf5902d91273bc74f
2020-01-25libvlr: use generic osmo_tdef API for T3250, T3260, and T3270Vadim Yanitskiy2-8/+1
These timers so far were implemented as a list of unsigned integers, which has never been initialized to any reasonable defaults. Since they are used as state timeouts in several FSMs, we might end up staying in some state forever. Let's migrate to generic osmo_tdef API and use default values from table 11.2 of 3GPP TS 24.008. This way the user can introspect and change their values from the VTY / configuration file. Change-Id: Ia8cf98da0aea0e626c5ff088a833d7359c43847f Related: OS#4368
2020-01-25VTY: add osmo_tdef introspection and configuration commandsVadim Yanitskiy1-0/+4
This change introduces several new VTY commands letting the user a possibility to introspect and reconfigure some of the existing timers implemented using libosmocore's osmo_tdef API. At the moment this covers the following timers: - MGW specific timers: - X1 - MGCP response timeout, - X2 - RTP stream establishing timeout, - RAN specific timers (same names for GERAN and UTRAN): - X1 - Authentication and Ciphering timeout, - X2 - RAN connection release sanity timeout, - X3 - Handover procedure timeout. The following commands are introduced: - 'enable' node: - show timer [(mgw|mncc|sccp|geran|utran|sgs)] [TNNNN] - 'config-msc' node: - timer [(mgw|mncc|sccp|geran|utran|sgs)] [TNNNN] [(<0-2147483647>|default)] Both MNCC and SCCP related timer definitions are empty at the moment. Achieved by using osmo_tdef_group API of libosmovty. Change-Id: I6024c104b6101666c8aa1108a043910eb75db9a5 Related: OS#4368
2020-01-20msc/signal.h: remove unused (since the NiTB split up) signalsVadim Yanitskiy1-9/+0
Change-Id: I3848d0db3c62de7613f609ad632641eb54453817
2020-01-19libvlr: remove unused 'periodic_lu_timer' from struct vlr_subscrVadim Yanitskiy1-1/+0
It's never used anywhere in the code. Change-Id: I1b322b57fa0fd17ae2ebe1a2af2d8a93d81e14f0