Commit Graph

296 Commits

Author SHA1 Message Date
Daniel Willmann 0886215539 msc: Avoid race condition when setting osmux options via VTY
If the RAN_Emulation is started before the VTY reconfiguration we could
get a BSSMAP Reset/ResetAck with Osmux support advertised even though
the test expects it to be disabled (or vice versa).

Do the VTY configuration before starting the RAN_Emulation.

Fixes sporadic/load-related TTCN3 failures with message
"BSSMAP: Timeout waiting for RESET-ACK after sending RESET"
(e.g. TC_iu_and_mt_call_osmux, TC_iu_and_mo_sms in run +1567)

Change-Id: Ife23f70c6523034f3c3c53b6c1c81428566fd43e
2022-02-22 18:00:24 +00:00
Vadim Yanitskiy 04fb687350 msc/osmo-{msc,stp}.cfg: enable extended timestamp in logging
Change-Id: Ia6414d5622fb287fd147c09e791e1b8023d1596e
2021-12-14 12:59:04 +00:00
Vadim Yanitskiy 172bc6ebd2 msc/BSC_ConnectionHandler: fix early return in f_mm_ciph_geran()
In [1] I forgot to invert an if statement.  This regression caused
most of GERAN specific test cases to fail due to "Tguard timeout".

Change-Id: I8cbaff00abfd9eb252dc3011df848e2e24fe5a1e
Fixes: [1] Ib7ebe8fd675295beb02cadebb19d8465dffeb732
Related: OS#5333
2021-12-06 17:55:26 +03:00
Vadim Yanitskiy 0649d1c0db msc/BSC_ConnectionHandler: refactor and split f_mm_common()
Reduce nesting and improve readability by splitting GERAN/UTRAN
specific CMC/SMC message handling into separate functions.

Change-Id: Ib7ebe8fd675295beb02cadebb19d8465dffeb732
Related: OS#5333
2021-12-04 11:01:57 +00:00
Vadim Yanitskiy fff454062a msc/osmo-msc.cfg: remove deprecated 'periodic location update'
T3212 is set to 60 min. by default in osmo-msc.  There is no need
to set the value explicitly, so let's use the default.

Change-Id: I4a053af23ae9371c945c7634053827bb3813a67a
2021-11-28 03:48:02 +03:00
Vadim Yanitskiy e301838023 msc/osmo-{msc,stp}.cfg: tune logging configuration
Change-Id: Ic74014a3509f913c5668639e02b9306d73bb219d
2021-11-28 03:33:14 +03:00
Alexander Couzens 59087c5037 msc: disable encryption for iu/utran tests
Add seperate UEA1/2 tests later.

Change-Id: Id98038e1d92942b55480a60821088d4a445b7b28
2021-11-27 00:33:52 +01:00
Oliver Smith f8fe1329e2 regen_makefile.sh: set executable name explicitly
Set the executable name in each regen_makefile.sh explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 regen_makefile.sh: files/flags in separate lines
Make all regen_makefile.sh more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Neels Hofmeyr 48e4d7d71a msc: add MSC_Tests.TC_call_re_establishment_ciph
Invoke TC_call_re_establishment with ciphering required.

Related: SYS#5130
Change-Id: I8bbe53fc9fced3e455aa30c571ef7684890adb99
2021-08-06 14:03:28 +00:00
Neels Hofmeyr a9b2dcf5ef msc: add MSC_Tests.TC_call_re_establishment_auth
Invoke TC_call_re_establishment with authentication required.

Related: SYS#5130
Change-Id: I8110a6b432de734d53b111c7b69aabca12129691
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 4f099b4e94 msc: add MSC_Tests.TC_call_re_establishment
The osmo-msc patch that makes this test pass is
I6fa37d6ca9fcb1637742b40e37b68d67664c9b60

Related: SYS#5130
Change-Id: Ifdff5573eeb3b3d41e8599b9b0228411d2576864
2021-08-06 14:03:28 +00:00
Neels Hofmeyr e1a1b63549 msc: split f_start_handler_with_pars()
To allow running connect() on the COORD ports of test components before
starting the test component but after creating it, split
f_start_handler_with_pars() into f_start_handler_create() and _run().

Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

