Commit Graph

6998 Commits

Author SHA1 Message Date
Pau Espin 25b6847f46 cosmetic: fix typos in comments
Change-Id: I89e8eba379f83bcf3061601b02af9f10dbca0f22
2021-08-24 11:42:15 +02:00
Philipp Maier 945b0606cf running.adoc: add section about MGCP configuration
The manual seems to lack a section about how the MGW is set up. In the
osmo-bsc manual we have a "Configure MGCP to connect to an MGW" section
under the "Configure primary links" section. We should have the same
thing in the osmo-msc manual as well.

Change-Id: I5501739e63860c436ff606bc2758b495258cd2b9
Depends: osmo-mgw I47e7ff858d5067b46d52329be5f362ff61c0dff8
2021-08-03 11:36:25 +02:00
Neels Hofmeyr ae98b97382 implement CM Re-Establish for voice calls
Related: SYS#5130
Change-Id: I6fa37d6ca9fcb1637742b40e37b68d67664c9b60
2021-07-29 22:40:59 +02:00
Neels Hofmeyr 5bdba0d48d add vlr_subscr_find_by_mi
Will be used by I6fa37d6ca9fcb1637742b40e37b68d67664c9b60
"implement CM Re-Establish for voice calls"

Related: SYS#5130
Change-Id: I5291d098a02268bd1c2e30195ae61e4a13e8709c
2021-07-28 18:37:48 +02:00
Neels Hofmeyr 0c076bc75a add sequence_charts/call_reestablishment.msc
Change-Id: I6ebc3a0555ef82e1c027ca75b45f8147a3e07ee6
2021-07-28 18:37:48 +02:00
Pau Espin e53ecde83e msc_a.c: Allow MSC_A_EV_CN_CLOSE in state MSC_A_ST_RELEASING
As seen in a running osmo-msc:
"vlr_access_req_fsm.c:153
msc_a(IMSI-....:MSISDN-...:TMSI-0x...:GERAN-A-8:CM_SERVICE_REQ){MSC_A_ST_RELEASING}:
Event MSC_A_EV_CN_CLOSE not permitted"

Also seen in several unit tests, which need update.

The action event handler for that state is actually already
expecting/handling the event by ignoring it, so we should allow it.

Change-Id: I4d30cffab693529aab3ba736419dec116a4dd7ef
2021-07-12 16:37:24 +02:00
Pau Espin 42ac3665c8 sgs_iface.c: Improve logging when paging over SGs
Change-Id: I745d3e904583ddf170ec1a1ceac5a49b72e813e3
2021-07-12 16:37:19 +02:00
Pau Espin 1086e20754 vlr_sgs: Drop recorded LastEutranPlmnId when UE no longer associated
Change-Id: I0dcb1850ab4f6f7d42bfcb19665ddeae2d3b057a
2021-07-02 21:46:49 +02:00
Pau Espin 8252959b74 sgs: Use available API to set vlr subscr LastUsedEutranPLMNId
This way it's easier to find out where the vlr subscriber field is set.

Change-Id: I203de82accc896c196cb70037af89be6dc826c05
2021-07-01 18:14:39 +02:00
Neels Hofmeyr 73d093a806 improve logging on encryption, for Ciphering and HO
log the algorithm and all keys instead of just Kc.

Change-Id: If7871dedda2b1fb115e6f00da1379ff2e3d68a10
2021-06-24 01:44:20 +02:00
Neels Hofmeyr db07fdcbfc support A5/4 in inter-BSC handover
Forward the Kc128 key to the new BSS in BSSMAP Handover Request.

Depends: Ieb6e43eef9e57281d54d4b7c63664668df5aef3e (libosmocore)
Change-Id: Id5ce995a741c8e469a50a0c46e53c06a2378bb7e
2021-06-24 01:44:17 +02:00
Neels Hofmeyr 6ce2edcac1 support A5/4 in Cipher Mode Command
Related: SYS#5324
Change-Id: I780a739b9bfbefd4f58be051794fe1a491823e67
2021-06-24 01:27:47 +02:00
Eric Wild a7f8020bfa vty: allow A5/4 encryption in config
Add A5/4 to the internal mask of allowed algorithms.

