pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43261?usp=email )
Change subject: sgsn: Fail in obvious way when unexpected ServiceAccept is received
......................................................................
sgsn: Fail in obvious way when unexpected ServiceAccept is received
since osmo-ttcn3-haks.git 2ff5b2633a43cecaed75b30b85537d6de3a52c97, the
code doesn't expect to receive a ServiceAccept after SecurityCommand,
ie. osmo-sgsn is wrong. As a result, tests such as
TC_attach_pdp_act_user end up failing with a tGuard timeout waiting for
a RAB ASs Req. The result is confusing since osmo-sgsn actually sends
the RAB Ass Req, but since the unexpected ServiceAccept is first in the
queue, the ttcn3 code doesn't process the RAB Ass Req.
Make the test explicitly fail if something else from RAB Ass Req is in
the queue preventing reading from it.
Change-Id: Ifbb7da1d02c8bde3406a9dd445c03ed140b8c0a3
---
M sgsn/BSSGP_ConnHdlr.ttcn
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/61/43261/1
diff --git a/sgsn/BSSGP_ConnHdlr.ttcn b/sgsn/BSSGP_ConnHdlr.ttcn
index eac01d5..696aa83 100644
--- a/sgsn/BSSGP_ConnHdlr.ttcn
+++ b/sgsn/BSSGP_ConnHdlr.ttcn
@@ -1053,6 +1053,7 @@
function f_pdp_ctx_act(inout PdpActPars apars, boolean send_recovery := false, integer ran_index := 0, float Tval := 5.0)
runs on BSSGP_ConnHdlr {
timer T := Tval;
+ var RANAP_PDU rx_ranap;
f_pdp_tx_ctx_act(apars, ran_index);
as_ggsn_gtp_ctx_act_req(apars, send_recovery := send_recovery);
@@ -1065,6 +1066,14 @@
send_recovery := send_recovery,
ran_index := ran_index);
}
+ [] RAN_CONN.receive(RANAP_PDU:?) -> value rx_ranap {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Rx unexpected RANAP msg ", rx_ranap, " while waiting for RAB ASS REQ"));
+ }
+ [] RAN_CONN.receive {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "Rx unexpected msg while waiting for RAB ASS REQ");
+ }
[] T.timeout {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
"Timeout waiting for RANAP RAB AssReq");
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43261?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifbb7da1d02c8bde3406a9dd445c03ed140b8c0a3
Gerrit-Change-Number: 43261
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/43255?usp=email )
Change subject: OBS: switch PyHSS source to upstream
......................................................................
OBS: switch PyHSS source to upstream
I have upstreamed all Osmocom specific changes to PyHSS proper and they
are now in the 2.0.0 release:
https://github.com/nickvsnetworking/pyhss/releases/tag/2.0.0
The pyhss_download_deps.sh has been reworked and now lives upstream too:
https://github.com/nickvsnetworking/pyhss/blob/master/debian/pyhss_download…
Change-Id: I1a536988dc4da162b978b7f34c668e3fb3085eaa
---
D scripts/obs/data/pyhss_download_deps.sh
M scripts/obs/lib/config.py
M scripts/obs/lib/srcpkg.py
3 files changed, 2 insertions(+), 102 deletions(-)
Approvals:
fixeria: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/scripts/obs/data/pyhss_download_deps.sh b/scripts/obs/data/pyhss_download_deps.sh
deleted file mode 100644
index b8b2b64..0000000
--- a/scripts/obs/data/pyhss_download_deps.sh
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/bin/sh -e
-# Copyright 2025 sysmocom - s.f.m.c. GmbH
-# SPDX-License-Identifier: GPL-3.0-or-later
-# This script downloads all dependencies of PyHSS from the python package
-# index, either as binary package for all python versions and CPU architectures
-# we care about, or as source package depending on what is available.
-
-check_cwd() {
- if ! [ -e services/hssService.py ]; then
- echo "ERROR: run this script from the PyHSS directory"
- exit 1
- fi
- if [ -d debian/deps ]; then
- echo "ERROR: debian/deps exists already!"
- exit 1
- fi
-}
-
-download_deps() {
- local srcpkgs=_temp/requirements-source.txt
- local binpkgs=_temp/requirements-binary.txt
- local py_ver
- local python_versions="
- 3.11
- 3.12
- 3.13
- 3.14
- "
- # See e.g. https://pypi.org/project/SQLAlchemy/#files
- local platform
- local platforms="
- manylinux_2_17_aarch64
- manylinux_2_17_x86_64
- "
-
- rm -rf _temp
- mkdir _temp
-
- while IFS= read -r line; do
- case "$line" in
- # These packages are only available as sources
- mongo*|pymongo*|mysqlclient*|pysctp*|pycryptodome=*)
- echo "$line" >>"$srcpkgs"
- ;;
- # The rest is available as binary packages. This is
- # preferred as dependencies for building some of these
- # are not always available in the target distributions
- # (e.g. pydantic-core is written in rust and tooling
- # for building python + rust is not in debian 12).
- *)
- echo "$line" >>"$binpkgs"
- ;;
- esac
- done < "requirements.txt"
-
- # Build system dependencies must also be installed as we will build
- # offline with --no-index and pip won't use system libraries:
- # https://github.com/pypa/pip/issues/5696
- echo "setuptools" >>"$binpkgs"
- echo "wheel" >>"$binpkgs"
- echo "hatchling" >>"$binpkgs"
-
- echo ":: Downloading source packages"
- pip download \
- --dest debian/deps \
- --no-binary=:all: \
- -r "$srcpkgs"
-
- for py_ver in $python_versions; do
- for platform in $platforms; do
- echo ":: Downloading binary packages (python $py_ver, platform $platform)"
- local binpkgs_extra=""
-
- # Redis depends on async-timeout, which has been upstreamed
- # into Python 3.11+. This means "pip download" may not download
- # it if it runs with a more recent python version, but older
- # distros (debian 12) will need it.
- if [ "$py_ver" = "3.11" ]; then
- binpkgs_extra="async-timeout"
- fi
-
- pip download \
- --dest debian/deps \
- --python-version "$py_ver" \
- --platform "$platform" \
- --only-binary=:all: \
- -r "$binpkgs" \
- $binpkgs_extra
- done
- done
-
- rm -r _temp
-}
-
-check_cwd
-download_deps
-
-echo ":: Success"
diff --git a/scripts/obs/lib/config.py b/scripts/obs/lib/config.py
index b1384fd..5b37adb 100644
--- a/scripts/obs/lib/config.py
+++ b/scripts/obs/lib/config.py
@@ -112,13 +112,12 @@
"rtl-sdr": "https://gitea.osmocom.org/sdr/rtl-sdr",
"strongswan-epdg": "https://gitea.osmocom.org/ims-volte-vowifi/strongswan-epdg",
"libosmo-sccp-legacy": "https://gitea.osmocom.org/osmocom/libosmo-sccp-legacy",
- "pyhss": "https://gitea.osmocom.org/osmocom/pyhss",
+ "pyhss": "https://github.com/nickvsnetworking/pyhss",
}
git_branch_default = "master"
git_branch_other = {
"open5gs": "main",
- "pyhss": "osmocom/master",
}
def tag_pattern(prefix: str = '',
@@ -133,7 +132,6 @@
"gapk": tag_pattern('v', c=r'(\.\d+)?'),
"open5gs": tag_pattern('v'),
"osmo-fl2k": tag_pattern('v'),
- "pyhss": tag_pattern(suffix='-osmocom\\d+'),
"rtl-sdr": tag_pattern('v'),
"strongswan-epdg": tag_pattern('osmo-epdg-', c=r'\.[0-9a-z]+'),
"wireshark": tag_pattern('v', c=r'\.[0-9a-z]+'),
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index 8ed50df..40c1883 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -149,7 +149,7 @@
def prepare_project_pyhss():
repo_path = lib.git.get_repo_path("pyhss")
- script = os.path.join(lib.ci_obs_dir, "data/pyhss_download_deps.sh")
+ script = "debian/pyhss_download_deps.sh"
lib.run_cmd(["sh", "-e", script], cwd=repo_path)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/43255?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I1a536988dc4da162b978b7f34c668e3fb3085eaa
Gerrit-Change-Number: 43255
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: Hoernchen, laforge.
dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/43254?usp=email )
Change subject: ts_102_221: support EF.ARR record decoding for DF, not just EF
......................................................................
Patch Set 1: Code-Review+1
(4 comments)
Patchset:
PS1:
I have tried it out. It works fine. Except that I now also get a non working --decode-for-df flag on the regular read_record(s)_decoded commands.
File pySim/ts_102_221.py:
https://gerrit.osmocom.org/c/pysim/+/43254/comment/ace3729f_b226bf3e?usp=em… :
PS1, Line 755: arr_seq = self.__get_do_sequence(kwargs.get('encode_for_df', False))
I assume this is to maintain API consistency and possibly a future "update_arr_record" command.
https://gerrit.osmocom.org/c/pysim/+/43254/comment/421c5714_6bea3f9f?usp=em… :
PS1, Line 760: read_arr_argparser = copy.copy(LinFixedEF.ShellCommands.read_rec_dec_parser)
When I try this out and do a "read_record_decoded --help", I also get the --decode-for-df parameter in the helpscreen. I think you have to use copy.deepcopy here.
(This patch only adds the encode/decode variants to the read_arr_record(s) commands. Maye the feature would also be useful with the regular read_record_decoded commands as well?)
https://gerrit.osmocom.org/c/pysim/+/43254/comment/ae06672f_57beaa6b?usp=em… :
PS1, Line 761: read_arr_argparser.add_argument('--decode-for-df', action='store_true')
Maybe adding a help text like: help='decode EF.ARR record for DF' ?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43254?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I05e629e8b7dc705730d7039d2d0170ee24f8f844
Gerrit-Change-Number: 43254
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 17 Aug 2026 11:07:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/43257?usp=email )
Change subject: ranap_msg_factory: Fix API documentation regarding ip param endianness
......................................................................
ranap_msg_factory: Fix API documentation regarding ip param endianness
The param is clearly being expected as host-byte order because it
converts it when storing it into the sockaddr, which contains a net-byte
order.
Both users of these APIs, ie. osmo-sgsn and osmo-msc, actually end up
passing a host-byte order addr despite wrongly using htonl() instead of
ntohl(), but taking advantage of the fact that both functions do the
same:
* osmo-sgsn: sgsn_pdp_ctx_iu_rab_activate() does "htonl(pdp->lib->gsnru.v)",
where "v" is stored as network-byte order.
* osmo-msc: ran_iu_make_rab_assignment() does "osmo_htonl(inet_addr(ac->cn_rtp->ip))",
where clearly inet_addr returns anetwork-byte order.
Change-Id: I0a909019875714d35c27aa38dd5520a82d46e8f2
---
M src/ranap_msg_factory.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/57/43257/1
diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index 1005594..aecd7df 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -791,7 +791,7 @@
/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for CS (voice).
* See 3GPP TS 25.413 8.2.
* RAB ID: 3GPP TS 25.413 9.2.1.2.
- * \param rtp_ip MGW's RTP IPv4 address in *network* byte order.
+ * \param rtp_ip MGW's RTP IPv4 address in *host* byte order.
*/
struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip,
uint16_t rtp_port,
@@ -865,7 +865,7 @@
}
/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data)
- * \param gtp_ip SGSN's GTP IPv4 address in *network* byte order. */
+ * \param gtp_ip SGSN's GTP IPv4 address in *host* byte order. */
struct msgb *ranap_new_msg_rab_assign_data(uint8_t rab_id, uint32_t gtp_ip,
uint32_t gtp_tei, bool use_x213_nsap)
{
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/43257?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I0a909019875714d35c27aa38dd5520a82d46e8f2
Gerrit-Change-Number: 43257
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>