Commit Graph

3156 Commits

Author SHA1 Message Date
Daniel Willmann 04918c054a Fix TC_ms_reg_enq
In the pooling case it is not clear where the message will be forwarded
to so allow reception on any SGSN.

Change-Id: I6669ed0b49e9f278f16a67dc05ae208884ee535e
Related: OS#4472
2021-07-06 14:01:49 +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
Vadim Yanitskiy ed5129f313 library/RTP_Emulation: add optional port for RTP sniffing
Change-Id: I224d25aa298b5b512ab9e2a36c144e19c23d8462
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy 8c978ec94f library/RTP_Emulation: improve readability of guard statements
Change-Id: Ic25646cca5c276feae8dda52153991a8d16913e1
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy fc63164bac library/RSL_Types: use OCT4 for local/remote address fields
This way functions like f_inet_addr() and f_inet6_addr() can be
used directly without converting between bytes and integers.

Change-Id: I389a8cb95c025c9dddc751789223621c15d9b48f
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy e9141c22b1 library/RSL_Types: add remote addr/port to ts_RSL_IPA_CRCX()
Change-Id: Iffcac2f1c9b877393fef547fb67ee24cc1e27a11
2021-07-05 12:09:07 +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
Vadim Yanitskiy 60fcc63f48 SGSN: fix using non-existing VTY command for encryption
Change-Id: I366ccd5a562c86e6df79bbc200fb46d1aef69b39
Fixes: [1] Iad65cbf9840aa883cb34e53554b94a4142c82638
Related: SYS#5324
2021-07-04 01:02:34 +02: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
Vadim Yanitskiy 4b2330474d BSC: add a test case for BCCH carrier power reduction mode
Change-Id: I084f7736cd7d09b68ed49f8ba52a14de928d4c01
Depends: I765d5e38cb0746e0458773abf3717ee9bf1cb7d1
Related: SYS#4919
2021-07-02 13:01:28 +00:00
Pau Espin 8e57ac1a3c bts: Introduce test TC_dyn_osmo_pdch_sdcch8_act
Change-Id: I16d5f32697d2b5df97419d39a3948777bedfc1b5
2021-07-02 11:48:50 +00:00
Pau Espin cdf2614314 bsc: Introduce test TC_dyn_ts_sdcch8_act_nack
Change-Id: I388677c90203853fae584ca60d0e6645bb4ad675
Related: SYS#5309
2021-07-02 11:48:50 +00:00
Pau Espin 5b38108d71 bsc: Introduce test TC_dyn_ts_sdcch8_act_deact
Related: SYS#5309
Change-Id: I1c53c5d280ca07b000b1e951cfe1e9e5f47a2d86
2021-07-02 11:48:50 +00: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
Vadim Yanitskiy 2a5a1ef401 library/RSL_Types: add matching templates for BS Power Control
Change-Id: Iceba738f71043dc22880d085836f8be9d14821ab
Related: SYS#4919
2021-06-30 10:20:33 +00:00
Vadim Yanitskiy 6860e864d8 BTS_Tests.ttcn: fix indention and readability of some comments
Change-Id: I95c63c2d2498fec1915a2333d31d05f433560830
2021-06-30 08:01:09 +00:00
Vadim Yanitskiy 79e15161c2 BTS_Tests_SMSCB: ensure f_shutdown() is called in all test cases
This fixes sporadic test case failures due to race conditions.

Change-Id: I3f2c327e1e44d5decd4a936f063af649687f950a
2021-06-30 08:01:09 +00: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
Pau Espin 64adf3791f cosmetic: bsc: Fix wrong dyn ts type mentioned in comment
Change-Id: I020c1ee909a12540774d665f914f1115870bea7e
2021-06-28 16:25:47 +02:00
Philipp Maier ca058278c9 BTS_Tests: add testcase TC_paging_imsi_200percent_with_ps
The current paging load tests only test what happens when the paging
load is introduced from the PS side. However there are no tests that
tests what happens when PS pagings are introduced from the PCU side
into an already overloaded system.

osmo-bts was equipped recently with a mechanism that detects congestive
situations. Once a congestion is detcted osmo-bts will drop pagings from
the BTS side. The rationale of the new testcase is that the behavior
must not change when the PS pagings start since osmo-bts is dropping
them.

Change-Id: Ie72e788d9ebff6ca4e50314746127a9689948062
Depends: osmo-bts I30f97672d7a0c369c4a656e878ab8cbbd83e31ea
Related: SYS#5306
2021-06-28 08:47:04 +00:00
Pau Espin 65d712e973 bts: Test forwarding PCUIF<->IPA/OSMO/PCU
Change-Id: I78880098a55d1cb456011746efa0a47832a86ca8
2021-06-28 10:43:21 +02:00
Pau Espin 6c864ec07a bts: Rename function issuing OML SetAttributes
GetAttributes support will be introduced next, and current naming is
misleading.

