Commit Graph

816 Commits

Author SHA1 Message Date
Harald Welte 7d7d26cb04 L1CTL: Quickly fail in case of non-successful FBSB.resp
Change-Id: I9d1fdb196eee7b3b06f2d3622e59d58f402dcd0d
2018-02-23 19:03:54 +01:00
Harald Welte a82f7e6098 L1CTL: Increase FBSB timeout to ~1s
Change-Id: Id2bb23ae966bd9aa5fc36bfa8ba41d7f136ac88f
2018-02-23 19:03:54 +01:00
Harald Welte eb1e6813c7 GSM_RR_Types: Fix inverted "valid" logic in measurement report
Change-Id: I3ebdd30639b45ba1a9c0fbda7bf2775035833300
2018-02-23 19:03:54 +01:00
Harald Welte 2691adf843 RSL: Add definitions for RSL MEAS REP parsing/encoding
Change-Id: Ib04b81891def2c15a62767a29b53c0fb605d45be
2018-02-23 19:03:54 +01:00
Harald Welte 89ab1914e4 BSC: Add CCHAN_PT recently introduced in RSL_Emulation
RSL_Emulation has recently gained a port for the common channel
management messages, but BSC_Tests was not updated with this port,
resulting in RSL_Emulation enqueuing messages to the port which then
creates dynamic test case failures.

Let's simply connect to the port, even though we currently are not
interested in any of the messages received there (mainly
RSL_MT_BCCH_INFO during startup).

Change-Id: Id8a3c4409599783ca4cd0b49f2570bcb3bb34952
2018-02-23 19:03:54 +01:00
Philipp Maier 8c04b0aa32 bsc: fix testcase TC_paging_imsi_nochan
The testcase TC_paging_imsi_nochan assumes that a paging for no
channel, with no specifc cell associated and without TMSI is
illegal. This is not correct. All these fields have legal values
and the TMSI field is optional.

- Replace the testcase implementation, use f_pageing_helper() to
  create the paging.

Change-Id: I6a56fb0ee06ae7e72a7ac2b6b058ad54f94127ab
2018-02-23 13:53:46 +01:00
Harald Welte cbc947f709 GSM_RR_Types: Add ts_IMM_ASS and ts_MEAS_REP
which allows us to send RR IMMEDIATE ASSIGNMENT (DL/AGCH) and
RR MEASUREMENT REPORT (UL/SACCH) messages from tests.

Change-Id: Ic75041e84c15c77805ecafb823bf7108920675ca
2018-02-22 00:29:00 +01:00
Harald Welte ce6dc4494c L1CTL: Add optional link_id argument to t_L1CTL_DATA_IND()
Change-Id: Ib4cf42825da1034966086d9232273c2328a94947
2018-02-22 00:29:00 +01:00
Harald Welte bb6aed387e RSL_Emulation: Pass ASP_IPA_EVENT_UP to RSL_CCHAN port
When emulating the BSC side of RSL, this can be used by a test case
to wait for the RSL connection to be established.

Change-Id: Iad2f6e4cb6a8f3b77e452f36a83ec11e7554e6c7
2018-02-21 12:20:30 +01:00
Harald Welte 1c02fd1ad5 RSL_Emulation: Introduce notion of 'bts_role'
So far we assumed we emulate the BTS side and talk to a BSC.

Let's make this configurable and disable the BTS-side spcific code
paths by means of a 'bts_role' boolean type.

Change-Id: I0d0460cbb633b470f6117d07643f68aefb1530eb
2018-02-21 12:20:30 +01:00
Harald Welte 3bc387f41a IPA_Emulation: Don't log IPAC_MSGT_ID_RESP as "Unknown/unsupported"
Change-Id: I6ea3855a1f3d1cba6ac173b0f9cf9052d5d028fc
2018-02-21 12:20:30 +01:00
Harald Welte df277258f1 IPA_Emulation: Make dependencies to RSL/MGCP/SCCP/GSUP conditional
Let's use the preprocessor to avoid IPA_Emulation pulling *all*
dependencies into each and any of our projects.  The code readability
suffers a bit from the many #ifdefs, but compilation speed increases
if we don't have to pull in all those (recursive) dependencies.

After all, a BTS test case will never need SCCP, GSUP or MGCP.

Change-Id: Ic0231adbd2171214de133d26b3fbf36130ee8aa0
2018-02-20 16:17:17 +01:00
Harald Welte 9abd1289ec RSL_Types: Add templates for "BSC side"
So far, the RSL templates have been used for BSC testing, i.e.
TTCN3 behaving like a BTS.  Now we want to test the BTS, so we
have to "invert" the receive/send direction and hence also need
the inverse templates.

This doesn't add *all* of them, but a sufficiently large number for our
first testcases against OsmoBTS.

