Commit Graph

4234 Commits

Author SHA1 Message Date
Pau Espin 74f5350824 epdg: Add README.md
Change-Id: I6326b6c35f66d30787758d83e96e8a070375b0c0
2024-04-26 22:25:41 +00:00
Pau Espin 2ed9f5f398 SIP_Emulation: Remove duplicated map()
The map() is already done before the component is started, f_init_sip().
It's better doing it there because then it's up to the creator of the
SIP_Emulation component to establish the name of the system port, hence
allowing multiple instances which can be configured differently (eg.
different bind ip+port).

Change-Id: I5632c94d03a9dce0d04d94766ce72e6700b6116b
2024-04-25 13:14:15 +02:00
Vadim Yanitskiy 11f8ac8761 {cbc,remsim}: fix unbound 'use_ssl' field in HTTP_Adapter_Params
A recent commit added a new field to record HTTP_Adapter_Params, but
forgot to update the callers f_http_init() to actually set this field.

Change-Id: I534d087b71cefd683a0c7411a415049c5e1ee519
Fixes: 832b1efe "HTTP_Adapter: Allow API users to enable/disable SSL"
2024-04-25 09:18:54 +00:00
Pau Espin de7a48529a asterisk: Use Titan TEXT encoder to implement AMI record enc/dec
f_ami_wait_for_prompt_str had to be fixed since it was returning content
like this:
"Response: Success\nMessage: Authentication accepted"
Instead, the TEXT encoding expects:
"Response: Success\nMessage: Authentication accepted\n"
which is actually more in line with proper expectancies.

Change-Id: If179e45307a7e42b81b28db6ee4b7bf5eeb8b5f1
2024-04-25 09:15:31 +00:00
Philipp Maier 4a24fb0632 SGP32Definitions_Templates: add new set of templates to support rollback
This patch adds a number of templates that are needed to test profile
rollback.

Related: SYS#6563
Change-Id: I6db76afb102bf011655b7dbca9cff07b8116eb8d
2024-04-24 12:47:57 +02:00
Philipp Maier e4de06eb40 SGP32Definitions_Templates: add template tr_provideEimPackageResult_ePRAndNotif
Add a new template to verify the provideEimPackageResult request (ESipa)
from the IPAd

Related: SYS#6563
Change-Id: I86231f0e9dcef90abf60757cc55895863ad2b1b3
2024-04-24 12:47:57 +02:00
Philipp Maier 88f2481e17 SGP32Definitions_Templates: rename tx_provideEimPackageResultResponse
The template tr_provideEimPackageResultResponse and ts_provideEimPackageResultResponse
should be renamed to tr_provideEimPackageResultResponse_eimAck and
ts_provideEimPackageResultResponse_eimAck as the TODO message says.

Related: SYS#6563
Change-Id: I68536eec6d04364efdbbbd5205788cf5c8ab3028
2024-04-24 12:47:57 +02:00
Philipp Maier ac10ceed6b SGP32Definitions_Templates: use enable instead of configureAutoEnable PSMO
The "enable" psmo is a more common example than the configureAutoEnable
PSMO.

Related: SYS#6563
Change-Id: Ia364d5f6d510545988dc88cacdd15a2c03cc5d8b
2024-04-24 12:47:57 +02:00
Philipp Maier 978ab44492 SGP32Definitions_Templates: add missing new line at the end of file
Related: SYS#6563
Change-Id: I0e7c3b514ba6569c3707ae20ed213591ca7d0e1c
2024-04-24 12:47:57 +02:00
Philipp Maier 832b1efe9b HTTP_Adapter: Allow API users to enable/disable SSL
At the moment HTTP_Adapter has no option to enable SSL

Related: SYS#6824
Change-Id: I6487deea50cd9b4ed4905d9a3a78e00def8ea319
2024-04-24 12:47:57 +02:00
Philipp Maier 260f7087ba HTTP_Adapter: put HTTP config options into a record
The function f_http_init currently takes only two config options. For the
moment this is not a problem, but the amount of additional options may grow
in the future. So let's put the options in a record to have them separate.

Change-Id: I4c1c204ea38d76d5fdd7e539d56ca2bf9f693d7d
Related: SYS#6824
2024-04-24 12:47:57 +02:00
Philipp Maier ef20fa083b HTTP_Adapter: allow body to be "omit"
In HTTP not all requests have a body. At the moment we describe a
missing body with body := "". This is not 100% correct since the rest of
the code interprets this as a present body with zero length and will put
a content_length = 0 header line into the HTTP header, even in the GET
request. This will most likely be ignored by any HTTP server, but it is
still not 100% spec compliant.

