Attention is currently required from: laforge.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42551?usp=email )
Change subject: docs: auto-generate Card Filesystem Reference
......................................................................
Patch Set 3:
(1 comment)
File docs/pysim_fs_sphinx.py:
https://gerrit.osmocom.org/c/pysim/+/42551/comment/6533af5c_8d3730ed?usp=em… :
PS1, Line 57: 'pySim.sysmocom_sja2', 'DF_SYSTEM'),
> if we manually need to maintain this list here (which is error-prone) I think we should find a way h […]
Good idea. I have added a unit test that catches missing entries.
Tested manually by removing items from `SECTIONS[]` - seems to work.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42551?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: I06ddeefc6c11e04d7c24e116f3f39c8a6635856f
Gerrit-Change-Number: 42551
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 31 Mar 2026 21:55:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/42551?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: docs: auto-generate Card Filesystem Reference
......................................................................
docs: auto-generate Card Filesystem Reference
Add a Sphinx extension (docs/pysim_fs_sphinx.py) that hooks into the
builder-inited event and generates docs/filesystem.rst before Sphinx
reads any source files.
The generated page contains a hierarchical listing of all implemented
EFs and DFs, organised by application/specification (UICC/TS 102 221,
ADF.USIM/TS 31.102, ADF.ISIM/TS 31.103, SIM/TS 51.011). For each file,
the class docstring and any _test_de_encode / _test_decode vectors
are included as an encoding/decoding example table.
docs/filesystem.rst is fully generated at build time and is therefore
added to .gitignore.
Add tests/unittests/test_fs_coverage.py that walks all pySim.* modules
and verifies that every CardProfile, CardApplication, and standalone
CardDF subclass with EF/DF children is either listed in the SECTIONS
(and will appear in the docs) or explicitly EXCLUDED.
Change-Id: I06ddeefc6c11e04d7c24e116f3f39c8a6635856f
Related: OS#6316
---
M .gitignore
M docs/conf.py
M docs/index.rst
A docs/pysim_fs_sphinx.py
A tests/unittests/test_fs_coverage.py
5 files changed, 413 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/51/42551/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42551?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I06ddeefc6c11e04d7c24e116f3f39c8a6635856f
Gerrit-Change-Number: 42551
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/42546?usp=email )
Change subject: docs/conf.py: add autodoc_mock_imports for klein and twisted
......................................................................
docs/conf.py: add autodoc_mock_imports for klein and twisted
The eSIM SM-DP+ server modules (`pySim.esim.es2p`, `pySim.esim.es9p`,
`pySim.esim.http_json_api`) unconditionally import optional server-side
dependencies at module level:
pySim.esim.es2p -- from klein import Klein
pySim.esim.http_json_api -- from twisted.web.server import Request
Both imports fail during a docs build if the packages are absent or
broken, causing three "autodoc: failed to import" warnings and three
missing chapters in the generated manual.
Even when klein and twisted are installed, twisted 23.10.0 (the
version pulled in transitively by smpp.twisted3's `Twisted~=23.10.0`
constraint) is incompatible with Python 3.13+ because twisted.web.http
unconditionally executes `import cgi`, a module that was removed from
the standard library in Python 3.13.
Fix: add `autodoc_mock_imports = ['klein', 'twisted']` to conf.py.
Sphinx inserts mock entries into sys.modules before each autodoc import
attempt, so the modules can be imported and documented without requiring
the real packages to be importable at build time.
Change-Id: I71650466f02a6a6d150650deed167c05d2cb6e64
---
M docs/conf.py
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/docs/conf.py b/docs/conf.py
index dc86817..26e8e2a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -65,6 +65,10 @@
autoclass_content = 'both'
+# Mock optional server-side deps of es2p and http_json_api/es9p,
+# so that autodoc can import and document those modules.
+autodoc_mock_imports = ['klein', 'twisted']
+
# Workaround for duplicate label warnings:
# https://github.com/sphinx-doc/sphinx-argparse/issues/14
#
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42546?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I71650466f02a6a6d150650deed167c05d2cb6e64
Gerrit-Change-Number: 42546
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(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>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42567?usp=email )
Change subject: xua_rkm: send_reg_req: Avoid adding Routing Context with value 0
......................................................................
xua_rkm: send_reg_req: Avoid adding Routing Context with value 0
We use routing context 0 internally as "no routing context". Since the
Routing Context in the Routing KEy IE in RKM REG REQ is optional, if
local rctx is 0 (because we expect to get one allocated by the STP and
receive it through RKM REG RESP), avoid sending it with the value 0.
Change-Id: Iaa584fea3020af06951aea16e638ac6e6a84ae21
---
M src/xua_rkm.c
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/67/42567/1
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index 2e7c227..16b494b 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -120,13 +120,18 @@
{
struct msgb *msg = m3ua_msgb_alloc(__func__);
int tmod = osmo_ss7_tmode_to_xua(traf_mode);
+ uint16_t outter_len;
/* One individual Registration Request according to Chapter 3.6.1 */
msgb_put_u16(msg, M3UA_IEI_ROUT_KEY); /* outer IEI */
- msgb_put_u16(msg, 32 + 4); /* outer length */
+ outter_len = 24 + 4;
+ if (rkey->context > 0)
+ outter_len += 8;
+ msgb_put_u16(msg, outter_len); /* outer length */
/* nested IEIs */
msgb_t16l16vp_put_u32(msg, M3UA_IEI_LOC_RKEY_ID, rkey->l_rk_id);
- msgb_t16l16vp_put_u32(msg, M3UA_IEI_ROUTE_CTX, rkey->context);
+ if (rkey->context > 0)
+ msgb_t16l16vp_put_u32(msg, M3UA_IEI_ROUTE_CTX, rkey->context);
msgb_t16l16vp_put_u32(msg, M3UA_IEI_TRAF_MODE_TYP, tmod);
msgb_t16l16vp_put_u32(msg, M3UA_IEI_DEST_PC, rkey->pc);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42567?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Iaa584fea3020af06951aea16e638ac6e6a84ae21
Gerrit-Change-Number: 42567
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42536?usp=email )
Change subject: m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Invalid Routing Context
......................................................................
m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Invalid Routing Context
As per RFC4666 3.8.1:
"""
The "Invalid Routing Context" error is sent if a message is received
from a peer with an invalid (unconfigured) Routing Context value.
For this error, the invalid Routing Context(s) MUST be included in
the Error message."
"""
Hence add the originating Routing Context IE so the error message can be
further identified.
For the same reason, also add the Diagnostic Information for the
specific cases in the switch statement, and make them more robust about
possible null pointer dereference.
Change-Id: If821109701e315d17f5334c680670ea6c7bce3bd
---
M src/m3ua.c
1 file changed, 16 insertions(+), 8 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/m3ua.c b/src/m3ua.c
index 3980bd3..d982eeb 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -383,7 +383,6 @@
{
struct xua_msg *err = m3ua_gen_error(err_code);
struct xua_msg *xua;
- struct xua_msg_part *na_ie;
unsigned int len_max_40;
if (!err)
@@ -393,18 +392,27 @@
case M3UA_ERR_INVAL_NET_APPEAR:
/* Include NA IE in Error message. */
xua = xua_from_msg(M3UA_VERSION, msgb_length(msg), msgb_data(msg));
- na_ie = xua_msg_find_tag(xua, M3UA_IEI_NET_APPEAR);
- xua_msg_add_data(err, M3UA_IEI_NET_APPEAR, na_ie->len, na_ie->dat);
+ if (xua)
+ xua_msg_copy_part(err, M3UA_IEI_NET_APPEAR, xua, M3UA_IEI_NET_APPEAR);
+ xua_msg_free(xua);
+ break;
+ case M3UA_ERR_INVAL_ROUT_CTX:
+ /* Include Routing Context IE if available: */
+ xua = xua_from_msg(M3UA_VERSION, msgb_length(msg), msgb_data(msg));
+ if (xua)
+ xua_msg_copy_part(err, M3UA_IEI_ROUTE_CTX, xua, M3UA_IEI_ROUTE_CTX);
xua_msg_free(xua);
break;
default:
- len_max_40 = msgb_length(msg);
- if (len_max_40 > 40)
- len_max_40 = 40;
-
- xua_msg_add_data(err, M3UA_IEI_DIAG_INFO, len_max_40, msgb_data(msg));
+ break;
}
+ len_max_40 = msgb_length(msg);
+ if (len_max_40 > 40)
+ len_max_40 = 40;
+
+ xua_msg_add_data(err, M3UA_IEI_DIAG_INFO, len_max_40, msgb_data(msg));
+
return err;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42536?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: If821109701e315d17f5334c680670ea6c7bce3bd
Gerrit-Change-Number: 42536
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>