Commit Graph

590 Commits

Author SHA1 Message Date
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
Harald Welte 5b7c812e03 sgsn: TC_attach_*_timeout test cases
Change-Id: If8cd9e4387588e8299b7675b8b57392d7da66bd9
2018-02-18 10:18:14 +01:00
Harald Welte 62e2958e49 sgsn: Introduce global guard timer
Change-Id: I0c1fd2a38a4f412079b5f28302b15124d9fd3b3d
2018-02-18 10:18:14 +01:00
Harald Welte 5a4fa04ec4 sgsn: Use Random RAI when performing attach request
Change-Id: Id349c7cd0899d6b87114a3ece8bc2ee625f64116
2018-02-18 10:18:14 +01:00
Harald Welte 14a0f94881 sgsn: Use random TLLI when performing ATTACH
Change-Id: If104add9a6d029b674e46e01af71f2e336aa35f0
2018-02-18 10:18:14 +01:00
Harald Welte 5ac3149d99 First actual SGSN test case
Change-Id: Id66ddf8dbe1c5cfa96a087235588ba67763b7f05
2018-02-18 10:12:31 +01:00
Harald Welte 519db89960 L3_Templates: Fix ts_MI_TMSI_TLV / ts_MI_IMSI_LV / ts_MI_IMEI_LV
It seems not all encoder paths properly set typeOfIdentity, so
let's make sure we set it correctly.

Change-Id: Ie35dcf7fec901b786eb2127c1a23f5c161c5778c
2018-02-16 20:03:47 +01:00
Harald Welte b0386dfd30 L3_Templates: More GMM related templates
Change-Id: Idf305731afb9a4c316e7320553705946c3edb633
2018-02-16 20:03:47 +01:00
Harald Welte 78d9f275c2 Osmocom_Gb_Types: Add ts_BSSGP_UL_UD and tr_BSSGP_PS_PAGING
Change-Id: I0504ee9137eef08c2ab0c710d1b57b2c19bf0db8
2018-02-16 20:03:47 +01:00
Harald Welte ccda45ecf9 bool2bit_tmpl(): Print unsupported template in failure case
Change-Id: I53c65e3a2b71e4c9b6691969d50def69b25ddfd0
2018-02-16 20:03:47 +01:00
Harald Welte b596c18689 bool2bit_tmpl(): Fix for '?' template case
Change-Id: I6dd3c4afdf61689a23aefc277a70cf298cb24c96
2018-02-16 20:03:47 +01:00
Harald Welte 158a7ca881 Add L3_Common for shared L3 functions between MSC and SGSN testing
Change-Id: I16e80df610235849180dc946f9457302deafb9d2
2018-02-16 20:03:47 +01:00
Harald Welte e5695f5544 msc: move f_gen_{imei,imsi,msisdn} to L3_Templates.ttcn
This allows them to be reused in upcoming SGSN tests.

Change-Id: I0459eeb44e58342da656f2312560466698374b72
2018-02-16 20:03:47 +01:00
Harald Welte 38575a753b L3_Templates: Add various GMM related templates
... needed for upcoming SGSN testing

Change-Id: I2026c5db3d709566dc3764515d3711b361d82a06
2018-02-16 20:03:47 +01:00
Harald Welte c7adaa722b Osmocom_Types: Add bool2bit() and bool2bit_templ()
Those can be very handy to convert boolean values and templates
to the BIT1 type that is used a lot in Ericsson code.

Change-Id: I137595edabd2bbf5e6cf8bf9bdb73b3589c94c64
2018-02-16 20:03:47 +01:00
Harald Welte 853c0ada1d BSSGP_Emulation: Remove one level of indent (like most other code)
Change-Id: I1d6de5404dbf907f663ec89b1847c6de84d5d858
2018-02-16 20:03:47 +01:00
Harald Welte 96a33b00c9 sgsn: Skeleton of a SGSN test fremwork
Based on the exsting NS/BSSGP emulation as well as the VTY, GSUP and
CTRL implementations, we are now building a test framework skeleton
for osmo-sgsn.

Change-Id: Icce90f9d8a680c7a523163e2c0bc03d12ff857e2
2018-02-16 20:03:47 +01:00
Harald Welte e0abc47d32 Migrate Gb (NS/BSSGP) code over to Ericsson NS/BSSGP modules
When we started out, Ericsson hadn't released yet their NS and BSSGP
modules.  Let's port our logic over to their encoder/decoders, as they
are more complete (but less regular / more difficult to use).

Change-Id: Icbc4f5d24f3419f99c9a4805f836bddd2849f492
2018-02-16 18:35:44 +00:00
Philipp Maier 2f8eed0aac BSC: Update BSC_Tests.cfg
The provided BSC_Tests.cfg, which contains as a commented line for
local debugging, does not contain all tests from the control section.

- Update BSC_Tests.cfg so that it contains all tests from the
  control section

Change-Id: I67f5906c3c67ae5793d88eee81b58ceac0bed658
2018-02-16 19:09:00 +01:00
Philipp Maier 70558e3780 BSC: add codec-list to osmo-bsc.cfg
The provided osmo-bsc.cfg does not contain any codec list, this
causes failure of the assignment related tests.

- add missing codec list

Change-Id: Id2509bcac4c54c910efd2db749eaa2085daa358d
2018-02-16 19:09:00 +01:00
Philipp Maier b8e8a1da0e BSC: remove obsolete loglevels from osmo-bsc.cfg
The provided osmo-bsc.cfg contains obsolete log levels.

- Remove obsolete loglevels

Change-Id: I00001c949b69ecaef8a8ed0163779a470378ab08
2018-02-16 19:09:00 +01:00
Philipp Maier 779a7923c7 BSC: add TC_paging_counter to control section
The testcase TC_paging_counter is missing in the control section.
This means that if it is not started explicitly, it is not executed.

- Add TC_paging_counter to control section

Change-Id: Ie37b8cb554ea1db64a8d7927eb300d368ce67137
2018-02-16 19:09:00 +01:00
Philipp Maier 956a92f036 BSC: Do not access unbound BTS objects
BTS[1] in function f_start_handler() is not always populated.

- Check BTS[1] before accessing it.

Change-Id: I37fdf7e6ef521677613f4eadc6f1ea236c04ce8e
2018-02-16 19:09:00 +01:00
Harald Welte 23b774ea48 Move f_hex_is_odd_length from BSSMAP_Templates to GSM_Types
It's a quite frequent requirement in encoding IMSI/BCD numbers, so
let's move it to the more generic GSM_Types module.

Change-Id: I6fb8d9a6f37c990f6901fb48b15312a157954fda
2018-02-16 17:50:35 +00:00
Harald Welte 73489404fd General_Types: Add INT18b_BO_LAST type
Change-Id: I9611cad26bf9a447e63462caa608da1f5888a9d8
2018-02-16 18:43:47 +01:00
Harald Welte ecb8f68c0d gprs: Move BSSGP related code to library
Change-Id: I9e13c63cc12c88be82124a8e3ce3c315b7b3a1fa
2018-02-16 18:33:59 +01:00
Harald Welte fc5e1c85a4 gprs: Move NS Types/CodecPort/Emulation to library directory
Change-Id: I876ce0e981d70ff0e737175983002268fd690989
2018-02-16 18:33:55 +01:00