Related: SYS#6824
Change-Id: Ifedc8c2a590835663d1ba0b08b1fe4d54bdd0fff
2024-04-24 12:47:57 +02:00
Philipp Maier 6406e6d9db HTTP_Adapter: allow API users to specifiy custom header
At the moment HTTP_Adapter can only make requests with a fixed
pre-defined HTTP header. However, some application may require
additional custom header lines or different values than the ones
specified in the pre-defined HTTP header.

Related: SYS#6824
Change-Id: I115fd14254e0957c0955649aeb47059dc180bf57
2024-04-24 12:47:57 +02:00
Philipp Maier d9887d364d SGP32Definitions_Templates: remove unrelated template parameter
The template parameter eimFqdn is not relevant for this kind of
template.

Change-Id: I365fe15a22a98ced5c6a5d13b2700df1df13014b
Related: SYS#6563
2024-04-22 13:04:42 +02:00
Vadim Yanitskiy aaf7ce4ae8 fixup: sgsn: fix unused param in f_routing_area_update()
In 1ee1edd2 I changed f_routing_area_update() to actually use the
given RAI as Old RAI in the Routing Area Update Request.  Not only
this broke the testcase scenario (Old RAI shall remain unchanged!),
but also started triggering a use-after-free bug in osmo-sgsn.

Passing 'ran_index := 1' is enough for the second Routing Area Update
Request to show up with a different RAI (at BSSGP level), however the
Old RAI IE shall obviously indicate the *old* RAI, not the new one.

A follow-up commit will add a separate testcase to reproduce the
use-after-free problem in osmo-sgsn.

Change-Id: Ib16985cb08834a238ca4f7a747c43097f430ed6f
Fixes: 1ee1edd2 "sgsn: fix unused param in f_routing_area_update()"
Related: OS#6439
2024-04-21 20:49:15 +07:00
Vadim Yanitskiy 74b12c7592 sgsn: TC_sgsn_context_req_in: match MM Context & GSN Address IEs
Change-Id: Ie68794c309e548279381d044a3e34dcdf405084f
Related: SYS#6603, OS#6294
2024-04-19 17:34:18 +07:00
Vadim Yanitskiy acd0b39f79 sgsn: add testcases for SGSN Context Request procedure
Change-Id: If71de10897a8a9f6612cd46c760cd89c0299ac2c
Related: SYS#6603, OS#6294
2024-04-19 17:34:15 +07:00
Vadim Yanitskiy 95fb629544 library: GTPv1C: fix ts_MM_Context{GSM,UMTS} templates
Set the values according to 3GPP TS 29.060 version 17.4.0 Release 17.

* Field 'spare' is defined as 'Spare 1111' in Table 40 (missing '1').
* Field 'spare1' is defined as 'Spare 111' in Table 41.
* Field 'security' must be set as per Table 47.

Change-Id: Ic8abb048f7c1fa795ee472820c5b88de0073dc66
Fixes: f95460b55 "GTP_Templates: Add templates for some GTPv1C IEs"
Fixes: fdde16846 "library: GTPv1C add ts_MM_ContextGSM"
2024-04-19 09:56:44 +00:00
Vadim Yanitskiy 061c36d22b library: GTPv1C: make ts_GTPC_SGSNContextAck more compact
Change-Id: I9b0c948f295fd73fad79c8d09b45fd992c90a015
2024-04-19 09:56:44 +00:00
Pau Espin 95ad6a0112 SIP_Templates: Make tag collisions harder
It was spotted during some test runs that the same tag was assigned to 2
different components. Let's make this way more difficult by adding some
time to it. Asterisk uses longer strings for instance, since 32bits is
the minimum.

Change-Id: Iba26259fd48da1c2558451fe5f7014151d4935c8
2024-04-18 20:17:42 +02:00
Pau Espin caf028d643 asterisk: Split SIPConnHdlr to its own file
Change-Id: I168920887bfd05c0a1785c5cb7ac485edaef0df2
2024-04-18 19:54:42 +02:00
Pau Espin 54b614ad5d Asterisk: Initial AMI support
Introduce config and functions around TELNETasp_PT to implement an AMI
interface client to interact with Asterisk.

So far only the "Action: Login" case is implemented.

Change-Id: I2c570e4d04e7ab8c44962cf484e4bbc946209aee
2024-04-18 14:14:02 +02:00
Philipp Maier 4a19b474a9 HTTP_Adapter: add HOST field to header lines.
In HTTP 1.1 (this is what the HTTP_Adapter uses), the Host header field
is mandatory, see also: RFC 2616, section 14.23.

