lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

March 2026

  • 1 participants
  • 1933 discussions
[L] Change in pysim[master]: docs: auto-generate Card Filesystem Reference
by fixeria 01 Apr '26

01 Apr '26
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>
1 0
0 0
[L] Change in pysim[master]: docs: auto-generate Card Filesystem Reference
by fixeria 01 Apr '26

01 Apr '26
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>
1 0
0 0
[XS] Change in pysim[master]: docs/conf.py: add autodoc_mock_imports for klein and twisted
by fixeria 31 Mar '26

31 Mar '26
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>
1 0
0 0
[S] Change in pysim[master]: docs/conf.py: silence autosectionlabel duplicate-label warnings
by fixeria 31 Mar '26

31 Mar '26
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/42543?usp=email ) Change subject: docs/conf.py: silence autosectionlabel duplicate-label warnings ...................................................................... docs/conf.py: silence autosectionlabel duplicate-label warnings sphinxarg.ext generates generic sub-headings ("Named arguments", "Positional arguments", "Sub-commands", "General options", ...) for every argparse command and tool. These repeat across many files and trigger large numbers of autosectionlabel duplicate-label warnings. Two-pronged fix: * `autosectionlabel_maxdepth = 3` eliminates the depth-4+ warnings (sub-headings inside each individual command block). * `suppress_warnings` per file silences the residual depth-3 collisions ("serial reader", "decode_hex", "sub-commands", ...) that still appear across tool documentation files. Cross-references into these generic argparse-generated sections are not a supported use-case, so suppressing the warnings is appropriate. Change-Id: I9cdf2a4f6cbd435b16b90ab668205600ffd7c3b0 --- M docs/conf.py 1 file changed, 17 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve diff --git a/docs/conf.py b/docs/conf.py index ef40070..dc86817 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -64,3 +64,20 @@ html_static_path = ['_static'] autoclass_content = 'both' + +# Workaround for duplicate label warnings: +# https://github.com/sphinx-doc/sphinx-argparse/issues/14 +# +# sphinxarg.ext generates generic sub-headings ("Named arguments", +# "Positional arguments", "Sub-commands", "General options", ...) for every +# argparse command/tool. These repeat across many files and trigger tons +# of autosectionlabel duplicate-label warnings - suppress them. +autosectionlabel_maxdepth = 3 +suppress_warnings = [ + 'autosectionlabel.saip-tool', + 'autosectionlabel.shell', + 'autosectionlabel.smpp2sim', + 'autosectionlabel.smpp-ota-tool', + 'autosectionlabel.suci-keytool', + 'autosectionlabel.trace', +] -- To view, visit https://gerrit.osmocom.org/c/pysim/+/42543?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: I9cdf2a4f6cbd435b16b90ab668205600ffd7c3b0 Gerrit-Change-Number: 42543 Gerrit-PatchSet: 3 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>
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua_asp_fsm: Stop T(ack) when receiving an Error msg as response
by pespin 31 Mar '26