Change-Id: Id84eda70e97364b7ec6a8d351f0b54f07faba670
2021-06-25 13:52:30 +02:00
Pau Espin 6924ef7199 bts: Support passing PCUIF messages over IPA multiplex
Related: SYS#5303
Change-Id: I3cd0988cb654f1c5816d1c4717255a5e802d7925
2021-06-25 13:28:20 +02:00
Pau Espin 52c5485462 CSN1: Support enc/dec of Packet Measurement related messages
Related: SYS#5303
Change-Id: I5567a0d86c70d67e2012ba284146952a40c279d7
2021-06-25 13:28:20 +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
Vadim Yanitskiy 83852c171b BTS: add a testcase for PDCH interference reports
Change-Id: I39e70524ad3d2ee51b537c8f786b7754a02949b1
Related: SYS#5313, OS#1569, OS#1866
2021-06-22 20:07:48 +02:00
Vadim Yanitskiy d0766b28da library/PCUIF_Types: add definition for PCU_IF_MSG_INTERF_IND
Change-Id: I07d25d694c2f39a79295c2948ab6155f46e5c639
Related: SYS#5313, OS#1569, OS#1866
2021-06-22 20:07:48 +02:00
Vadim Yanitskiy 98c4a1a3b9 BTS: add a test case for RF RESource INDication
Change-Id: I78b6d8beffa5228a28231b75728e7aebdd3cb23c
Related: SYS#5313, OS#1569, OS#1866
2021-06-22 20:07:48 +02:00
Neels Hofmeyr 8ebf19cfdf bsc: add tests for inter-BSC HO with encryption A5/{0,1,3,4}
Only ho-into-this-bsc tests are required, since the out-of-this-bsc
message (Handover Required) does not involve any encryption information.

Related: SYS#5324
Change-Id: I8de65eb9a5bd9a58add55e821f2a559c9a81edc1
2021-06-21 20:18:35 +00:00
Neels Hofmeyr 1d8decea8b BSSMAP: add encr params to ts_BSSMAP_HandoverRequest
Related: SYS#5324
Change-Id: Idadc0e0a7a960a0ef88b3dca97c4fbaa16975b61
2021-06-21 20:18:35 +00:00
Neels Hofmeyr af88d9dbf3 bsc: add intra-BSC handover tests with encryption
In f_tc_ho_int(), verify encryption information for the handover
target's chan act.

Add test cases calling f_tc_ho_int() with various A5/n encryption modes.

Related: SYS#5324
Change-Id: Iaab26c708c106a61b762234d42ed9a52cdc2998c
2021-06-21 20:18:35 +00:00
Neels Hofmeyr 58ffceb4ec bsc: split f_verify_encr_info() from f_cipher_mode()
The verification of correct encryption information so far is part of
f_cipher_mode(); put it in a separate new function f_verify_encr_info()
so that it can be re-used for handover channel activation.

Related: SYS#5324
Change-Id: I11602d23670f436a22b891fc744fe07e470f2b79
2021-06-21 20:18:35 +00:00
Neels Hofmeyr 3fe8460494 bsc: also allow empty key for A5/0
Change-Id: Id54abc09dd62d7247a970a03ed8c2209b641f511
2021-06-21 20:18:35 +00:00
Vadim Yanitskiy beda697221 [VAMOS] BTS: call f_shutdown() in f_TC_vamos_exec_async()
Sometimes, VAMOS related test cases fail due to a DTE:

  Dynamic test case error: Sending data on the connection of port
                           CCHAN_PT to 1:RSL_CCHAN failed. (Broken pipe)

Call f_shutdown() to ensure that all components are properly
terminated, so there will be no race conditions like this.

Change-Id: I690412a29b24571109415d32b09543de459076d1
Related: SYS#4895
2021-06-21 20:18:05 +00:00
Neels Hofmeyr 5f7a9dfcf4 bsc: f_tc_ho_int: do not override TestHdlrParams
Related: SYS#5324
Change-Id: Ibd1a887b197100bf7ffe1e37c6567690bc4c8f8c
2021-06-21 16:26:26 +00:00
Neels Hofmeyr 2bb1f0e09a bsc: drop unused kc variables
Change-Id: I08323cbe079d357dfdd44ecddacd1c772941abaa
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 0faeb7afc9 bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail
Allow only A5/4, but omit the Kc128 IE from MSC's msg. Expect Cipher
Mode Reject.

Related: SYS#5324
Change-Id: I7734a4a59797a9b21523c33f48815a8094f4e6ec
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 0d8ec5366d bsc: add TC_assignment_fr_a5_4
Establish a TCH/F with A5/4 encryption.

Related: SYS#5324
Change-Id: I9ad899bd15a1f7ba0a44764f7d2a94f5b627053f
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 81ad27fca9 bsc: add TC_ciph_mode_a5_4
Establish a Signalling channel with A5/4 encryption.

Related: SYS#5324
Change-Id: I2428c21663dfa7d67e769da0127f74e8c01dfb97
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 5e31cfc63d bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg
Related: SYS#5324
Change-Id: I88b386c55e23cc180131e95a005d08cbc3ec102b
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 7274934057 bsc: f_cipher_mode(): fail quicker on key mismatch
Related: SYS#5324
Change-Id: Ia79779f4229da4a5af271235a5e82c6fd59ea3a2
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 0588cadcfd bsc: implement ttcn API and cfg for A5/4
Implement tools for OsmoBSC a5/4 support testing:

- in f_cipher_mode() and f_check_chan_act(), expect Kc128 key as
  appropriate, using recently added g_pars.encr.enc_kc128
- osmo-bsc.cfg: allow a5/4

Related: SYS#5324
Change-Id: Ifa48a8498dde7d04fb29f497013bdb5a1e5f3597
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 6c388f209d bsc: reduce args to f_cipher_mode()
Instead of passing each part individually, simply pass the entire
TestHdlrEncrParams to f_cipher_mode().

Preparation for A5/4.

Add the kc128 to TestHdlrEncrParams instead of a function arg. kc128 is
so far unused, but will be used in an upcoming patch adding A5/4.

Related: SYS#5324
Change-Id: I2cb8282e55436da5ae64ab569df87d5d5a0dd2f0
2021-06-21 16:26:08 +00:00