Related: SYS#5130
Change-Id: Ic7e9dbb8c9db5948fe35fc3051bb988d65622782
2021-08-06 14:03:28 +00:00
Neels Hofmeyr f797d298a5 msc: add a COORD port for inter-component coordination
Also provide a blank receive template for CallParameters which is
needed to receive a CallParameters record via the COORD port.

Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

Change-Id: Iba3a5304fa40159bc2c31cdc3a71ee56ed08bd12
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 8853afbcf4 msc: add as_mgcp_ack_all_dlcx
Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

Related: SYS#5130
Change-Id: Ic63fa41fa2e5d392d39f6b5f9edd3952aa6a9ee9
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 49bbb511e7 msc: allow another reject cause in TC_cm_reest_req_reject
osmo-msc will soon have CM Re-Establishing support, and it will start
returning a different reject code instead of
GSM48_REJECT_SRV_OPT_NOT_SUPPORTED. In TC_cm_reest_req_reject, there is
no previous ongoing connection let alone a voice call, so osmo-msc will
return GSM48_REJECT_CALL_CAN_NOT_BE_IDENTIFIED.

Related: SYS#5130
Change-Id: I3eebab2b26016fb0ef7bf958208eaba6ae4c7836
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 60122f8076 msc: eliminate bssap_idx
There is a pars.ran_idx, no need for an explicit bssap_idx argument.

There is only one occurence passing a nonzero bssap_idx, use
pars.ran_idx instead.

Preparation for patch "msc: split f_start_handler_with_pars()"
Ic7e9dbb8c9db5948fe35fc3051bb988d65622782

Related: SYS#5130
Change-Id: Ib5c5585f098ff269920cf9d5781c4366234854c5
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 8913b9eaeb msc: fix conn id in 'MGCP OK' msg (as_mgcp_ack_all_mdcx)
The MDCX OK message should contain the same connection identifier as the
MDCX contained. So far we were always sending the second conn id,
regardless of which conn id was sent in the MDCX message.

Related: SYS#5130
Change-Id: If6f7f135d95c04ee0240f3fa9ba0b18ffc6fa24a
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 188fdff278 msc: adjust routing-key to docker-playground's osmo-msc.cfg
Change-Id: I1fed051e933e7d9ee6da21b65b730b1b1846705a
2021-07-19 13:53:22 +02:00
Neels Hofmeyr 9eb0d87a33 msc: fix osmo-stp.cfg for Iu tests
Change-Id: I102eb75f4b7ce46180fd45dd6548751e28a7f829
2021-07-19 13:53:22 +02:00
Pau Espin 7593a8a5f8 msc: Fix CommonId expectancies on subscr from A iface
When back on the A interface, the subscriber should no longer contain a
Last Eutran PLMN Id related entry in the VLR, since the SGs association
is no longer alive.

Related: SYS#5337
Change-Id: I8c72eaa4d41b8523f483ac3a343b782d1ef7c937
2021-07-06 07:16:23 +00:00
Neels Hofmeyr cb8d9894af update expected-results.xml files
Change-Id: Idcf764cd2d251210bb123d2a5ea782cda0d670b7
2021-07-05 13:11:14 +02:00
Pau Espin cefe9da445 cosmetic: msc: Fix typo in comment
Change-Id: Ia7b8c089866744621d22f9182d4293685f8e2563
2021-07-04 18:00:24 +00:00
Neels Hofmeyr 36ebc33153 msc: inter-MSC HO test: use CGI cell ID, not LAI
Fixes inter-MSC handover tests: in the inter-MSC 'Handover Required', do
not send a LAI cell identifier, but a CGI one.

This is analogous to the fix applied to inter-BSC HO in
I48276acf923626db171683dfa03ef43614a71380.

Rationale:

As explained in OS#5188, 3GPP TS 48.008 allows a LAI identification only
in the Cell Identifier List IE, but not in the single Cell Identifier
IE.

In the inter-MSC HO test's Handover Required message, we so far send a
LAI identifier in a List IE to osmo-msc. And so far, osmo-msc simply
echos that in the Handover Request message's single Cell Id IE.