31 Mar '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42568?usp=email ) Change subject: xua_asp_fsm: Stop T(ack) when receiving an Error msg as response ...................................................................... xua_asp_fsm: Stop T(ack) when receiving an Error msg as response There's no need to keep retrying retransmission if the peer already told us something is wrong with the message. Change-Id: Icaeb472fe67911eb15755442cf11010d3c593f1d --- M src/m3ua.c M src/xua_asp_fsm.c M src/xua_asp_fsm.h 3 files changed, 26 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/68/42568/1 diff --git a/src/m3ua.c b/src/m3ua.c index 2dd8dfb..a22a64a 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -694,15 +694,13 @@ static int m3ua_rx_mgmt_err(struct osmo_ss7_asp *asp, struct xua_msg *xua) { uint32_t err_code = xua_msg_get_u32(xua, M3UA_IEI_ERR_CODE); - struct osmo_xlm_prim *prim; LOGPASP(asp, DLM3UA, LOGL_ERROR, "Received MGMT_ERR '%s': %s\n", get_value_string(m3ua_err_names, err_code), xua_msg_dump(xua, &xua_dialect_m3ua)); - /* report this to layer manager */ - prim = xua_xlm_prim_alloc_m_error_ind(err_code); - xua_asp_send_xlm_prim(asp, prim); + /* deliver that event to the ASP FSM */ + osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_MGMT_ERROR, xua); /* NEVER return != 0 here, as we cannot respont to an ERR * message with another ERR! */ diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 72cb40e..fcb9200 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -74,6 +74,8 @@ { XUA_ASP_E_ASPSM_BEAT, "ASPSM_BEAT" }, { XUA_ASP_E_ASPSM_BEAT_ACK, "ASPSM_BEAT_ACK" }, + { XUA_ASP_E_MGMT_ERROR, "XUA_ASP_E_MGMT_ERROR" }, + { XUA_ASP_E_AS_ASSIGNED, "AS_ASSIGNED" }, { XUA_ASP_E_ADM_BLOCKED, "ADM_BLOCKED" }, @@ -374,6 +376,12 @@ } /* check if expected message was received + stop t_ack */ +static void stop_t_ack(struct osmo_fsm_inst *fi) +{ + struct xua_asp_fsm_priv *xafp = fi->priv; + LOGPFSML(fi, LOGL_DEBUG, "T(ack) stopped\n"); + osmo_timer_del(&xafp->t_ack.timer); +} static void check_stop_t_ack(struct osmo_fsm_inst *fi, uint32_t event) { struct xua_asp_fsm_priv *xafp = fi->priv; @@ -383,10 +391,8 @@ return; exp_ack = evt_ack_map[xafp->t_ack.out_event]; - if (exp_ack && event == exp_ack) { - LOGPFSML(fi, LOGL_DEBUG, "T(ack) stopped\n"); - osmo_timer_del(&xafp->t_ack.timer); - } + if (exp_ack && event == exp_ack) + stop_t_ack(fi); } static void xua_t_beat_stop(struct osmo_fsm_inst *fi) @@ -875,6 +881,7 @@ struct xua_asp_fsm_priv *xafp = fi->priv; struct osmo_ss7_asp *asp = xafp->asp; struct xua_msg *xua; + struct osmo_xlm_prim *oxp; switch (event) { case XUA_ASP_E_SCTP_COMM_DOWN_IND: @@ -892,6 +899,15 @@ LOGPFSML(fi, LOGL_DEBUG, "Rx HEARTBEAT ACK\n"); xafp->t_beat.unacked_beats = 0; break; + case XUA_ASP_E_MGMT_ERROR: + xua = data; + OSMO_ASSERT(xua); + /* Mark ongoing request as rejected, no need to retransmit: */ + stop_t_ack(fi); + /* report this to layer manager */ + oxp = xua_xlm_prim_alloc_m_error_ind(xua_msg_get_u32(xua, M3UA_IEI_ERR_CODE)); + xua_asp_send_xlm_prim(asp, oxp); + break; case XUA_ASP_E_AS_ASSIGNED: /* Ignore, only used in IPA asps so far. */ break; @@ -1000,6 +1016,7 @@ S(XUA_ASP_E_SCTP_RESTART_IND) | S(XUA_ASP_E_ASPSM_BEAT) | S(XUA_ASP_E_ASPSM_BEAT_ACK) | + S(XUA_ASP_E_MGMT_ERROR) | S(XUA_ASP_E_AS_ASSIGNED) | S(XUA_ASP_E_ADM_BLOCKED), .allstate_action = xua_asp_allstate, diff --git a/src/xua_asp_fsm.h b/src/xua_asp_fsm.h index 52d5f4b..456aec6 100644 --- a/src/xua_asp_fsm.h +++ b/src/xua_asp_fsm.h @@ -28,6 +28,9 @@ XUA_ASP_E_ASPSM_BEAT, XUA_ASP_E_ASPSM_BEAT_ACK, + /* Rx M3UA MGMT Error message from peer */ + XUA_ASP_E_MGMT_ERROR, + /* The ASP was added to an AS. data: (struct osmo_ss7_as *) */ XUA_ASP_E_AS_ASSIGNED, -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42568?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: Icaeb472fe67911eb15755442cf11010d3c593f1d Gerrit-Change-Number: 42568 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua_lm: Handle rx of unsolicited ASPIA ACK
by pespin 31 Mar '26

31 Mar '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42569?usp=email ) Change subject: xua_lm: Handle rx of unsolicited ASPIA ACK ...................................................................... xua_lm: Handle rx of unsolicited ASPIA ACK Related: OS#6752 Change-Id: Ica4fbaefd08cdb5c4ca2e2a608606ddbec85297c --- M src/xua_default_lm_fsm.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/69/42569/1 diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index dbca526..dbe88e1 100644 --- a/src/xua_default_lm_fsm.c +++ b/src/xua_default_lm_fsm.c @@ -62,6 +62,7 @@ LM_E_ASP_UP_CONF, LM_E_ASP_UP_IND, LM_E_ASP_ACT_IND, + LM_E_ASP_INACT_CONF, LM_E_ASP_INACT_IND, LM_E_NOTIFY_IND, LM_E_ERROR_IND, @@ -77,6 +78,7 @@ { LM_E_ASP_UP_CONF, "ASP-UP.conf" }, { LM_E_ASP_UP_IND, "ASP-UP.ind" }, { LM_E_ASP_ACT_IND, "ASP-ACT.ind" }, + { LM_E_ASP_INACT_CONF, "ASP-INACT.conf" }, { LM_E_ASP_INACT_IND, "ASP-INACT.ind" }, { LM_E_NOTIFY_IND, "NOTIFY.ind" }, { LM_E_ERROR_IND, "ERROR.ind" }, @@ -328,6 +330,14 @@ /* This may come in IPSP if we received ASPAC from peer before it answered our ASPAC: */ ENSURE_IPSP(fi, event); break; + case LM_E_ASP_INACT_CONF: + ENSURE_ASP_OR_IPSP(fi, event); + /* RFC 4666 RFC4666 4.3.4.4: Rx unsolicited ASPIA ACK, usually triggered because + * peer's ASP became administratively blocked. + * Try to re-activate, if peer's ASP is indeed blocked we'll probably receive an + * ERR msg and continue from there in the case LM_E_ERROR_IND below. */ + xlm_sap_down_simple(lmp->asp, OSMO_XLM_PRIM_M_ASP_ACTIVE, PRIM_OP_REQUEST); + break; case LM_E_AS_INACTIVE_IND: /* request the ASP to go into active state */ xlm_sap_down_simple(lmp->asp, OSMO_XLM_PRIM_M_ASP_ACTIVE, PRIM_OP_REQUEST); @@ -442,6 +452,7 @@ }, [S_ACTIVE] = { .in_event_mask = S(LM_E_ASP_ACT_IND) | + S(LM_E_ASP_INACT_CONF) | S(LM_E_AS_INACTIVE_IND) | S(LM_E_NOTIFY_IND) | S(LM_E_ERROR_IND), @@ -459,6 +470,7 @@ { XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_UP, PRIM_OP_CONFIRM, LM_E_ASP_UP_CONF }, { XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_UP, PRIM_OP_INDICATION, LM_E_ASP_UP_IND }, { XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_ACTIVE, PRIM_OP_INDICATION, LM_E_ASP_ACT_IND }, + { XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_INACTIVE, PRIM_OP_CONFIRM, LM_E_ASP_INACT_CONF }, { XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_INACTIVE, PRIM_OP_INDICATION, LM_E_ASP_INACT_IND }, { XUA_SAP_LM, OSMO_XLM_PRIM_M_AS_STATUS, PRIM_OP_INDICATION, LM_E_AS_STATUS_IND }, { XUA_SAP_LM, OSMO_XLM_PRIM_M_NOTIFY, PRIM_OP_INDICATION, LM_E_NOTIFY_IND }, -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42569?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: Ica4fbaefd08cdb5c4ca2e2a608606ddbec85297c Gerrit-Change-Number: 42569 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: pysim/pcsc: do not use getProtocol for protocol selection
by laforge 31 Mar '26

31 Mar '26
Attention is currently required from: dexter, fixeria, jolly. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42475?usp=email ) Change subject: pysim/pcsc: do not use getProtocol for protocol selection ...................................................................... Patch Set 3: Code-Review+1 (1 comment) Patchset: PS1: > I have now added a comment. I have also checked pyscard manual again. […] Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/42475?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: Ib119948aa68c430e42ac84daec8b9bd542db7963 Gerrit-Change-Number: 42475 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 31 Mar 2026 15:40:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-sigtran[master]: xua_rkm: send_reg_req: Avoid adding Routing Context with value 0
by pespin 31 Mar '26