Change-Id: Ica9cfae5a691e4d967d046b04e5bb16a71a89adf
2018-02-20 16:10:41 +01:00
Stefan Sperling 830dc9d07b Add tests for OS#2714, "close RSL connections from unknown Unit ID".
This adds two new tests: One for RSL, and a second one which performs
the same test on the OML port. Both tests open an IPA connection and
send a unit ID which is unknown to the BSC. The tests expect the BSC
to close the connection immediately.

We need to add handling for a socket error in IPA_Emulation because
otherwise these tests do not pass reliably as some closed connections
are not properly detected.

Change-Id: I6a947d7411a016e4d7650031396cae3575756453
2018-02-19 13:06:09 +01:00
Harald Welte 57b9b7f1dc Add TC_attach_pdp_act_user_deact_mt for GGSN-originated PDP DEACT
Change-Id: I7eb653694f487f8bbf122146300c93be625b0f87
Related: OS#2961
2018-02-18 22:28:13 +01:00
Harald Welte 6f20316985 sgsn: Add TC_attach_pdp_act_user_deact_mo
Change-Id: I43cb7728658cae6590eb1bd31c7c285b942a265e
2018-02-18 22:04:55 +01:00
Harald Welte 5b5ca1b1e7 sgsn: Add new TC_attach_pdp_act_ggsn_reject
Change-Id: I2da2b3811e843003920cd67ac47f2fc03016912f
2018-02-18 21:25:03 +01:00
Harald Welte 1d6ae939b6 sgsn: Use random TEID and Charging Identifier
Change-Id: I39934396372b057eaf5446e9185e83a1d56c153c
2018-02-18 21:24:44 +01:00
Harald Welte 4aacdd8784 L3_Templates: Fix activatePDPContextReject msg_Type
Change-Id: Ibc40502a4e9862ac8d95d77b483dac39ac783e5b
2018-02-18 21:24:05 +01:00
Harald Welte 822f910674 sgsn: More comments
Change-Id: Ie64bfc43b2d652f1f556628deb26544217a8286c
2018-02-18 20:39:06 +01:00
Harald Welte 37692d84e9 sgsn: Add user plane GTP testing (GTP->Gb and Gb->GTP)
Change-Id: Ifd62cca8cd9dbcffe4eac957db210ac13b8c633f
2018-02-18 20:23:31 +01:00
Harald Welte 752abbada5 BSSGP_Emulation: Allow clients to send PDU_LLC directly
If a client is sending a PDU_LLC on the BSSGP port, we will encode
it and wrap it in BSSGP before sending it down the stack towards the
IUT, just like we're doing with L3 PDUs already so far.

Change-Id: Ie3385dbb9aee793bdbd006376a69e0a551b23c3c
2018-02-18 19:47:09 +01:00
Harald Welte 3fdbe82065 sgsn: Reduce logging verbosity of IPA/GSUP/NS/BSSGP
Change-Id: I55d1299ceaad1257959b298741a7321faacc4b45
2018-02-18 19:47:09 +01:00
Harald Welte a2526a85d3 BSSGP_Emulation: Add SNDCP decoding support
Change-Id: Icd2e8feed9173b0a2729b7ee1cfac37a86eca6cf
2018-02-18 19:47:04 +01:00
Harald Welte f58a022221 sgsn: Fix hard-coded emulated GGSN IP addresses
Change-Id: Iaf42c25b4c345969c2aec209a6db6e56b69f15e3
2018-02-18 19:45:11 +01:00
Harald Welte 7aff2ca8cd sgsn: GTP Create PDP: Include missing required "Charging ID" IE
Change-Id: I7e4b71d7ca6e75f759f77fb47abc9816c0aa716d
2018-02-18 19:45:11 +01:00
Harald Welte f8af5d6b27 sgsn: Store SGSN-side control + user plane IP addresses
Change-Id: Ic82910917167e667cfb26eb084f237140b4c986e
2018-02-18 15:06:42 +01:00
Harald Welte 835b15f799 sgsn: Add TC_pdp_act_unattached
Change-Id: I162ab7cb74102e6f15c4d685c49575bcd0b4f41c
2018-02-18 14:39:11 +01:00
Harald Welte d71c343818 ttcn3-tcpdump-start.sh: Don't call tcpdump log files ".log"
The problem is that we use ttcn3_logmerge FOO_Tests.*.log and that the
tcpdump stdout log files also match this pattern.  Call them
.pcap.stdout in order to avoid them falling into the globbing pattern of
the TITAN log files.

Change-Id: Iac1ae217b006182121d86375ffa4d3c00ef37e8b
2018-02-18 14:14:44 +01:00
Harald Welte c7872fa0c0 BSSGP_Emulation: use 'isvalue()' instead of 'isbound()'
This seems to be a bug in TITAN 6.1.0: isbound() on a bound-value
still returns false.  isvalue() however returns true if the variable
is bound, while still returning false if it is not.