The LAI is, as actually defined in the spec, omitted from the single IE
in deps/titan.ProtocolModules.BSSMAP/src/BSSAP_Types.ttcn, and when
osmo-msc sends the non-standard LAI Id, ttcn3 fails to parse the BSSMAP
Handover Request message: the Cell Identifier IE gets wrong values, and
all remaining IEs are parsed as 'omit' even though they are present on
the wire. So as long as osmo-msc sends back a LAI Id, we cannot sanely
verify the Handover Request received from the MSC.

The CGI identifier type is supported in both IEs. So when the test sends
a CGI identifier in the Handover Required, osmo-msc will also reflect a
CGI identifier in the Handover Request, and ttcn3 parsing works.

Related: OS#5188 SYS#5324
Change-Id: I525b5deaa9634fcdb63fbd2c97c767aff045767c
2021-07-02 17:10:26 +02:00
Neels Hofmeyr ec2e1f701d msc: rather not use decmatch in f_tc_ho_inter_msc_out()
TC_ho_inter_msc_out fails on jenkins in a way that i cannot reproduce. A
possible source is the decmatch for the Handover Request message. The
jenkins logs show:

MSC_Tests.ttcn:6005 Warning: Decoded content matching failed, because the buffer was not empty after decoding. Remaining octets: 22.

Change-Id: I20b5594c7e083af791525231f24d3ed089c18910
2021-07-02 02:12:04 +02:00
Neels Hofmeyr 906af1089c msc: fix inter-msc ho tests: do not attempt to send "*"
Recently, encryption testing was added to the inter-MSC HO test. Instead
of sending the chosenEncryptionAlgorithm from the receive-template side
forward the actual received one (rx "*" usually means tx is "omit").

Change-Id: Icae084cfd63d666f3b0778fade7ba558bd161a0f
2021-07-01 12:11:59 +02:00
Neels Hofmeyr 666d39abb9 msc: add inter-MSC HO tests with A5 encryption
Related: SYS#5324
Change-Id: Ia1df783be33bf752d291acb857d3c48882c65975
2021-06-29 16:17:54 +02:00
Neels Hofmeyr 0d841d98b6 msc: add inter-BSC HO tests with A5 encryption
Related: SYS#5324
Change-Id: I57e43c60d4389bd301d0195179321a34401bd1dc
2021-06-29 16:17:54 +02:00
Neels Hofmeyr b00c5b095d msc: add vec_keep to lock the AuthVector
Next to AuthVector vec, add boolean vec_keep. When set to true,
as_GSUP_SAI() skips the vector regeneration.

An upcoming patch adds encryption to inter-BSC handover, which will use
vec_keep := true. (See I57e43c60d4389bd301d0195179321a34401bd1dc )

Rationale:

Usually, a random auth vector is generated during as_GSUP_SAI(). For
inter-BSC handover, there are two separate virt-BSC components running.
But to be able to verify that the correct key is passed on from the old
to the new BSS, both titan components need to have the same AuthVector
data. The easiest solution is to generate the AuthVector before
launching the components, and then prevent that it is changed by
as_GSUP_SAI().

Related: SYS#5324
Related: I57e43c60d4389bd301d0195179321a34401bd1dc
Change-Id: I4bca739c2aad8342915e00a218f90fc19be7eafe
2021-06-29 16:17:54 +02:00
Neels Hofmeyr f6eff81417 msc: generate Milenage ck in f_get_expected_encryption()
Instead of overwriting the ck of the original auth vector, generate the
Milenage-on-GERAN Ck key only for the expected ciphering IEs, centrally
in f_get_expected_encryption().

Related: SYS#5324
Change-Id: Iec618ba7fddb2290fc0137d99a9b8d5e2b428b98
2021-06-29 16:17:54 +02:00
Neels Hofmeyr f7831cbcd9 msc: cipher mode: move cipher expect to new function
Move the ciphering calculations from f_mm_common() to new function
f_get_expected_encryption(), so that it can be re-used for ciphering in
inter-BSC handover (upcoming patch).

Add tr_BSSMAP_CipherModeCmd2() to conveniently use the values returned
by f_get_expected_encryption().

