Commit Graph

442 Commits

Author SHA1 Message Date
Harald Welte c98b42c8c3 deps: Use SCTPasp from osmocom github fork (SO_REUSEADDR, usleep hack)
Change-Id: I9169d231358a9a7e9e10302044a895087f7e7d78
2018-01-27 14:27:38 +01:00
Harald Welte 53a06cd2f4 deps: Switch back to upstream titan.TestPorts.UNIX_DOMAIN_SOCKETasp
Upstream TITAN has merged our SOCK_SEQPACKET support, so there's no
need for using our private repo anymore.

Change-Id: Ib04d9a3095cf93609af07af0de0b701cba460f67
2018-01-27 14:27:38 +01:00
Harald Welte ec6e5b43cf msc: Add missing 'repeat' in TC_mo_crcx_ran_reject
Change-Id: Id5c538546ba59f8a8d5f4379f16df2d99c8c2669
2018-01-27 12:45:39 +01:00
Harald Welte a10db90e42 msc: Add global g_Tguard timer to make sure BSC_ConnHdlr terminates
Change-Id: I10fc0ff04c16eacc12f09ac1759940676ae62213
2018-01-27 12:45:39 +01:00
Harald Welte fa03ecb252 msc: Don't explicitly enable TMSI allocation
f_init() already enables TMSI allocation, no need to re-do that.
Only tests *without* TMSI allocation must explicitly change this config.

Change-Id: I123b44b36c3ed7e6bc0347d9703b8bd6288ba060
2018-01-27 12:45:39 +01:00
Harald Welte 7ec4fa8c99 msc: Fix TC_lu_tmsi_noauth_unknown
As the MSC allocates a new TMSI to us, we must send a TMSI REALLOC COMPL
to avoid a LU REJ after the LU ACK.

Change-Id: I6f0d85750a68e71e9b589b23ad74b945a46a6a88
2018-01-27 12:45:39 +01:00
Harald Welte 4f9cdb8739 msc: Fix TC_cmserv_imsi_unknown
g_pars was not initialized, leading to IMSI encoding failure.

Change-Id: Iadab7aed3d3d39186002f1ed25e83f3d3c1ed177
2018-01-27 12:45:39 +01:00
Harald Welte 812f7a45e3 WIP: msc: First test case for mobile terminated call testing
We start the call from the MNCC side, match on the paging and then
pick it up from there.

It currently fails as the MNCC_Emulation cannot yet handle "ConnHdlr
originated" MNCC calls yet.

Change-Id: I28c465187fd8b1dcfd687180b373a47bb9ac6734
2018-01-27 12:45:39 +01:00
Harald Welte 3f95be8fff GSUP_Types: Make sure our MSISDN encoding agrees with OsmoMSC
OsmoMSC seems to have broken encoding of MSISDN which is not in-line
with the spec.  Let's adapt to it.

Change-Id: I4892df63f1a135573dcac977f5eb0a79cbaffad3
Related: OS#2883
2018-01-27 12:45:39 +01:00
Harald Welte 17d2115ab8 BSSMAP: Add IMSI/TMSI mapping table to dispatch incoming paging
If we're emulating BSC/BTS/MS, then we must be able to dispatch
incoming paging requests based on their IMSI or TMSI to the right
ConnHdlr component.  This introduces a new table to facilitate that
dispatch.

Change-Id: I85c1ea3bcf8fb4a100f20cffdc991826b58e290b
2018-01-27 12:45:39 +01:00
Harald Welte 1852a84a70 msc: Ensure all MO call related tests are in control section
Change-Id: Id836b695d9ac1bc8135af95be2b90b5a3e29fd34
2018-01-26 22:53:57 +01:00
Harald Welte 946a5387b9 msc: Add missing timer start in MO call related tests
Change-Id: I13958b40426ef871b4c69561385a39eea95e24e4
2018-01-26 22:53:57 +01:00
Harald Welte 0cc82d95ba msc: Add TC_mo_crcx_ran_reject
Change-Id: I9b1e24c505e1d5911bb1f0335034ff8d0641895d
Related: OS#2882
2018-01-26 22:53:57 +01:00
Harald Welte 3ab88009fc msc: Add TC_mo_crcx_ran_timeout
Change-Id: I085457bd0af429fd3cde6b442604c08cb60eaae3
Related: OS#2881
2018-01-26 22:53:57 +01:00
Harald Welte 12510c5d1f msc: Add TC_mo_setup_and_nothing (MO SETUP with no follow-up)
Change-Id: Ie0352dd91736b04722cf3fb44f90537bc87218c7
2018-01-26 22:53:57 +01:00
Harald Welte 116e433f21 msc: Add TC_establish_and_nothing
Change-Id: Ia8782558d8570750fd95c2b41953aaa61839ef8c
Related: OS#2879
2018-01-26 22:53:57 +01:00
Harald Welte 4017d55bbe msc: Make TC_lu_and_mo_call succeed with osmo-mg enabled osmo-msc
This is for patch https://gerrit.osmocom.org/#/c/4980 in osmo-msc