(Not actually working yet, A5/4 implementation follows in other
patches.)

Related: SYS#5324
Change-Id: I5b46aaa8579f8d069ca39caf996a8795ffe63dd7
2021-06-24 01:27:47 +02:00
Neels Hofmeyr cdcfc80176 ran_msg_a.c: use gsm0808_create_cipher2()
Use new API in Cipher Mode Command to prepare for A5/4 support.

Depends: Ib3906085e0c6e5a496a9f755f0f786238a86ca34 (libosmocore)
Related: SYS#5324
Change-Id: Ib238d367b8d5d07b6ab4cb2e48fbf4ce22ca4476
2021-06-23 23:58:59 +02:00
Neels Hofmeyr 07c8b7cb2e osmo-msc main: use osmo_select_shutdown()
Change-Id: I75f4637c051ed44628e65dab1bdbbf28dcc9626f
2021-06-22 23:34:34 +02:00
Vadim Yanitskiy 435f67f43c msc_tx_common_id(): fix potential NULL pointer dereference
Reported by GCC 11.1.0.  msc_a_vsub() may return NULL.

Change-Id: Iebdd6399e819a03258398e6b7b453bda37e45a20
2021-06-06 15:50:42 +02:00
Pau Espin 2e21a68e83 Use new osmo stat items/ctr APIs
Generated using several semantinc patches with spatch.

Change-Id: I3ee853539949a763a309856bf2e7196415b23741
2021-06-04 16:53:16 +02:00
Pau Espin 6710670cb1 Fill Last Used E-UTRAN PLMN Id when in CSFB
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-04-29 14:22:33 +02:00
Vadim Yanitskiy a361cab54a SMS-over-GSUP: notify sender if no transaction found
Change-Id: I4f564610fadbfdbbc33de267786534a5405319f6
2021-04-04 14:09:32 +00:00
Oliver Smith 5a44e5f46e contrib/osmo-msc.spec.in: depend on dbd-sqlite3
Add the missing runtime dependency to the sqlite3 driver of libdbd.
The library does not provide a pkgconfig file, so using "pkgconfig(...)"
as done in the BuildRequires is not possible. Write both the OpenSUSE
and CentOS name with an if..else.

Fixes:
  <0009> db.c:648 Failed to create database connection to sqlite3 db 'sms.db';
                  Is the sqlite3 database driver for libdbi installed on this system?

Change-Id: Ia972944c300aecbb6ec460b2362aabff459baefd
2021-03-09 14:48:59 +01:00
Pau Espin 13c2153c94 configure.ac: Depend on newer libosmo-ranap
I forgot to ammend the release previous release commit with this.

Change-Id: I8dbbd63fdbd35f5f90f20dcd7e710078f2d9e12a
2021-02-23 20:47:57 +01:00
Pau Espin 59764b6f3e Bump version: 1.6.1.98-cad22-dirty → 1.7.0
Change-Id: I1bf25c0c01efd6f93df8ac2b26868dd1579b3531
2021-02-23 20:22:34 +01:00
Pau Espin cad22fde22 tests: Replace deprecated API log_set_print_filename
Change-Id: I4c1116aafb155b5fb216b01054332dcb91c18401
2021-02-19 14:11:26 +01:00
Pau Espin 8d02d99158 tests: Explicitly drop category from log
Let's disable category here since we don't care about its formatting here.

In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.

Change-Id: I089c0001fc75e81558c3e860827e4d434cf1eab3
Related: OS#5034
2021-02-19 14:10:50 +01:00
Neels Hofmeyr ac6ccd9295 gsm_network: drop unused neighbor_list member
Change-Id: I57463ab94773de1377526f9a1c72fe3d37a31827
2021-02-18 14:16:18 +01:00
Vadim Yanitskiy dd466cfa59 fix _gsm48_cc_trans_free(): send MNCC REL.ind on Clear Request
Calling gsm48_cc_tx_release() before mncc_release_ind() has a side
effect: the former may change CC state to GSM_CSTATE_RELEASE_REQ.
This makes the later send MNCC_REL_CNF instead of MNCC_REL_IND, so
if one of the call leg disconnects due to RF failure, the other one
will not be terminated correctly.