Related: SYS#6824
Change-Id: Id4b2220da4b2b5fbe74cdc2776cf66d6b34ddbcf
2024-04-18 12:06:45 +00:00
Vadim Yanitskiy 3d81576263 sgsn: derive altsteps from f_routing_area_update()
Change-Id: I7d5ec9c42a37a5746c36745ac738fd77e1632675
Related: SYS#6603, OS#6294
2024-04-18 09:56:49 +00:00
Vadim Yanitskiy 1ee1edd20e sgsn: fix unused param in f_routing_area_update()
Change-Id: I582b2836eba3188cfd4c640b1febbd25c50001e0
Related: SYS#6603, OS#6294
2024-04-18 09:56:49 +00:00
Vadim Yanitskiy fdde16846b library: GTPv1C add ts_MM_ContextGSM
Change-Id: I483fdd0dee6e0ee92fcee798d8e85a80d1e0be8b
Related: SYS#6603, OS#6294
2024-04-18 09:56:49 +00:00
Vadim Yanitskiy 1e869a26a6 library: cosmetic: fix code formatting
Change-Id: Ic87f6e8dcb8e507d21082f28217c015ff2e5204b
Related: SYS#6603, OS#6294
2024-04-18 09:56:49 +00:00
Pau Espin 601b5cddc9 Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn
This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I54eff3eea60ed0624919baebfe0ff7393414d6b8
2024-04-18 11:07:08 +02:00
Pau Espin 830061d271 Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn
This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I105844d2bcab6c24624be1224c1ba78b69d4b44c
2024-04-18 11:07:08 +02:00
Pau Espin a1d113ae1e bsc: Early shutdown upon BSSMAP RESET-ACK timeout
Change-Id: I75e098d387562267d5851bc753e27e40186827ed
2024-04-16 21:03:23 +02:00
Pau Espin fa2095bcfb hnbgw: TC_hnb_register_duplicate: Fix 2nd HNB_REG_REQ containing different LAC
Change-Id: I7f5d8d8403211488966fc30bf4d82e894664df51
2024-04-16 18:08:15 +02:00
Pau Espin e9c6c7b97e hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the one in docker-playground
Change-Id: I02338c4bc43e04d47c92c484532fcc48edf0222d
2024-04-16 18:08:11 +02:00
Pau Espin b6be06a70c hnbgw: Add new recent tests to expected-results.xml
Change-Id: I317773de2a38b37e5b8c7f12ff4be9c4a9b8fbce
2024-04-16 13:58:29 +02:00
Pau Espin 47384ba910 ggsn: TC_gy_charging_volume_quota_threshold: Fix Gy Threshold/Quota expectancies
open5gs got the Gy Thresholds fixed recently
(e078b33f0c4d6f34d8991f8ad211dd2d9ea977a0).

AS shown in 3GPP TS 29.244 C.2.1.1 diagram, in Diameter Gy the value
sets the trigger for the "remaining credit", not the "used credit".
"ThresholdPFCP = Quota - ThresholdGy"

The test needs to be adapted since it was wrong too.

Change-Id: Ia283ad4919813241e3c33465ba4be2d2e33f5e54
2024-04-16 11:06:55 +00:00
Pau Espin 831cb69a93 hnbgw: Provide proper params to set StatsD local ip/port
The StatsD init() function parameter names were misleading
(prefixed "dst_" while they are actualy "local_" ones).
As a result, the hnbgw test was passing the wrong values to it.

Change-Id: I213173c99ec314c2eebfb8836c4d3467b3a7f818
2024-04-16 12:42:30 +02:00
Vadim Yanitskiy f4ba2252de msc: expect TC_attached_imsi_lu_unknown_tmsi to pass
The "VLR evil twin" problem has been fixed in osmo-msc.git:

https://gerrit.osmocom.org/c/osmo-msc/+/36452
https://cgit.osmocom.org/osmo-msc/commit/?id=2fd69e15d36d5a8e87029741ad66632c57d24cd4

And the testcase is finally passing now.

Change-Id: I57a277fa7e6e0d10ff38e23f416ace87472e6602
Related: OS#4721
2024-04-15 15:18:28 +00:00
Neels Hofmeyr 06dec6b324 msc: expand TC_lu_tmsi_noauth_notmsi
From running this test repeatedly, I noticed that osmo-msc's new patch
to avoid storing a TMSI may also trigger more evil twin situations in
the VLR as described in OS#4721.

Always run this test twice, to probe for the evil twin problem.

This test will pass from osmo-msc patch
Ifdabe0b65bffafbf7b8e5cc10e2d225d1ed1cecd on.

Depends: osmo-msc Ifdabe0b65bffafbf7b8e5cc10e2d225d1ed1cecd
Related: SYS#6860 OS#4721
Change-Id: I5e596597add7d585efd27c850067b8d7ba34ecc0
2024-04-15 15:18:28 +00:00
Neels Hofmeyr a8a2c5e5f6 msc: add TC_lu_tmsi_noauth_notmsi
Add test case for handling a LU by TMSI MI when 'no assign-tmsi' is
configured.

