Commit Graph

30 Commits

Author SHA1 Message Date
Pau Espin a88e51d7ad mme: TC_s1ap_tau_unknown_guti: expect UeContextReleaseCmd
The MME is sending the message after TAU Reject, and it may be forwarded
through TTCN3 components while some of them are already being torn down
since the test is finished.

Change-Id: I6b915d0e32a46fa9546b3b1b96aa69ad43baae9e
2024-01-08 15:52:31 +01:00
Pau Espin 209d0a4ce1 mme: Use LAC from SGSN with most significat bit set to 0
According to 3GPP TS 23.003 sec 2.8.2.2.2, LACs from GERAN are
configured with MSB 0 in order to differentiate it from EUTRAN ones.
This is used by MMEs to figure out if the peer is an SGSN, based on
the the LAC mapped into MME group ID in GUTI .

Change-Id: Iaf89228f6f026e04d5f583211959025e6d8d4a1d
2024-01-03 13:15:13 +01:00
Pau Espin 11625856eb mme: Parametrize RAI+CI used by emulated SGSN
This will be used further in subsequent tests, plus it is configured in
the sgsn peer list of open5gs-mmed.cfg, so it knows how to route/find
SGSN peers.

Change-Id: Ia7d807bb5d75d711be7d4f6fbccd8fd123da171f
2024-01-03 13:15:13 +01:00
Pau Espin 78c5e4128d mme: TC_ue_cell_reselect_eutran_to_geran: Make sure oI flag is not set in DeleteSessionReq
Make sure Operation Indication is set to 0, to tell the SGW to keep the Session up at the PGW.

Change-Id: If863f260a274fec5921ed888216c1688ff115ade
2024-01-03 13:15:13 +01:00
Pau Espin 35c0cc2d2a mme: Trigger last parts of procedure TC_ue_cell_reselect_eutran_to_geran
Some later parts of the 4G->2G cell reselection where missing, mostly
related to tear down after MS has successfuly moved to the new SGSN. mainly:
- S6a Diameter Cancel Location Req + Answer initiated by HSS.
- Handle UeReleaseContextCommand and answer with
  UeReleaseContextComplete, emulating the ENB.
- handle S11 GTPv2C Delete Session Request and answer with Delete
  Session Response, emulating the SGW.

Change-Id: Ic0263a3aec922194aad22b031b2c82a99954354d
2024-01-03 13:15:03 +01:00
Pau Espin 278f543102 mme: expect EMM Information received after attach
open5gs-mmed transmits it after attach  complete.
Read it so that it's not kept queued in the port and follow-up uses of
the port don't provide unexpected results.

Change-Id: I6f19a18cced7acd2b831c943e8b3a1f462378435
2023-12-21 19:21:31 +01:00
Pau Espin 117a94f333 Split Diameter TS 29.272 templates into its own file
This allows more easily finding, understanding and using the tons of
templates coming from different specs.

Change-Id: I2e6b813a9e4ff98eef575aaaf46dbcf9f1a5d2d4
2023-12-21 16:16:17 +01:00
Pau Espin ae747ac46f mme: Fix tests reusing IMSI suffix
Use value 0 to indicate that the test is not really using the generated
imsi, to easily increment it for tests requiring it.

Change-Id: Ia9d70c125b92352f50adfa80a6cb916bfc8acf99
2023-12-20 20:55:34 +01:00
Pau Espin ca651b54ad mme: Fix TEID values used in test
Related: OS#6294
Change-Id: I5a32491a00eb6bad505e4bcf9a88017382073138
2023-12-20 18:54:44 +01:00
Pau Espin 408e0ae554 mme: Introduce test TC_ue_cell_reselect_eutran_to_geran
Initial bits to be able to test SGSN Context Request+Response emulating
an UE doing cell reselection from 4G to 2G.