Change-Id: If6e9ea970a90470a98a33e50ea5cff0fd1781719
2018-02-18 14:06:12 +01:00
Harald Welte a291931b17 Makefile: Add 'sgsn' sub-directory in list of projects
Change-Id: I2b9e5a28e60f06d05ac4ac2e3ed90c6bf72e03f2
2018-02-18 12:14:57 +01:00
Harald Welte 28307080a0 sgsn: Fix syntax errors introduced in PDP Context Act patches
those were undetected as 'sgsn' is not yet part of the subdirectory
list in the master Makefile :/

Change-Id: I46b2baa10cc5a20cd0cb9c0bf32cc0e1a19d38e6
2018-02-18 12:14:38 +01:00
Harald Welte eded9ad578 sgsn: First PDP CTX ACT test: TC_attach_pdp_act
Change-Id: Ia1bfaca99a2a70bb097e2ee44f54e4a31b849a1b
2018-02-18 10:57:02 +01:00
Harald Welte c69cf4e933 ggsn: Move GTP templates to separate GTP_Templates + Add GTP_Emulation
Change-Id: I384e59738a9e0fc0186b69f0806f217a2a8d8a4b
2018-02-18 10:26:54 +01:00
Harald Welte 328eb6d535 move GTP_CodecPort from ggsn to library (for sgsn reuse)
Change-Id: If1b25f3c4705fcf4763886b54c5ef1f7ae08628f
2018-02-18 10:26:45 +01:00
Harald Welte d471901f72 BSSGP/LLC: Fix LLCC SAPI for SM
While in TS 24.007 there is a separate L3 SAPI for GMM and SM,
this only applies to messages sent over LAPDm, and not LLC.

In LLC, both GMM and SM are sent via the same LLGMM LLC-SAPI.

Change-Id: I7814c952cd7f6032222b190d396aaa0570571bfc
2018-02-18 10:26:36 +01:00
Harald Welte 6abb9fe76f sgsn: Add TC_detach_* for various GPRS DETACH use cases
Change-Id: I2243b850400482b911d687585929a2eef3490954
2018-02-18 10:26:34 +01:00
Harald Welte 91636de6d5 sgsn: Add new TC_attach_rau: Attach followed by RA Update
Change-Id: I8f71bf83f4e6504f1cfbdc55a57e3ed62b3e5f25
2018-02-18 10:26:25 +01:00
Harald Welte f70997db90 sgsn: Implement TLLI assignment/modification/unassignment
It's important that we implement the proper TLLI handling whenever our
P-TMSI changes.

Change-Id: I5b95b9e49f0a1db9659714c4d01f340fd44fafe8
2018-02-18 10:26:09 +01:00
Harald Welte 311ec27f42 sgsn: Reduce code duplication by introducing f_gmm_gsup_lu_isd()
Change-Id: I7a43eaa75201fc6c3afba67f6161aef872aca546
2018-02-18 10:25:56 +01:00
Harald Welte 23178c590e sgsn: Reduce code duplication by introducing f_mi_get_lv()
Change-Id: I8b970049074f5de9051a5a791278cd5d29f9d5ed
2018-02-18 10:25:49 +01:00
Harald Welte b7c14e983c sgsn: Add TC_attach_gsup_lu_reject
Change-Id: Id36733e7e51b252407c7513d8441db9a555fd30d
2018-02-18 10:25:47 +01:00
Harald Welte fe25388c39 Implement TC_attach_auth_sai_reject
Change-Id: I8a27c26bb2b6372faccd34c48a597a57783a924f
2018-02-18 10:25:36 +01:00
Harald Welte 04683d0fb8 sgsn: Add TC_rau_unknown
Change-Id: If33fc690cedcc362c3cd5d7c1951440ecba328c2
2018-02-18 10:25:25 +01:00
Harald Welte b2124b21ba sgsn: Add TC_attach_closed for "auth-policy closed"
Change-Id: Ic8aa77d1825fa2e39a09c3f0f0918ef24a3b3f7b
2018-02-18 10:24:09 +01:00
Harald Welte 76dee09c7f sgsn: Add TC_attach_accept_all for "auth-policy accept-all"
Change-Id: I9501595126abf15c9e8b25f06897cf62ab99d8f2
2018-02-18 10:23:54 +01:00
Harald Welte bd194720ad sgsn: Integrate VTY access into SGSN_Tests
Change-Id: I661963368a285ab9358d7f4845b42dc70c35a553
2018-02-18 10:23:41 +01:00
Harald Welte 872ce17d35 move f_vty_config() from MSC_Tests to Osmocom_VTY_Functions
Change-Id: Ie7373c28b1d2b76f8d637ac6c86976fd341e3e2c
2018-02-18 10:23:41 +01:00
Harald Welte 1967d47ea1 sgsn: Ensure ATTACH is always only for GPRS, not combined
OsmoSGSN doesn't do combined GPRS+IMSI Attach.

Change-Id: Ib11f5d720a0e4e1d574982d1f33ba9aaa6b3a3cf
2018-02-18 10:23:33 +01:00
Harald Welte 3823e2ea77 sgsn: Add TC_attach_combined
Change-Id: I87700d89389f4adb60a056d139674bb5f5addf7b
2018-02-18 10:18:14 +01:00