31 Mar '26
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>
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua_asp_fsm: Include Routing Context IE in Err msg cuase Invalid Rout...
by pespin 31 Mar '26

31 Mar '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42537?usp=email ) Change subject: xua_asp_fsm: Include Routing Context IE in Err msg cuase Invalid Routing Context ...................................................................... xua_asp_fsm: Include Routing Context IE in Err msg cuase Invalid Routing Context As per RFC4666 3.8.1: """ For this error, the invalid Routing Context(s) MUST be included in the Error message. """ Change-Id: Ia8bff16248967209d73cd6d5b54ac30fda283247 --- M src/xua_asp_fsm.c 1 file changed, 14 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index d627795..8524c4d 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -304,7 +304,9 @@ return osmo_ss7_asp_send(asp, msg); } -static int peer_send_error(struct osmo_fsm_inst *fi, uint32_t err_code) +/* Transmit an Error MGMT message (RFC4666 3.8.1) + * rctx_be and rctx_size is raw data as obtained from originating message with "xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX)" */ +static int peer_send_error_ext(struct osmo_fsm_inst *fi, uint32_t err_code, const uint8_t *rctx_be, unsigned int rctx_size) { struct xua_asp_fsm_priv *xafp = fi->priv; struct osmo_ss7_asp *asp = xafp->asp; @@ -317,6 +319,9 @@ xua->hdr.version = SUA_VERSION; xua_msg_add_u32(xua, SUA_IEI_ERR_CODE, err_code); + if (rctx_be && rctx_size > 0) + xua_msg_add_data(xua, M3UA_IEI_ROUTE_CTX, rctx_size, rctx_be); + msg = xua_to_msg(SUA_VERSION, xua); xua_msg_free(xua); if (!msg) @@ -325,6 +330,11 @@ return osmo_ss7_asp_send(asp, msg); } +static int peer_send_error(struct osmo_fsm_inst *fi, uint32_t err_code) +{ + return peer_send_error_ext(fi, err_code, NULL, 0); +} + static void xua_t_ack_cb(void *data) { struct osmo_fsm_inst *fi = data; @@ -703,13 +713,14 @@ } if ((part = xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX))) { for (i = 0; i < part->len / sizeof(uint32_t); i++) { - uint32_t rctx = osmo_load32be(&part->dat[i * sizeof(uint32_t)]); + uint8_t *rctx_raw = &part->dat[i * sizeof(uint32_t)]; + uint32_t rctx = osmo_load32be(rctx_raw); as = ss7_asp_find_as_by_rctx(asp, rctx); if (!as) { LOGPFSML(fi, LOGL_NOTICE, "ASPAC: Couldn't find any AS with rctx=%u. Check your config!\n", rctx); - peer_send_error(fi, M3UA_ERR_INVAL_ROUT_CTX); + peer_send_error_ext(fi, M3UA_ERR_INVAL_ROUT_CTX, rctx_raw, sizeof(uint32_t)); return; } } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42537?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: Ia8bff16248967209d73cd6d5b54ac30fda283247 Gerrit-Change-Number: 42537 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>
1 0
0 0
[S] Change in libosmo-sigtran[master]: m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Inval...
by pespin 31 Mar '26

31 Mar '26
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>
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • ...
  • 194
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.