Commit Graph

2556 Commits

Author SHA1 Message Date
Harald Welte 9182704cbc ggsn: Move random number helpers to Osmocom_Types.ttcn
Change-Id: I141289cbf1807e81d72f07ac1183fa48b2dc54af
2018-01-26 10:42:53 +01:00
Harald Welte 161142834f msc: TC_lu_imsi_auth_tmsi_encr_13_13
Add a first test for encryption (cipher mode command/complete)

Change-Id: I8a8a5c55d87bb251896664679920b96f678673a0
2018-01-24 23:05:35 +01:00
Harald Welte c638f4dbe9 msc: TC_lu_auth_2G_fail: Test auth failure in 2G auth
Change-Id: I54ef4137c0b95658b1e844ac1bb13729f27fd0d1
2018-01-24 23:05:35 +01:00
Harald Welte 0195ab1ab1 msc: Add TC_cm_reest_req_reject: Expect CM RE-EST REQ to be rejected
Change-Id: I7d15b935caed2dacf39d66a33ff933a9b8c443d9
2018-01-24 23:05:35 +01:00
Harald Welte f6b62eef0b msc: Wait for proper BSSAP connection clear after CM SERV REJ
Change-Id: Ia8fc0e61c7f8f31ca4dd21a243e00ef688ff38c6
2018-01-24 23:05:35 +01:00
Harald Welte 6ed6bf9773 MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_TYPE
Change-Id: Ic90b4a0aa47821877a2d3566606b9c9dd5919968
2018-01-24 23:05:32 +01:00
Harald Welte ae1362544f f_enc_IMSI_L3: Fix filler digit in *even* case
We actually need to add the filler digit 'F' if the number of digits
is even.  It is absent when the number of digits is odd.

Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd
2018-01-24 22:42:25 +01:00
Harald Welte 2f562b1a70 GSUP: Fix handling of odd-length IMSI and 0xF filler digit
Change-Id: I4e0a9f1236504ce6026c6e34fd97fda6fefa832c
2018-01-24 22:42:25 +01:00
Harald Welte 81b7f9d802 msc: Fix generation of IMSI/IMEI/MSISDN
Now each test case uses unique IMSI/IMEI/MSISDN numbers, which helps
to identify test cases from traces or from VTY introspection

Change-Id: I54d05e8ec7aeecc48666d3b369351212a6a0ea6f
2018-01-24 22:42:25 +01:00
Harald Welte 3ca1c90ac4 MSC: Use VTY to enable/disable authentication + TMSI allocation
Change-Id: Ifaa0f119d37b18b804c563c045755cc23d509617
2018-01-24 18:53:32 +01:00
Harald Welte 553f655035 Osmocom_VTY_Functions: Make prompt configurable
We want to use this code also for OsmoMSC testing, so let's make the
prefix configurable as module parameter.

Change-Id: Iec846227e88b3dc0d3be9474b8b926719161c9ee
2018-01-24 18:53:32 +01:00
Harald Welte d5b91409bc msc: Cosmetic (fix comment)
Change-Id: I20c65454f606a5c3bc3c5a127ae02b6c204ca06e
2018-01-24 18:53:32 +01:00
Harald Welte 256571e6c5 MSC_Tests: Proper treatment of IMEI + TMSI
* don't use IMSI as IMEI
* store the TMSI (after it is allocated) in the g_pars variable for later use