To verify the Ciphering Mode Command in f_mm_common(), use the new
tr_BSSMAP_CipherModeCmd2(), and rely on template matching instead of
checking each IE individually.

Related: SYS#5324
Change-Id: I1f775889fb801d441ea6c8b0f0c34718b814c09e
2021-06-29 16:17:54 +02:00
Neels Hofmeyr 0d6fd3eff2 msc: f_auth3g_kc(): take vec as argument, drop "runs on"
It is more elegant to have one arg and not require a "runs on".

Related: SYS#5324
Change-Id: Iec21710edaa6ad3d20e23c7ee055909c642e8220
2021-06-23 23:53:06 +02:00
Neels Hofmeyr 2822d07ab2 msc: inter-BSC HO test: use CGI cell ID, not LAI
In the inter-BSC 'Handover Required', do not send a LAI cell identifier,
but a CGI one.

Rationale:

As explained in OS#5188, 3GPP TS 48.008 allows a LAI identification only
in the Cell Identifier List IE, but not in the single Cell Identifier
IE.

In the inter-BSC HO test's Handover Required message, we so far send a
LAI identifier in a List IE to osmo-msc. And so far, osmo-msc simply
echos that in the Handover Request message's single Cell Id IE.

The LAI is, as actually defined in the spec, omitted from the single IE
in deps/titan.ProtocolModules.BSSMAP/src/BSSAP_Types.ttcn, and when
osmo-msc sends the non-standard LAI Id, ttcn3 fails to parse the BSSMAP
Handover Request message: the Cell Identifier IE gets wrong values, and
all remaining IEs are parsed as 'omit' even though they are present on
the wire. So as long as osmo-msc sends back a LAI Id, we cannot sanely
verify the Handover Request received from the MSC.

The CGI identifier type is supported in both IEs. So when the test sends
a CGI identifier in the Handover Required, osmo-msc will also reflect a
CGI identifier in the Handover Request, and ttcn3 parsing works.

This prepares for adding verification of the ciphering in inter-BSC
handover, in turn a preparation for adding tests of A5/4.

Related: OS#5188 SYS#5324
Change-Id: I48276acf923626db171683dfa03ef43614a71380
2021-06-23 03:55:26 +02:00
Eric Wild 26f4a62642 msc: add first a5/4 tests
All msc tests involving classmarks suffer from the same problem: if a
existing subscriber is reused the old classmarks will stick, since the
msc only overwrites updated parts of the cm when receiving a new cm, so
"downgrading" the existing classmark information is not possible.

This is circumvented here here by using different imsi suffixes,
the last param passed to f_start_handler.

Additionally the handler will now properly respond to cm requests
by the msc, i.e. in case the early cm is not sufficient for a5/4
because it lacks cm3, so the msc attempts once to query the cm,
hoping to get a cm3.

Related: SYS#5324
Change-Id: Idc055a006b325f58a5eafa88bc4415181b3500a2
2021-05-19 17:49:52 +00:00
Pau Espin e979c40e4b msc: Verify CommonID contains LastUsedEutranPLMNId when in CSFB
Validate in test that MSC sends Last Used E-UTRAN PLLMN Id IE when call
is started by SGs (CSFB).

Related: SYS#5337
Change-Id: I161529fd9c8cacb7d17ea18660998df06bb0b575
2021-05-11 16:15:31 +02:00
Pau Espin 3768a6fc34 msc: MME emulation should send TAI during SGs LU for CSFB support
3GPP TS 23.272 sec 4.3.3:
"During the SGs location update procedure, obtaining the last used LTE
PLMN ID via TAI in SGsAP-LOCATION-UPDATE-REQUEST as specified in TS
29.118".

Related: SYS#5337
Change-Id: I7057a7c41794d62f7cbc412da3e805c1f0c69511
2021-04-28 14:24:26 +02:00
Pau Espin 3acd19ea41 msc: Fix typo in func description
Change-Id: I828fe1efbdd38b12ba29f9ac0141fc456ce3c7bf
2021-04-28 12:59:52 +02:00
Harald Welte 79ed4b1685 remove deprecated 'logging level all everything' from configs
it has been deprecated in libosmocore.git 2.5 years ago:

