Commit Graph

145 Commits

Author SHA1 Message Date
Alexander Couzens 667dd7fa84 sgsn: add TC_attach_no_imei_response
Ignores Identity Request IMEI.

MS -> SGSN: Attach Request IMSI
MS <- SGSN: Identity Request IMSI (optional)
MS -> SGSN: Identity Response IMSI (optional)
MS <- SGSN: Identity Request IMEI
MS -x SGSN: no response
MS <- SGSN: re-send: Identity Request IMEI 4x
MS <- SGSN: Attach Reject

Change-Id: Ie50c75e62e31e01c5b17969fb067664e44fd68a5
2018-06-12 19:21:16 +02:00
Alexander Couzens 234c588b72 sgsn: TC_hlr_location_cancel_*: 5 seconds timeout is to short
These tests failed on jenkins.

Change-Id: I56a62e70763b7c331fc528cd7e4064a5ec9f2a04
2018-06-12 13:51:14 +02:00
Alexander Couzens ace6fc65be SGSN: fix spaces/tabs in TC_hlr_location_cancel_request_unknown_subscriber_{withdraw,update}
Fixes: 6c47f29495 ("SGSN: add TC_hlr_location_cancel_request_unknown_subscriber_{withdraw,update}")
Change-Id: I5074dadf53ec75a9c709b28ff324e23fdcd13bfa
2018-06-12 13:51:14 +02:00
Alexander Couzens 5e307b49ab SGSN: add TC_hlr_location_cancel_request_update
MS <-> SGSN: GMM Attach
HLR -> SGSN: Cancel Location Request
HLR <- SGSN: Cancel Location Ack

Change-Id: I5d3a818eb0a4eb3b0d4bd7bd88874bd2ac6adb11
2018-05-29 16:08:23 +00:00
Alexander Couzens 6c47f29495 SGSN: add TC_hlr_location_cancel_request_unknown_subscriber_{withdraw,update}
Cancel Location using an unknown IMSI.

HLR -> SGSN: Cancel Location Request
HLR <- SGSN: Cancel Location Error

Change-Id: Iad90c3cc25d72b9ab40e358fe60aa6f62163f146
2018-05-26 21:03:54 +00:00
Alexander Couzens c87967a022 SGSN: add TC_hlr_location_cancel_request
MS <-> SGSN: GMM Attach
HLR -> SGSN: Cancel Location Request
HLR <- SGSN: Cancel Location Ack
MS  <- SGSN: Detach Request
SGSN->   MS: Detach Complete

Change-Id: Id5d6b018a5a4389eefa8f5d950324aab91709f5a
2018-05-26 21:03:54 +00:00
Alexander Couzens 5844d5b2ec sgsn: fix a typo in comment
Change-Id: I061aba5af1e466b33472c9f829b982823bcff71e
2018-05-15 20:54:37 +00:00
Alexander Couzens 80ec1ea42d sgsn: fix RAU_ATTACH not to interact with following testes
TC_attach_rau will interact with the following tests, because the sgsn
is continuing sending RAU_ACCEPTs until it timed out or received a
RAU COMPLETE

Change-Id: Idac92bd61ee7145b7542e60c24e0a66b4ff7ddd4
2018-05-15 18:59:14 +02:00
Alexander Couzens 187ad5da87 sgsn: add test for attach_second_attempt
Do an attach direct after an attach succeeded.
Relates: OS#2958

Change-Id: I767c3e3b0af6e7c6a1f9436fd17e2f515b0bbd05
2018-05-03 04:25:10 +02:00
Alexander Couzens 8f0fb009b7 sgsn: fix typo in comment of BSSGP_ConnHdlrPars:imsi
Change-Id: I544a626d914075c0fcf13017553017b898525e8c
2018-05-03 04:25:08 +02:00
Neels Hofmeyr 0ecb2e3516 sgsn: test umts aka with gsm sres response
Add ability to test UMTS AKA, by f_gmm_attach() with flags to select UMTS AKA
and to respond to it with GSM AKA SRES.

Add TC_attach_umts_aka_umts_res and TC_attach_umts_aka_gsm_sres.

Change existing TC_attach_* to also call f_gmm_attach(). (Actually,
f_gmm_attach() is almost exactly the previous TC_attach function body.)

osmo-sgsn change I36807bad3bc55c0030d4f09cb2c369714f24bec7 will implement
proper handling of GSM AKA response and make TC_attach_umts_aka_gsm_sres pass.

Related: OS#3193 OS#3224
Change-Id: I201ffeaee4439a413ab8289aceeccca9aba40a7a
2018-05-02 09:14:36 +00:00
Neels Hofmeyr 8df7d15a66 sgsn: test GMM Attach with 3-digit leading-zero MNC
Add general infrastructure to
- pass an MCC-MNC for BSSGP to use into f_init();
- verify that the Attach Accept PLMN matches the BSSGP one.

Add TC_attach_mnc3() to feed an MNC with three digits and a leading zero, to
verify the recent mnc3 patches. When testing against a libosmocore and
osmo-sgsn before mnc3, this results in:

Test case TC_attach_mnc3 finished. Verdict: fail reason: "mismatching PLMN in Attach Accept: 02342F; expected 023042"

With the current master branches the proper 3-digit MNC with leading zero is
fed back into the Attach Accept message.

Change-Id: I8901ec0b090e342ebb04a04f9d759fc46c7d9cab
2018-03-16 18:47:19 +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 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 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 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 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 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 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