Related: OS#6294
Change-Id: I707cb8c6b39c1440db5ccc2f02d08337b38fb564
2023-12-19 13:35:22 +01:00
Pau Espin ecfc7d61e6 mme: Implement missing UE attach steps
Related: OS#6294
Change-Id: Ib4a69aef40bf9dd17d640f650e459668f8415aaa
2023-12-15 15:05:31 +01:00
Pau Espin cc9b804d69 mme: Fix local port passed as remote port in Gn interface
Change-Id: Ia94f50a11292a83dcbd2da8d6df608ef71842b50
2023-09-21 17:45:11 +02:00
Philipp Maier f74f319ea5 TC_s1ap_attach: setup S11 interface, catch Create Session Request
The testcase TC_s1ap_attach is not complete yet. Since the testsuite
lacked the S11 interface, it was not possible to develop the testcase
beond the S1AP/NAS-EPS Security Mode Command. However, the S11 interface
is now available to the testsuite, so let's show that it works by
catching the Create Session Request. Let's also put a TODO that the
testcase needs to be completed still.

Related: OS#5760
Change-Id: I6350a3d5cab33fa4f43e4cdcbd7bf3241821d233
2023-09-12 09:26:44 +00:00
Philipp Maier 26a09f39bd MME_Tests: add new testcase TC_s1ap_tau_unknown_guti
A tracking area update that contains an OldGUTI (TMSI) that is unknown
to the MME should be rejected.

Related: OS#5760
Change-Id: I9306fea69ac930b9642528e2fd32a7091147081e
2023-09-01 17:23:45 +02:00
Philipp Maier ce50b12034 MME_Tests: remove unused timer variable
The Timer T in TC_RIM_RAN_INF is not used, let's remove it.

Related: OS#5760
Change-Id: I3d18cda38789e5a42536fd17b6641efa725f757b
2023-09-01 17:23:35 +02:00
Philipp Maier 9abb8c920b MME_Tests: Add S11/GTPv2 interface
The S11 interface is used by the MME to talk to the SGW-C. At the moment
we do not simulate the S11 interface in our testcases. This is in particular
a problem for TC_s1ap_attach, which needs to answer the Create Session
Request, comming from the MME in order to continue.

As a first step, lets add evrything that is required to run an S11
interface in the testsuite.