commit 7e0686c6b4b456ec4e6e15689694b1bcf96c301f
Author: Neels Hofmeyr <neels@hofmeyr.de>
Date:   Mon Sep 10 20:58:52 2018 +0200

Change-Id: Ieb9e958278e7bb9d5e798f83b70dcb873a25d06d
2021-04-21 16:40:49 +00:00
Pau Espin 174fac25a3 msc: Get rid of several uneeded module params
These params are not needed anymore since new releases used in -latest don't
need to disable it.

Change-Id: I16575ae4f615bf7c42d5921917003007ba4872a0
Related: OS#5042
2021-02-26 13:20:10 +01:00
Vadim Yanitskiy 109e755161 msc: test reaction on Clear Request during a MO/MT Call
Change-Id: Id16969fe0de04445d1320a96d35cf1d48cc8cf09
Related: SYS#5340
2021-02-08 20:18:13 +00:00
Vadim Yanitskiy b56701e021 msc: finish and enable test case for MT Call T310 timer
The test suite needs to handle MGCP messages, otherwise the related
FSMs in the IUT would tear everything down before T310 is expired.

Change-Id: I79d9ae3b086d05c3d7c0a1241720d6c3f1e90281
Related: SYS#5340
2021-02-08 20:18:13 +00:00
Pau Espin 9a5b8ffc5b CTRL: Introduce support to run osmocom CTRL server
Change-Id: I37db9962f51baf2c63bd58ec47ec89f773d7a255
2021-01-07 15:06:39 +01:00
Harald Welte 18ed23cda5 regen-makefile.sh: Put libraries in LINUX_LIBS, not LDFLAGS
Additional libraries to be linked should be in LINUX_LIBS (appended at
the end of the linker command), not part of LDFLAGS (prepended to
the beginning of the linker command).

On binutils 2.35.1 / Debian unstable, without this patch, I get

/usr/bin/ld: IPL4asp_PT.so: undefined reference to `sctp_bindx'
/usr/bin/ld: IPL4asp_PT.so: undefined reference to `sctp_connectx'

which is resolved by this patch

Change-Id: I8a339076f445e3c650e407ae982c7c2dc4a760b2
2020-10-04 21:09:11 +02:00
Neels Hofmeyr 929b406940 update expected results
Change-Id: Icb534a2b00fc48c3ead009a620e6061e595cb581
2020-10-01 06:48:55 +02:00
Pau Espin 956bfd247d msc: Validate RTP addr+port passed from MNCC to MGCP MDCX
Change-Id: I0b53643ed3a8f8550b2ea6e8832068d603a676e1
2020-09-16 10:36:44 +00:00
Pau Espin 563b3d013b mncc: Support IPv6 addresses (new version mncc 7)
Apparently commit 06b859ca31 forgot to
bump the MNCC_SOCK_VERSION field from 5 to 6.

Change-Id: I5448ff931ec33f24f4837a51376f1703fe97683b
2020-09-16 10:36:44 +00:00
Pau Espin 609f1d6c10 msc: Introduce module param to disable crashing test in latest
Otherwise all tests run after ruing MSC_Tests_Iu.control fail.

Change-Id: I46f1066323e19dfe708402a8c9c68e257f62751c
2020-09-15 20:46:00 +00:00
Pau Espin 9a732a4f48 msc: Drop parameter mp_enable_osmux_test
That was needed for osmo-msc <= 1.3.0, and we are at 1.6.1 now.

Change-Id: I8bc0551ec91a5fd8ea2f291a1e16a06a739c7a75
2020-09-15 20:46:00 +00:00
Pau Espin 833174e7fb msc: Introduce tests to verify BSSAP and MGCP handling with IPv6
It tests IPv6 Transport Address are passed correctly through BSSAP, and
forwards handles them correctly as an MGCP client too.

Change-Id: Id616926dd4a9febc4268eea2ee1e377b2d22753a
2020-09-09 12:48:32 +02:00
Pau Espin cb4c59d131 msc: Fix wrong mgcp conn expected in several places
Change-Id: I0bb15881e640fe49552108679894d5df15339fc8
2020-09-07 08:05:28 +00:00