aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2020-06-24propagate Compl L3 Info Cell ID to the VLR subscriber recordNeels Hofmeyr1-0/+6
As soon as the subscriber is authenticated, update the VLR entry with the MSC-A's full CGI, including the Cell Id received from the Complete Layer 3 Information. Thus the Cell Id will be shown by vty 'show subscriber cache' and 'show connection'. This is tested by osmo-ttcn3-hacks Ie410714a96353f74a52a104c56fa0a08683e0004. Related: OS#4627 Change-Id: Iee1781985fb25b21ce27526c6a3768bf70d4dc9a
2020-06-24vty 'show connection': show msc_a->via_cell instead of vsub->cgiNeels Hofmeyr1-1/+1
For 'show subscriber cache', we print vsub->cgi. For 'show connection', it makes more sense to print msc_a->via_cell. This is tested by osmo-ttcn3-hacks Ie410714a96353f74a52a104c56fa0a08683e0004. Related: OS#4627 Change-Id: I194271af2acb37b4f8cc2d106ab2fd2b0d443589
2020-06-24add comments to clarify some complete l3 detailsNeels Hofmeyr2-1/+9
Change-Id: I6e289900d38d97c346d615b71d36656254e6f2b5
2020-06-23add osmo-msc --vty-ref-xml: dump VTY ref XML to stdoutNeels Hofmeyr1-8/+20
Add only a long option to not clutter the cmdline namespace. To add a long option without a short letter is slightly complex: use the 'flag' and 'val' mechanism as in 'man 3 getopt' to write an option index to long_option. Make sure that all VTY commands have been added before parsing cmdline options: move various VTY init further above. For msc_vty_init(), the global msc_network already needs to be allocated, so also move that. Depends: Ic74bbdb6dc5ea05f03c791cc70184861e39cd492 (libosmocore) Change-Id: I9146d5a44427509265420f52ae6540ad93eb14fc
2020-06-22msc_ho: fix CALL IDENTIFIER in HANDOVER REQUESTPhilipp Maier2-0/+4
When msc_ho_send_handover_request() generates the HANDOVER REQUEST message, it does not populate the call_id struct member. In ran_msg_a.c the struct member call_id is used, but the call_id_present flag is not set, which also prevents the call_id being added to the message Change-Id: I6b1b55b3f5a3092d9557dc2512020c766a9ff744 Related: OS#4582
2020-06-22msc_a: add callref as call id to ASSIGNMENT REQ.Philipp Maier2-1/+7
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-22remove empty + unused ran_up_l2.cHarald Welte1-0/+0
Change-Id: I5a0fa6a78dd8f32912afc69f4b154caad44a9e78
2020-06-19add rudimentary NRI support for MSC poolingNeels Hofmeyr2-0/+89
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 Hofmeyr7-182/+157
Depends: Ic3f969e739654c1e8c387aedeeba5cce07fe2307 (libosmocore) Change-Id: Idfc8e576e10756aeaacf5569f6178068313eb7ea
2020-06-18msc_vty: remove emergency-call command from networkPhilipp Maier1-5/+0
when the VTY write the config file ist prints the configuration line for emergency-call in network and in msc, however the presence of the configuration line in network leads to a parsing error on msc startup. The vty command probably got moved to node msc and it was forgotten to remove the printing from network. Change-Id: I4f3dac27723e7852f8f049fcfca5cccdc027734d Related: OS#4548
2020-06-03vlr_subscr_rx_id_resp(): dont assert on received MI typeNeels Hofmeyr1-2/+3
The Mobile Identity type is received on the wire, we asserting on its type constitutes a DoS vector. Change-Id: I2b2e25ef8e878e91a165018ba49f1609cfb5cbd0
2020-05-19ran_msg_iu.c: Avoid redefining osmo-iuh global variablesPau Espin Pedrol1-10/+0
From ASAn on gcc 10.1.0: +================================================================= +==269368==ERROR: AddressSanitizer: odr-violation (0x559114a5b880): + [1] size=4 'asn1_xer_print' /git/osmo-msc/src/libmsc/ran_msg_iu.c:50:5 + [2] size=4 'asn1_xer_print' /git/osmo-iuh/src/iu_client.c:85:5 +These globals were registered at these points: + [1]: + #0 0x7f6208d3869a in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341 + #1 0x55911456d221 in _sub_I_00099_1 (/build/new/tmpdir/osmo-msc/tests/msc_vlr/msc_vlr_test_hlr_timeout+0x48d221) + #2 0x5591145e8e9c in __libc_csu_init (/build/new/tmpdir/osmo-msc/tests/msc_vlr/msc_vlr_test_hlr_timeout+0x508e9c) + + [2]: + #0 0x7f6208d3869a in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341 + #1 0x7f6207d8db91 in _sub_I_00099_1 (/build/new/out/lib/libosmo-ranap.so.3+0x47db91) + #2 0x7f62096eb0f1 in call_init.part.0 (/lib64/ld-linux-x86-64.so.2+0x110f1) + +==269368==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 +SUMMARY: AddressSanitizer: odr-violation: global 'asn1_xer_print' at /git/osmo-msc/src/libmsc/ran_msg_iu.c:50:5 +==269368==ABORTING Related: OS#4556 Change-Id: I702e9748eaaf2279c3764ba67f80f00ae9f2526f
2020-05-09Use OSMO_FD_* instead of deprecated BSC_FD_*Pau Espin Pedrol2-11/+11
New define is available since libosmocore 1.1.0, and we already require 1.3.0, so no need to update dependenices. Let's change it to avoid people re-using old BSC_FD_* symbols when copy-pasting somewhere else. Change-Id: Ifc89fffac0443d94f3e49555684975b293ef90fb
2020-04-26SMS-over-GSUP: notify sender in case of RPL delivery failureVadim Yanitskiy1-1/+1
Change-Id: I8436601c4314395e28829960dc753778c37b1125
2020-04-26SMS-over-GSUP: notify sender about malformed GSUP messagesVadim Yanitskiy1-4/+3
Change-Id: I27f00e69ff045cbf641ef21adf44fcd55cb8f889
2020-04-26SMS-over-GSUP: notify sender about unhandled GSUP messagesVadim Yanitskiy1-0/+1
Change-Id: I7970349bd9d5c56a64c409e619e8b581682fef0b
2020-04-26SMS-over-GSUP: respond with error if net->sms_over_gsup is falseVadim Yanitskiy1-1/+1
Change-Id: If14f8a394e691f86e0acbffb283c3862fe62ffd2
2020-04-26SMS-over-GSUP: move net->sms_over_gsup check to gsm411_gsup_rx()Vadim Yanitskiy1-16/+8
Change-Id: I89988b7148b164af304ecae1f53b74f322fdc7bd
2020-04-26SMS-over-GSUP: clarify error message about unexpected MO/MT SMSVadim Yanitskiy1-4/+4
Change-Id: I34b25764f9ce9b09ccd28cf23fea01028d0828e0
2020-04-20vlr_auth_fsm: Fix compilation with gcc-10Harald Welte1-1/+1
See also: https://alioth-lists.debian.net/pipermail/debian-mobcom-maintainers/Week-of-Mon-20200413/000650.html Change-Id: If3fdbfa20dec02ba57c582700dff12ebbb7d9439
2020-03-09fix segfault: unsolicited Paging ResponseNeels Hofmeyr1-0/+5
Do not crash when a Paging Response could not be associated with a VLR subscriber. Related: OS#4449 Change-Id: Ie117949dd6da86afaa1a0a6ac57bf2111f6cff43
2020-02-09libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned valueVadim Yanitskiy1-1/+1
Change-Id: I57ed17d8457ada69a3c22233f30339d2c0f65bce Fixes: CID#206075
2020-01-29osmo-msc: use stderr to print error messages, not stdoutVadim Yanitskiy1-11/+12
Change-Id: I702dd054d2e881b526f701ca482ec0f64ba8da28
2020-01-27libmsc/gsm_04_08: use DRR in gsm48_rx_rr_pag_resp(), not DMMVadim Yanitskiy1-3/+3
Change-Id: I006c2b4c684dc6b96e98dbb82063a0aa37e33c66
2020-01-27libmsc/gsm_04_08: make use of msc_a in gsm48_rx_rr_app_info()Vadim Yanitskiy1-2/+3
Change-Id: I2a0991c9bbf86b7eb248d74334f9472c56a3c964
2020-01-27VTY: cosmetic: make struct cmd_node for GSMNET_NODE staticVadim Yanitskiy1-1/+1
We don't need to expose it anyway. Change-Id: Icbaed6b3b15aa719a19bb4be8fed347073025a22
2020-01-27vlr_sgs_fsm: add missing break, do not call to_null() twiceVadim Yanitskiy1-0/+1
Change-Id: Ib5d1d7633ca6c32d7d63bb1481f51355c97b90fb
2020-01-27vlr: remove unused parameter 'log_level' of auth_fsm_start()Vadim Yanitskiy4-4/+2
We unconditionally use logging level of the parent FSM anyway. All callers of auth_fsm_start() always pass fi->log_level. Change-Id: If2fdf2564eb56d3d94ec3800bdcb0aabcad4e48d
2020-01-25libmsc: move subscriber expiration timer T3212 to libvlrVadim Yanitskiy3-39/+41
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-16/+14
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 Yanitskiy2-0/+22
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-25VTY: mark 'subscriber create imsi' command as deprecatedVadim Yanitskiy1-7/+6
Neither it should appear in the interactive VTY nor in documentation. Change-Id: I208faab69a40948af5d081edbeaf75f586dfb2e4
2020-01-19osmo-msc: fix: properly initialize default values for MGW timersVadim Yanitskiy1-1/+3
Otherwise they're all set to 0, if not configured in the VTY. Change-Id: I4a0823c2f0ca50ed7407fb0457c54a485799c585
2020-01-15libmsc: SMS, Avoid premature RP-ACK to MSPablo Neira Ayuso2-2/+12
There was one libmsc commit to openbsc that was thus far missing in osmo-msc. This commit completes the work on delayed response from an ESME. Without this patch, the SMR sends an RP-ACK to the mobile station, and subsequently a DELIVER_SM_REPONSE from the ESME provokes either a second RP-ACK, or an RP-ERROR; both of which result in "unhandled at this state (IDLE)" from the SMR After this patch, we have two things corrected: 1) RP-ERROR respects Deliver-SM error cause. 2) No more "unhandled as this state" error from the SMR Extract from original commit message: -------- libmsc: annotate esme route in the sms object from deliver_to_esme() Annotate this esme route, so we can use it to return -EINPROGRESS to skip sending premature RP-ACK to the mobile station, in case we're handling sms routes through SMPP. -------- Fixes: #OS4351 Change-Id: Ic34d398e0a850856e20380ae35e5c2ae5e3c539b
2020-01-13Trivial: code simplification, return earlyKeith Whyte1-19/+19
This commit also, (for what it is worth) removes a difference to the same file in openbsc, which I found while looking for changes that affected SMPP delivery. This is essentially a "forward-port" of [1] [1] https://gerrit.osmocom.org/#/c/openbsc/+/3899/ Change-Id: I350c19f5bb70b2656171c096334c2ee83f49df7e
2020-01-11Use GSM411_RP_* and not GSM48_CC_*Keith Whyte1-2/+3
d34ed5768cccab57e879bd32f38872d290c9ae89 introduced comparison of GSM411_RP_CAUSE_MO_NUM_UNASSIGNED with GSM48_CC_CAUSE_UNASSIGNED_NR For consistency lets use the GSM411_RP constants in SMS related code. Change-Id: Ie54966560f66d2dcde905feb2eb19ef90406acd1
2020-01-06vlr.c: fix condition to check MSISDN presenceNeels Hofmeyr1-1/+1
msisdn_enc is a buffer, its address is always != 0 Change-Id: Ib2294d2cd339c36df599d7d134f979a572ac308a
2020-01-06vlr_gsup_rx: fix uninitialized rcNeels Hofmeyr1-1/+1
Change-Id: Id7776a473b8356d1d136d78736698f20accc7a36
2020-01-05libmsc/gsm_04_08.c: fix: verify MI before calling vlr_subscr_rx_id_resp()Vadim Yanitskiy1-0/+36
During the last congress, we have noticed that OsmoMSC crashes on receipt of malformed MM Identity Response messages: BSSAP Message Type: Direct Transfer (0x01) Data Link Connection Identifier 00.. .... = Control Channel: not further specified (0x0) ..00 0... = Spare: 0x0 .... .000 = SAPI: RR/MM/CC (0x0) Length: 11 GSM A-I/F DTAP - Identity Response Protocol Discriminator: Mobility Management messages (5) .... 0101 = Protocol discriminator: Mobility Management messages (0x5) 0000 .... = Skip Indicator: No indication of selected PLMN (0) 01.. .... = Sequence number: 1 ..01 1001 = DTAP Mobility Management Message Type: Identity Response (0x19) Mobile Identity - Format Unknown Length: 8 .... 1... = Odd/even indication: Odd number of identity digits .... .111 = Mobile Identity Type: Unknown (7) <-- This makes OsmoMSC crash [Expert Info (Warning/Protocol): Unknown format 7] [Unknown format 7] [Severity level: Warning] [Group: Protocol] The value '111'B is not a valid Mobile Identity type, and shall be considered as reserved according to 3GPP TS 24.008, section 10.5.1.4. Later on it was discovered that '000'B also crashes OsmoMSC in the same way. The crash itself is provoked by OSMO_ASSERT(0) in vlr_subscr_rx_id_resp(). Let's keep that assert in there, and make sure that: - on receipt of MM Identity Response, Mobile Identity type matches the one in MM Identity Request; - on receipt of RR Ciphering Mode Complete, Mobile Identity contains IMEI(SV) if present. Change-Id: Ica4c90b8eb4d90325313c6eb400fa4a6bc5df825 TTCN-3 test case: I62f23355eb91df2edf9dc837c928cb86b530b743 Fixes: OS#4340
2019-12-19libmsc/gsm_04_11_gsup.c: fix SM-RP-OA encoding for MO SMS over GSUPVadim Yanitskiy1-6/+12
We shall not include additional BCD length octet into the value part of SM-RP-OA (Originating Address) IE. Instead, there should be ToA/NPI header (1 octet). Since we do not get ToN/NPI fields from the VLR/HLR, let's assume the following default values: 1... .... = Extension: No extension .001 .... = Type of number: International (1) .... 0001 = Numbering plan: ISDN/telephone (E.164/E.163) (1) Change-Id: I0f32e2af0ed2d2fea6addf45efbdfee120c2425d TTCN-3 test case: Ib467eeca6439bc6cce72293fbb5bb48f6d233db9 Related: OS#4324
2019-12-19libmsc/gsm_04_11_gsup.c: do not init a buffer in gsm411_gsup_mo_fwd_sm_req()Vadim Yanitskiy1-1/+1
Because there is no real need for that. Change-Id: I19d4d0de0d5a46bf1de194b966f18ea8a84ced94
2019-12-12sms log tweakNeels Hofmeyr1-1/+1
Change-Id: I77e7a1501f74b9045f032c5b6c2322025a11fd59
2019-12-12sms db: when storing an SMS, retrieve the IDNeels Hofmeyr1-0/+3
seemed like a good idea, but not sure if we need it at all. Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf
2019-12-12gsup: indicate CN-Domain in SendAuthInfo RequestsNeels Hofmeyr1-0/+1
In order for osmo-hlr to be able to 100% guarantee distinct INDs for CS and PS, set CN-Domain = CS in all SendAuthInfo Requests. In Milenage auth, it is highly desirable that osmo-hlr guarantees use of distinct INDs for CS and PS domains. If an MSC and SGSN attached at the same time use the same IND bucket to generate Milenage SQN, that collision would rapidly waste SQNs and load osmo-hlr with requesting new auth tuples on each CS/PS Complete-Layer3. So far, osmo-msc did not indicate the CN domain in the GSUP SendAuthInfo Request, which was neither required nor evaluated. The CN-Domain is only sent for the UpdateLocation Request that usually follows later. Related: OS#4318 Change-Id: I22f44068268e62801cadbf6542efaf153423cd65
2019-12-03msc: exit(2) on unsupported positional arguments on command lineHarald Welte1-0/+5
Change-Id: Iad858974e9d97ae14f3da6dc21267aafafcda0ef
2019-12-02libmsc: fix potential NULL-pointer dereferences detected by GCC's LTOVadim Yanitskiy2-1/+9
Change-Id: Ib7ba8909dce64d1b8ff3a53495fe3eefc446ed8e
2019-12-01Check for osmo_fsm_register() error return valueHarald Welte2-2/+2
Change-Id: I4cce3d6798fe3184a3085d114b749b4645620978
2019-12-01check for osmo_ss7_init() error return valueHarald Welte1-1/+1
Change-Id: I2bc34f3962ca7355f20757e36a86ab2fd1a7aef6
2019-11-28MNCC v6: add optional SDP to the socket protocolNeels Hofmeyr1-8/+30
Add a char buffer of 1024 characters length as space for SDP to pass to / receive from MNCC. Actually support receiving MNCC without such an SDP tail. The main reason for this is to avoid the need to adjust the ttcn3 implementation of MNCC: it would stop working for older osmo-msc. Older or non-SIP MNCC peers could operate the previous MNCC protocol unchanged (save the protocol number bump) without having to implement SDP. The SDP part in the MNCC protocol will be used in upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f. This patch must be merged at the same time as osmo-sip-connector patch Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925, so that both sides have a matching MNCC protocol version number. Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7
2019-11-28add sdp_msg API: SDP parsing/compositionNeels Hofmeyr2-0/+577
Rationale: in order to add full SDP to the MNCC protocol (upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f), we need to parse and compose SDP messages. Obviously, libosmo-mgcp-client already contains similar code, but that is unfortunately heavily glued to the actual MGCP implementation. The simplest solution is to create this separate implementation, copy-pasting from the existing libosmo-mgcp-client code as is convenient. This API is added here to probe whether it works well. When it does, the intention is to "move it up" to osmo-mgw and overhaul the SDP parsing in our MGCP client and MGCP server APIs using this same API. Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931