Change-Id: Ieec52d5e0da776d35d6a473bd726b368af9d5c66
2018-01-26 22:53:57 +01:00
Harald Welte be48a7c081 BSSMAP_Templates: tr_BSSMAP_AssignmentReq support for cic + aoip
Change-Id: I666e70d265d9d5dea7516640809b6081ddeecb88
2018-01-26 22:53:57 +01:00
Harald Welte b6e1d7ec31 BSSMAP_Templates: Make ts_BSSMAP_IE_AoIP_TLA also usable for receive
Change-Id: I8ef753e448453fcab845fbd2936e37a0c22075a0
2018-01-26 22:53:57 +01:00
Harald Welte b71901a52f msc: Rewrite TC_lu_and_mo_call() to be more modular
All relevant parameters are passed in in form of a CallParameters
record, and the bulk of the work has been moved to
BSC_ConnectionHandler.

Change-Id: I932c6c9f7a48b6a1f1ec399e8bba6a413c8bc69e
2018-01-26 22:53:57 +01:00
Harald Welte 9601c8106a MGCP_Emulation: Move from connetion-based to endpoint-based model
In the end, we will often see two connections that relate to one
endpoint, so let's dispatch based on the endpoint name and not based
on the connection identifier.

In the BSC case, we have
* two MGCP connections on one EP in case of RTP/IP based Abis
* one MGCP connectio on one EP in case of E1/T1 based Abis

In the MSC case, we have
* two MGCP connections on one EP: BSS and MSS/MNCC side

Change-Id: I8cd7395ee7b076a9a9ef513cc1b71f2db5009845
2018-01-26 22:53:57 +01:00
Harald Welte 148a7082e8 msc: Move auth/ciph handling in shared f_mm_common()
This shared function can now be used not only from f_perform_lu()
but also from f_establish_fully() and others.

Change-Id: Ib174b1e7153ce2ae531755cd0ba586bb12264551
2018-01-26 22:53:57 +01:00
Harald Welte c2461d66a5 msc: Move f_sleep() to common Osmocom_Types.ttcn
Change-Id: Ic748e1dfe002cb6ee4d785e9b7f8dca34873e504
2018-01-26 22:53:57 +01:00
Harald Welte 1623e6e385 msc: Make use of MGCP_Emulation in f_tc_lu_and_mo_call
Change-Id: Id33f17007b99776129e99625f8f6258a1653d863
2018-01-26 10:42:53 +01:00
Harald Welte 4aa970c218 msc: Start to integrate MGCP_Emulation component
Change-Id: I5330a06b7868b3f3a362cb5b640cd0cb985f2143
2018-01-26 10:42:53 +01:00
Harald Welte bb5a1212c8 MGCP_Emulation: More complete implementation
* re-introduce connection table
* introduce unitdata_cb for connectionless MGCP messages (like AUEP)
* rename MGCP_Emulation_CT members to avoid clashes with other similar
  component names when using "multiple inheritance"
* Use HostName/PortNumber types on MGCP_conn_parameters
* allow "bind to local UDP port only, permit any UDP source port" behavior
* implement expect matching criteria + expect matching only on CRCX
* add helper function f_create_mgcp_expect() like in other Emulations

Change-Id: I953a91e663648715fa4fe98acacca393c8747001
2018-01-26 10:42:53 +01:00
Harald Welte a02515f82f MGCP_Emulation: Add comment + license disclaimer
Change-Id: Ibf1a1ed80a99c8d8754cce3b47b11b5186b9c52d
2018-01-26 10:42:53 +01:00
Harald Welte b6c6ec15f2 BSSMAP_Templates: Permit tr_BSSMAP_AssignmentReq without CIC
Change-Id: Id0379fcb676698d92effce755dbc07c26a6a1101
2018-01-26 10:42:53 +01:00
Harald Welte 4b2b3a673a L3_Templates: ts_Bcap_voice(): Include speech version octets
Change-Id: Iff48bff6df6fa7dae3bc8467be4d75b0305f68ad
2018-01-26 10:42:53 +01:00
Daniel Willmann 166bbb3310 bsc: CRCX is answered with (malformed) ACK
Change-Id: I09c1ed467e95be236e0758d6a9c8bbef405c02eb
2018-01-26 10:42:53 +01:00
Harald Welte c27eaaeb8b MGCP library part of "bsc: Reply to CRCX with ACK"
Change-Id: I68b66d26dfbbba11e1b3a8c04435f08d095f68ed
2018-01-26 10:42:53 +01:00
Daniel Willmann 955627afed MGCP_Emulation part of "bsc: Register expect criteria for MGCP CRCX"
Change-Id: I466df816eef9863bf1664e785b996c0697dc04e3
2018-01-26 10:42:53 +01:00
Daniel Willmann 34e7dd0cca MGCP_CodecPort: Receive MGCP command or response
If we act as MGW we need to accept MGCP commands sent to us as well

Change-Id: I895cfb688a2923b278828f5ae918c73fda18636d
2018-01-26 10:42:53 +01:00
Daniel Willmann fa870f5e25 Add MGCP_Emulation
Change-Id: I5245be2b44e98e1c74b9519c610564667b980a67
2018-01-26 10:42:53 +01:00
Harald Welte 1af6ea82b7 msc: New TC_cl3_rnd_payload / TC_cl3_no_payload for COMPLETE L3
Test BSSMAP COMPLETE L3 INFO either with no payload whatsoever or with
random payload.

Change-Id: I37ca3e5048cc1c2678d763a44b7e228da29851cc
2018-01-26 10:42:53 +01:00
Harald Welte b14c77ab85 msc: move default (auth=off, tmsi=on, encry=off) vty commands to f_init()
Change-Id: I38644ca3c4f629edb762cd24959033d426438e02
2018-01-26 10:42:53 +01:00
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