This test will pass from osmo-msc patch
I583682d1a35a70b008d7bb2d89ba7c3109a60b21 on

Depends: osmo-msc I583682d1a35a70b008d7bb2d89ba7c3109a60b21
Related: SYS#6860 OS#4721
Change-Id: If10b9987395670b084ff8ad6d1f033ff46896d75
2024-04-15 15:18:28 +00:00
Neels Hofmeyr 392de2d5c5 msc: add mi arg to f_perform_lu()
Allow testing Location Updating by TMSI MI.

Prepares for TC_lu_tmsi_noauth_notmsi in
If10b9987395670b084ff8ad6d1f033ff46896d75

Change-Id: I31aad8eb751528f7237a892702e87ee5855cabbb
2024-04-15 15:18:28 +00:00
Neels Hofmeyr a250d7e962 msc: allow f_verify_vty_lac_ci() to pass for CompL3 by TMSI MI
Obviously, when only a TMSI has been used, searching for an IMSI will
return no subscriber. Don't fail in that case when testing for
verify_vlr := false.

Prepares TC_lu_tmsi_noauth_notmsi in
If10b9987395670b084ff8ad6d1f033ff46896d75

Related: SYS#6860 OS#4721
Change-Id: I4d719928f04e5a47d415c38f835451b1f10c713d
2024-04-15 15:18:28 +00:00
Vadim Yanitskiy 53f2be6b4e msc: derive altsteps from f_expect_paging() and use them
Change-Id: Ia0e787fc376acec09e8985a63862872eb89b53a4
2024-04-15 15:18:28 +00:00
Vadim Yanitskiy eb81ca46dc msc: rework f_expect_paging(): handle mismatch and timeout
When a received Paging mismatches, instead of waiting for Tguard
timeout, fail immediately.  Add a local timer and wait 4.0 seconds
by default.

Change-Id: I30273e3882e348a2ded88b7b96a5ec1473a56913
Tweaked-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
2024-04-15 15:18:28 +00:00
Neels Hofmeyr 1af4b0f625 msc: f_expect_paging(): fix by_tmsi arg
The by_tmsi argument so far had no effect. But I actually need exactly
this in upcoming MSC_Tests.TC_lu_tmsi_noauth_notmsi(): expect a Paging
with explicitly no TMSI included.

Related: SYS#6860 OS#4721
Change-Id: I9434745b7faeb738caafed8080b9f7b1a6a8079a
2024-04-15 15:18:28 +00:00
Pau Espin c77743d544 pcu: Update component diagram
The component architecture in PCU_Tests is quite complex to follow.
Update the diagram in order to make it easier for people to gasp the big
picture.

Change-Id: Ie592a9301b7a900334650741ed633cd70535a2b1
2024-04-15 08:55:36 +00:00
Neels Hofmeyr d076e93507 ran-emu: allow receiving Paging without a TMSI
Fix access of non-present tMSI.* if tMSI == omit, allowing to match
incoming Paging with a UnitData receiver that has no TMSI.

Change-Id: I1bdf3488be0f8d4f0905665c4ba642f9468b9777
2024-04-14 13:10:09 +00:00
Harald Welte 904b5f1a56 hnbgw: Implement validation of [some] counters
Let's use the StatsD_Checker to verify that counters increment when
we expect them to.

Change-Id: Ib0e2dd23802b18f4bd417150d0b62954b1d459a4
2024-04-13 16:26:10 +00:00
Harald Welte 7a9e79645c hnbgw: Use iddentical LAC/RAC/SAC values
Let's not use different values on RANAP and HNBAP, but derive on from
the other.

Change-Id: If4d82dc350c072e3528097d850304514adf65340
2024-04-13 16:26:05 +00:00
Harald Welte f95ab2d0a0 hnbgw: Test normal and abnormal RAB release
Change-Id: I7b57d4f9bd39820829ae9d52ae6e2f098e75de71
2024-04-13 16:26:05 +00:00
Harald Welte 1818834e6f hnbgw: Use "NAS/Normal" as default release cause
We shouldn't run all of our tests with a rather exotic release
cause value (O&M intervention) but assume a normal/orderly NAS
triggered release, unless a specific test case explicitly tests
an abnormal release cause.

Change-Id: I8ddd1dccc5637431e3a8c6e607e0e45faa82b5b5
2024-04-13 16:26:05 +00:00
Harald Welte 0d4a843fd3 hnbgw: Make RAB release cause configurable
Change-Id: Ie072dafbc3378739d41411632e33a8a1ec1ed572
2024-04-13 16:26:05 +00:00