Change-Id: I717f1c9ab21e5be8b88f10ce4e8c583b385f3664
2018-01-24 18:53:32 +01:00
Harald Welte e1a2f3cb86 msc: Add all test cases to control section
Change-Id: I79abcbe5638a02c1d6d94ba31ce72bfbc372fd21
2018-01-24 17:29:15 +01:00
Harald Welte 66af9e6354 msc: Add TC_lu_disconnect: Start LU, then do a hard SCCP disconnect
Change-Id: I04d0b09350c6a1c9b8fb9aac87158a142d80f18f
2018-01-24 17:29:15 +01:00
Harald Welte 45164da2bc MSC_Tests: More CM SERVICE REQ and EMERGENCY CALL related tests
Change-Id: I04ca21824f66ad90d9dac2c25000ecd724aa4528
2018-01-24 17:29:15 +01:00
Harald Welte ba7b6d940e msc: Add test case for LU with MI=IMEI (which is illegal)
Change-Id: Ie3c91a0ff212a70a8e03e0579f240a10bc4356f4
2018-01-24 17:29:15 +01:00
Harald Welte bc881789bd msc: Test closing BSSAP connection of LU by ClearCommand
Change-Id: I9194da2f9324ee17c920458cb920a6fa718ac739
2018-01-24 17:29:15 +01:00
Harald Welte 071ed736c8 msc: Add tests for HLR SAI timeout and HLR SAI error
Change-Id: I7f8c8ff9ccadd7b7b14cba12a34cebe6855a5367
2018-01-24 17:29:15 +01:00
Harald Welte cf66d5a655 msc_tests: Randomly generate Auth Vector (rather than hard-coded value)
Change-Id: I2dc0570a8ae5003d26368b09d223db8e44a5c4ff
2018-01-24 17:29:15 +01:00
Harald Welte 7b1b281789 MSC: Add test for LU with 2G authentication
Change-Id: I5ea201bd603e581f199cd29056e7e7ebc9bd0923
2018-01-24 17:29:15 +01:00
Harald Welte 77a8ebaceb GSUP/L3: Add templates related to authentication
Change-Id: Id9566e3e075a8837e2e77a7c2b9d8f0f6e9b7554
2018-01-24 17:29:15 +01:00
Harald Welte 2bb825fc71 WIP: MSC: Add MO call testing
Change-Id: If32cb359b3cf732c4752856538552595dbbf2a8a
2018-01-24 17:29:15 +01:00
Harald Welte 701b574fed Use Osmocom-patched UNIX_DOMAIN_SOCKETasp for SEQPACKET support
Upstream TITAN doesn't have this yet (it's submitted, though),
so we have to use our own repo for titan.TestPorts.UNIX_DOMAIN_SOCKETasp
and at the same time make sure that our MNCC port is using
SEQPACKET in MSC_Tests.cfg

Change-Id: Ifa3661d8f818564d595c4612e5612a245a31a8f4
2018-01-22 11:31:38 +01:00
Harald Welte 8a121b3cec msc: make sending of early classmark optional
Change-Id: If25ba412ab393029ed7ae9af47e87d5f4a44acfc
2018-01-22 03:01:27 +01:00
Harald Welte ef9fa87ac9 msc: Prepare authentication support
Change-Id: I930bed1907fd0faf61788cf14e75f2b2337572f4
2018-01-22 03:01:27 +01:00
Harald Welte d748a0519a msc: More MNCC and L3 templates towards voice testing
Change-Id: I3132a856175fc9421e1a0bfd37620d6b1625574b
2018-01-22 03:01:27 +01:00
Harald Welte 515f5d11e7 MNCC: Properly terminate speech version array
MNCC has this weird encoding that the speech version array must
be terminated with one element '-1' at the end.  Let's make sure
our default complies to this rule.

Change-Id: I2e06ed1b558c58a62a00ea8d3573bb31c0c3e750
Related: OS#2853
2018-01-22 03:01:27 +01:00
Harald Welte ec3d065b59 MNCC_Types: Define '0' in various enums for unused value
it seems the decoder is using '0' in positions where we have
not defined any enum value for '0'.  Work around that.

Change-Id: I6bf0540f7ddd4dbe3b6c6ac06421a933126a7e17
2018-01-22 03:01:27 +01:00
Harald Welte 8260057d90 msc: Store CM2/CM3 in g_pars, so it can be modified
Change-Id: I726d851f45379b3efdb5ab62ea8f196cc0e41cc5
2018-01-22 03:01:27 +01:00
Harald Welte 5c2622cafb MSC_Tests: Implement early classmark sending in LU
Change-Id: I019d51703c60203c7cb83a77dc7ca4b3d6623e24
2018-01-22 03:01:27 +01:00
Harald Welte 71b693365d BSSMAP_Emulation: Introduce new MSC_CONN_PRIM_CONF_IND
If the ConnHdlr initiates an outbound connection, it needs to know
once that connection is established if it wants to send further
data. Transform the N-CONNECT.confirm into a MSC_CONN_PRIM_CONF_IND
and send it to the ConnHdlr.

Make use of it from the MSC_Tests when issuing a Complete L3 Info.