Makes both TC_{mo,mt}_call_clear_request TTCN-3 test cases pass.

Change-Id: I3ad4a99757878de3796027325627c87d9a4e93f1
Related: Id16969fe0de04445d1320a96d35cf1d48cc8cf09
Related: SYS#5340
2021-02-09 18:34:40 +01:00
Neels Hofmeyr dbb3c723a4 msc_vlr_tests: make independent of libosmocore talloc
The msc_vlr_tests verify whether any of the tests run contain msgb or
talloc memory leaks. So far they did so by fixating a specific number of
talloc blocks, which may break by library implementations changing.

Instead, verify that the test leaks no allocations by comparing talloc
blocks before and after each test.

When a leak is detected, print the full talloc report to stderr, which
makes the expected output mismatch the actual output and fails the test.

Related: OS#4311
Change-Id: I8537fa76d460c951302932a1bad4299f7fe398c9
2021-02-07 23:59:59 +01:00
Vadim Yanitskiy 33144f146a ran_a_decode_cipher_mode_reject(): use gsm0808_get_cause()
Change-Id: I56dd920b931e769ba4d268b09700fe3c9fca4fc6
2021-02-05 20:16:52 +01:00
Vadim Yanitskiy 566ce11df5 submit_to_sms(): fix the use of deprecated gsm_septets2octets()
Change-Id: I9985972f0b1d2b71bfd133c5004201a3a0ffcbd0
2021-02-05 20:15:08 +01:00
Pau Espin 46de4aafa6 .gitignore: Ignore new autofoo tmp files
Change-Id: Ifb9dfe84575451fdfc9d059bab428da82b448107
2021-02-04 12:51:41 +01:00
Oliver Smith 09dac13c4d configure.ac: set -std=gnu11
Change-Id: Ie93915f06a8907a80b4f081a00c1cde395015595
2021-01-28 09:28:26 +00:00
Oliver Smith 716a2615f5 contrib/jenkins: don't build osmo-gsm-manuals
Related: OS#4912
Change-Id: I0f4d3b444c22c772498299f7d209fc28080af8c3
2021-01-13 13:17:28 +01:00
Harald Welte 644be61c4a README update. Explain more what it is than just the history
Change-Id: I7368a8a0927fa301dfbbe550b8090e783ab7be2e
2021-01-06 13:13:46 +01:00
Pau Espin e917b1983a main: generate coredump and exit upon SIGABRT received
Previous code relied on abort() switching sigaction to SIG_FDL +
retriggering SIGABRT in case the signal handler returns, which would
then generate the coredump + terminate the process.
However, if a SIGABRT is received from somewhere else (kill -SIGABRT),
then the process would print the talloc report and continue running,
which is not desired.

Change-Id: Iff66eea9ee70850a4d038ece1d8473457023e1ee
Fixes: OS#4865
2020-11-25 18:51:06 +01:00
Harald Welte 4dc5dcf4e0 Use osmo_fd_*_{disable,enable}
Change-Id: I5208124e08d3b403492fe83acee235e61e423450
Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2020-11-11 20:14:27 +00:00
Harald Welte e188010474 debian/control: Recommend installation of osmo-mgw
osmo-msc is pretty useless without osmo-mgw these days.  Let's not
make it a strong dependency, as the mgw could of course be running
on different machines.

Change-Id: I76c1bf30c733cf2fd596a8971ccb8bac4220be66
2020-11-07 17:42:53 +01:00
Vadim Yanitskiy 33a248724e main: add --vty-ref-mode, use vty_dump_xml_ref_mode()
Change-Id: I66c3521895dd0b9a35e9b75f7766ec8014116246
Depends: Ie2022a7f9e167e5ceacf15350c037dd43768ff40
Related: SYS#4910
2020-10-24 05:25:43 +07:00
Harald Welte aa29e33cb5 Use osmo_fd_setup() whenever applicable
Change-Id: Ib570e2ada619b72001d76d2cae159d78f09d6fb6
2020-10-19 11:38:05 +00:00
Pau Espin 5a58cefab7 contrib/jenkins: Enable parallel make in make distcheck
Change-Id: I8f112ed6de4b1b7c28fbb790fede0e1a387a4e22
Related: OS#4421
2020-10-12 19:37:24 +02:00
Alexander Couzens ae167fcc9a Convert paging response timer into an osmocom own X4 timer
All timeout values should use tdef.