Change-Id: I545dd6cef3cef7283f2e04c2406a2703c2fdd01a
Related: OS#5760
2023-09-01 17:23:25 +02:00
Pau Espin db017f49ae DIAMETER_Emulation: Support forwarding messages identified by ete_id to a client component
This is useful in the scenarios where the client component submits a
IMSI-based transaction such as AIR, but its answer (AIA) contains no
IMSI (as per what's specified in TS 29.272 5.2.3.1). As a result, the
received AIA message would be enqueued in the DIAMETER_UNIT.

With this new feature, the test can create an expect using the
End-to-End Identifier of the message it is going to transmit, and
receive the answer in the same DIAMETER_CLIENT port the request was
transmitted, even if it contains no IMSI.

Related: OS#5757
Change-Id: I25e44146d2c49e308c1fb490b499e70ac6045f2f
2023-08-26 07:27:15 +00:00
Philipp Maier 46059f081c MME_Tests: add testcase TC_s1ap_reset
There is currently no testcase that makes sure that the S1AP reset
works.

Related: OS#5760
Change-Id: I23f4d5f2c39790b6cb0dacaec1e31912177af3ec
2023-08-22 14:39:41 +00:00
Philipp Maier a9306201f0 MME_Tests: add testcase TC_RIM_RAN_INF
The proposed testcase models a full RIM RAN INFORMATION REQUEST that
originates at the eNB (S1AP), is forwarded by the MME towards GERAN
(GTP) and goes back towards the MME (GTP) and is eventually forwarded
by the MME back to the eNB (S1AP).

Related: OS#5760
Related: OS#5759
Change-Id: I22d5aaab64df2824099977fb574afb86a4b7e91f
2023-08-09 11:33:55 +02:00
Philipp Maier 74d776a2b1 MME_Tests: add Gn interface
To test the planned Gn connectivity support in open5gs MME the testsuite
also requires support for such an interface. This patch adds the
connection handler, provided by GTP_Emulation.ttcn to the connection
handler in MME_Tests.ttcn, along with a simple GTP ECHO REQUEST
testcase.

Related: OS#5760
Change-Id: I38b668df15b3dd10542b4aa8790b9ea33c1f9635
2023-07-17 12:37:53 +00:00
Philipp Maier 7147c92010 S1AP_Emulation: add missing create_cb
At the moment we do not have a default implementation for the create_cb.
The create_cb is called to resolve the vc_conn to which a subscriber
communication belongs in case it is not found in the S1apAssociationTable,
then it is resolved from an S1apExpectTable instead.

The current implementation uses the IMSI as key to resolve the vc_conn
from the S1apExpectTable, this might not work since in S1AP the UE
context is identfied by an MME_UE_S1AP_ID / ENB_UE_S1AP_ID pair.

Related: OS#5760
Change-Id: I758e7c8d8cc445cf18acdd7a25dcde8846fd84e5
2023-07-11 12:48:52 +02:00
Pau Espin 33b4749fcf lib/DIAMETER: Allow sending CEA with AuthAppId
The new message is to be used by Gy interface emulation, which according
to RFC4006 uses AppId 4 "Credit Control Application". The application
is apparently not 3GPP vendor specific.

Change-Id: I0e33673d65140aad34d2efcae3c7f49154ceb99f
2022-03-14 12:05:37 +01:00
Vadim Yanitskiy b46f01e130 library/DIAMETER_Emulation: implement 'raw' mode of operation
This patch implements a new mode of operation, which allows to
have direct communication between the emulation component and
the other component connected via the 'DIAMETER_UNIT' port.
This eliminates the need to have dedicated components for each
IMSI, what is not necessarily needed in some specific cases.

Change-Id: I52e22ac70cc85be5b0436b68c77356aabc4f05e1
Related: SYS#5602
2022-01-31 09:56:51 +00:00
Vadim Yanitskiy 2dba494201 library/DIAMETER_Templates: prettify & enrich AIR/AIA templates
* Make both {hbh,ete}_id parameters last among the others;
* Use more elegant and consistent template formatting;
* Make DestinationRealm value configurable;
* Make SessionId value configurable.

Change-Id: Iaf6472fecbadd58e86b78c59348d9924ab57f97d
Related: SYS#5602
2021-12-15 05:12:13 +03:00
Vadim Yanitskiy 0e8f516d22 library/DIAMETER_Templates: rework existing ULR/ULA templates
* Make both {hbh,ete}_id parameters last among the others;
* Use more elegant and consistent template formatting;
* Make Origin{Host,Realm} values configurable;
* Make DestinationRealm value configurable;
* Make SessionId value configurable.

Change-Id: I0585e306a87453c212c6b5ac5635181c47b34b4f
Related: SYS#5602
2021-12-15 05:00:54 +03:00
Harald Welte d01b5d0af0 DIAMETER_Emulation: Notify user of CapabilityExchange
During start of the test case, we must wait until the IUT has
established a DIAMETER/SCTP connection to the testsuite.  Implement
this by means of a message on the DIAMETER_UNIT port and an associated
helper function.

Change-Id: I95434307efc67025ee6d373561f6d22398f959c5
2020-04-26 22:08:34 +02:00
Harald Welte 61f73d553b DIAMETER: parametrize CEA template
So far, we hard-coded the Capabilities-Exchange-Answer for
HSS emulation.  As we want to emulate other DIAMETER network
elements, let's parametrize the template as well as the respective
parameters for the emulation component.

Change-Id: Ie30ff1bac40ab3dc6058587f0586b643ff2b0cb6
2020-04-26 22:08:34 +02:00
Harald Welte 6ec643950e mme: Integrate DIAMETER support into MME testsuite
The test suite can now send/receive DIAMETER messages via related test
ports.

Change-Id: I1691f87e19cced79ab0f9c3bb87608fc63e21eab
2019-08-18 17:14:20 +00:00
Harald Welte 95333a16eb mme: Extend MME tests to also include S1AP interface testing
The tests so far only tested SGsAP alone, which doesn't get us very
far.  Let's add interfacing with the S1, too.

Change-Id: Id54071b901db720a0f88b91cdc5a8e09bea0fb58
2019-08-18 17:14:20 +00:00
Harald Welte b8a4ac80a6 mme: initial skeleton for MME / SGsAP tetss
Change-Id: Idbd54838daaf12acccc3253dc4278de75eaaaf31
2019-08-15 09:49:11 +00:00