Change-Id: I7293a9f4993d13c90316224eb9f13e10130388ef
2018-01-22 03:01:27 +01:00
Harald Welte e5bd1ae81a msc: Add missing MSC_Tests.cfg file
Change-Id: I7671a95ab83854dab70fa7af5afd3d6420c1880f
2018-01-22 03:01:27 +01:00
Harald Welte a49e36e911 MSC_Tests: Integrate MNCC, GSUP, BSSAP connection handler, ...
Change-Id: I7bb6660c6b6cef81533f0fbb5e735f08ed275b8c
2018-01-21 19:37:59 +01:00
Harald Welte 6ff81909fd More GSUP and L3 Templates
Change-Id: I0e9136fc3b8f171934f054ec149d8dd344faa034
2018-01-21 19:31:09 +01:00
Harald Welte 0b476066b9 BSSMAP_Emulation: Decode DTAP
It's quite cumbersome if the user of the BSSMAP_Emulation (the ConnHdlr)
will have to manually decode the DTAP in every BSSAP/DTAP message he
receives (and encode on the transmit side).  Let's introduce a new
optional mode in which the DTAP messages are already decoded for
more convenient matching inside the ConnHdlr.

Change-Id: I35cd4ea78aca0ce7c7d745e082d7289882c11e81
2018-01-21 19:31:09 +01:00
Harald Welte 0e5aad201f Add new GSUP Emulation module, dispatching GSUP based on IMSI
Change-Id: I6d06280fa5729ee921d319854a9b11636cf83495
2018-01-21 19:31:09 +01:00
Harald Welte cb6cc33521 L3_Templates: Template for tr_CM_SERV_REJ and ts_ML3_MO_LU_Req
Change-Id: Iad1596a3b80de16a9b0e2d644cf9a0fe2c51ad21
2018-01-21 19:31:09 +01:00
Harald Welte ae8ce238cd BSSMAP_Templates: Fix + enable ts_CellId_CGI
Change-Id: Icafe6415b3f896176edcac604a0945e83126db09
2018-01-21 19:31:09 +01:00
Harald Welte 0a6835c6f2 BSSMAP_Templates: Make ts_BSSAP_DTAP usable
A send template with '?' is broken.  Also, allow caller to specify DTAP
payload as well as optionally a DLCI.

Change-Id: I641ee8ce5e5ae70b514342cf68cdc79b1926c4d0
2018-01-21 19:31:09 +01:00
Harald Welte dfe94dd5f7 GSUP_Types: Templates for UpdateLocation + ISD
Change-Id: If7a5a1159f098645652114e0c36fea98f63f946c
2018-01-21 19:31:09 +01:00
Harald Welte 049ca642aa BSSMAP_Templates: tr_BSSAP_BSSMAP / tr_BSSAP_DTAP: DLCI may be present
Change-Id: I98b313e354b31fae8c1fea9e61a838970d575d69
2018-01-21 19:31:09 +01:00
Harald Welte b0ec4eec33 BSSAP_Adapter: Always perform BSSMAP Reset on start-up
Change-Id: I1f8834be3409348b3a30b1489f5faa4d1c47b086
2018-01-21 19:31:09 +01:00
Harald Welte 0cf76ad9f7 Move BSSAP_Adapter.ttcn to library so it can be reused
Change-Id: I6ecb1a4823ee036b65d4e4e8ebc23c1db4915a42
2018-01-21 19:31:09 +01:00
Harald Welte ffe55fcc83 bsc test: Abstract out CTRL handling so it can be re-used from MSC test
We create a new Osmocom_CTRL_Adapter module which can be used by
test suites using the 'extends' functionality.

Change-Id: I3ef6cfaa738900e008155013a05b8ccf3d4b7aeb
2018-01-21 19:31:09 +01:00
Harald Welte 67089ee9a4 BSSAP_Adapter: De-couple from BSC-testing MSC_ConnectionHandler
... and pave the way from using it on the other side in MSC testing

Change-Id: I0095f7d24dd8b24f759e4c74a4e7856ec4503ed2
2018-01-21 19:31:09 +01:00
Harald Welte 876bf9d474 MNCC_Emulation: Similar to BSSMAP_Emulation but for MNCC
Dispatches MNCC to individual ConnHldr's based on IMSI.

Change-Id: I850b49ce6a6c894b413b8905008452ce91d2cdb0
2018-01-21 19:28:59 +01:00
Harald Welte ca519981aa BSSMAP_Emulation: Add missing procedure port to client/ConnHdlr
Change-Id: I2925f74d5dcc18f37d48ec8a38a308c1adeef3cc
2018-01-21 19:28:26 +01:00
Harald Welte fe75a20163 MNCC_Types: Add enumerated for cause location + cause coding
Change-Id: If67691a7a18cdde726dfcab48fdfc7b29bd518b4
2018-01-17 13:34:58 +00:00
Harald Welte 8a10e8656d MNCC: Make sure all unused fields are set to omit, not 'unbound'
Change-Id: I0ef3afa19d4ad5e011a7c0d86f8367461608e163
2018-01-17 13:34:58 +00:00