Change-Id: Ic050eb49ba0c5811b43d8d8b44145a1115fd8546
2020-09-26 21:45:09 +02:00
Philipp Maier 9194b33ec1 gsm_04_08: check return code of osmo_mobile_identity_decode_from_l3()
The function gsm48_rx_cm_reest_req() is the only one where the return
code of osmo_mobile_identity_decode_from_l3() is not checked, lets check
it here too.

Change-Id: I37981205870b094b3a40a20197461208daa62698
Fixes: CID#211037
2020-09-25 10:01:36 +00:00
Neels Hofmeyr 754def9c7d fix comment in ran_peer.h
Change-Id: Iff985dfe28265d32cae6a931636d5018a439d39e
2020-09-25 01:45:08 +02:00
Neels Hofmeyr cbcfe9918b drop duplicate ran_peer_find() vs ran_peer_find_by_addr()
This is the same function existing twice with different names. Keep only one.

Change-Id: If54b54fa61ece0f95564d403e1439fc5f5ededdf
2020-09-25 01:45:08 +02:00
Keith Whyte 192fefe53d Don't Store an SMS in the database when the ESME is not Bound
We may never be able to deliver this SMS if it depends on the ESME, as we will
not resubmit the SMS to the ESME. Better to reject it at this time and have the MS
try again later.

Change-Id: I2c50904349dd4ed229b60b8468d776b817c0bd44
Related: OS#4740
2020-09-22 12:43:14 +00:00
Philipp Maier 8c472bd111 mncc_call: fix memory overrun
The struct gsm_mncc which is created and populated in mncc_call_tx_setup_ind
casted to a union mncc_msg* pointer. This leads to a memory overrun
in mncc_call_tx because the union mncc_msg is larger then the gsm_mncc struct.

To fix this, lets just declare a union mncc_msg and populate the signal
member inside it. This can be handed over to mncc_call_tx. The data in
it will look the same, except that the memory will have the proper
lenght (longer).

Change-Id: Ifff28b3375d6bd5e4f837f25c46736952f7bfa9b
Fixes: CID 214330
2020-09-18 18:08:39 +02:00
Neels Hofmeyr d4099c31c9 fix MGCP timeout timer
Timer X1 is not defined in libosmo-mgcp-client, so this tdef had no effect.
Change this to X2427.
(libosmo-mgcp-client recently moved T2427001 to X2427.)

(X2 is still used in call_leg.c itself)

Related: OS#4539
Related: If097f52701fd81f29bcca1d252f4fb4fca8a04f7 (osmo-mgw)
Change-Id: I9804fdb2c24f49910f2386e3788bd1107b8ebc40
2020-09-18 08:45:38 +00:00
Pau Espin eeda9e123f mncc: Support IPv6 addresses (new version mncc 7)
Change-Id: I6002b648bcb2055dcbbdae3f688f6e2cb7282b7f
2020-09-14 12:41:00 +02:00
Pau Espin 0632717dc1 Support handling IPv6 Transport Address in Handover Request (Ack)
Change-Id: Ie4d07826362d651cd42dc2b4e0af82368a74c774
2020-09-09 13:20:22 +02:00
Pau Espin 047c5d9dc8 tests: Fix VTY results after switch to newer libosmo-mgcp-client
In this case we are fine with simply updating test result because anyway
ABI breakage in some libosmo-mgcp-client structs was needed, so new
versions of osmo-msc will require new versions of libosmo-mgcp-client.

Change-Id: I1fbdb95f71d3b9a2dc88e1ba79892ae16485aa99
2020-09-09 13:18:40 +02:00
Pau Espin f9c76e3aa2 Support handling IPv6 Transport Address in Assignment Complete
Change-Id: Ib650bb063404a3068b4cf3c376c6080dc29bebfe
2020-09-08 18:31:25 +02:00