Attention is currently required from: dexter.
neels has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42043?usp=email )
Change subject: esim/http_json_api: add alternative API interface
......................................................................
Patch Set 6:
(2 comments)
Patchset:
PS6:
I would vote for a simpler approach, without needing to interfere with class instantiation: choose a different class name for the new client, leave the "legacy" class as-is, except, if needed, moving some bits to a new base class that old and new implementations can inherit from. IMHO that should be far easier to read and maintain.
File pySim/esim/http_json_api.py:
https://gerrit.osmocom.org/c/pysim/+/42043/comment/7f2a94a1_dc29af89?usp=em… :
PS6, Line 224: cls_attr = { attr_name: getattr(cls, attr_name) for attr_name in dir(cls) if not match("__.*__", attr_name) }
if not attr_name.startswith('__')
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42043?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: I2a5d4b59b12e08d5eae7a1215814d3a69c8921f6
Gerrit-Change-Number: 42043
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 09 Feb 2026 14:32:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42060?usp=email )
Change subject: xua_default_lm_fsm: Move timer_cb further below
......................................................................
xua_default_lm_fsm: Move timer_cb further below
As usually done in osmo_fsm implemnetations.
Change-Id: Ibdc04d9ece0b3955da44849755a87ec28c17f140
---
M src/xua_default_lm_fsm.c
1 file changed, 51 insertions(+), 52 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c
index 9c64ec4..2346ffb 100644
--- a/src/xua_default_lm_fsm.c
+++ b/src/xua_default_lm_fsm.c
@@ -185,58 +185,6 @@
}
}
-
-static int lm_timer_cb(struct osmo_fsm_inst *fi)
-{
- struct xua_layer_manager_default_priv *lmp = fi->priv;
- struct osmo_xlm_prim *prim;
- struct osmo_ss7_as *as;
-
- switch (fi->T) {
- case SS7_ASP_LM_T_WAIT_ASP_UP:
- /* we have been waiting for the ASP to come up, but it
- * failed to do so */
- LOGPFSML(fi, LOGL_NOTICE, "Peer didn't send any ASP_UP in time! Restarting ASP\n");
- ss7_asp_disconnect_stream(lmp->asp);
- break;
- case SS7_ASP_LM_T_WAIT_NOTIFY:
- if (lmp->asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_NO_NOTIFY) {
- /* some implementations don't send the NOTIFY which they SHOULD
- * according to RFC4666 (see OS#5145) */
- LOGPFSM(fi, "quirk no_notify active; locally emulate AS-INACTIVE.ind\n");
- osmo_fsm_inst_dispatch(fi, LM_E_AS_INACTIVE_IND, NULL);
- break;
- }
- /* No AS has reported via NOTIFY that is was
- * (statically) configured at the SG for this ASP, so
- * let's dynamically register */
- lm_fsm_state_chg(fi, S_RKM_REG);
- prim = xua_xlm_prim_alloc(OSMO_XLM_PRIM_M_RK_REG, PRIM_OP_REQUEST);
- OSMO_ASSERT(prim);
- as = find_first_as_in_asp(lmp->asp);
- if (!as) {
- LOGPFSML(fi, LOGL_ERROR, "Unable to find AS!\n");
- ss7_asp_disconnect_stream(lmp->asp);
- return 0;
- }
- /* Fill in settings from first AS (TODO: multiple AS support) */
- prim->u.rk_reg.key = as->cfg.routing_key;
- prim->u.rk_reg.traf_mode = as->cfg.mode;
- osmo_xlm_sap_down(lmp->asp, &prim->oph);
- break;
- case SS7_ASP_LM_T_WAIT_NOTIY_RKM:
- /* No AS has reported via NOTIFY even after dynamic RKM
- * configuration */
- ss7_asp_disconnect_stream(lmp->asp);
- break;
- case SS7_ASP_LM_T_WAIT_RK_REG_RESP:
- /* timeout of registration of routing key */
- ss7_asp_disconnect_stream(lmp->asp);
- break;
- }
- return 0;
-}
-
static void lm_wait_notify(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct xua_layer_manager_default_priv *lmp = fi->priv;
@@ -327,6 +275,57 @@
}
}
+static int lm_timer_cb(struct osmo_fsm_inst *fi)
+{
+ struct xua_layer_manager_default_priv *lmp = fi->priv;
+ struct osmo_xlm_prim *prim;
+ struct osmo_ss7_as *as;
+
+ switch (fi->T) {
+ case SS7_ASP_LM_T_WAIT_ASP_UP:
+ /* we have been waiting for the ASP to come up, but it
+ * failed to do so */
+ LOGPFSML(fi, LOGL_NOTICE, "Peer didn't send any ASP_UP in time! Restarting ASP\n");
+ ss7_asp_disconnect_stream(lmp->asp);
+ break;
+ case SS7_ASP_LM_T_WAIT_NOTIFY:
+ if (lmp->asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_NO_NOTIFY) {
+ /* some implementations don't send the NOTIFY which they SHOULD
+ * according to RFC4666 (see OS#5145) */
+ LOGPFSM(fi, "quirk no_notify active; locally emulate AS-INACTIVE.ind\n");
+ osmo_fsm_inst_dispatch(fi, LM_E_AS_INACTIVE_IND, NULL);
+ break;
+ }
+ /* No AS has reported via NOTIFY that is was
+ * (statically) configured at the SG for this ASP, so
+ * let's dynamically register */
+ lm_fsm_state_chg(fi, S_RKM_REG);
+ prim = xua_xlm_prim_alloc(OSMO_XLM_PRIM_M_RK_REG, PRIM_OP_REQUEST);
+ OSMO_ASSERT(prim);
+ as = find_first_as_in_asp(lmp->asp);
+ if (!as) {
+ LOGPFSML(fi, LOGL_ERROR, "Unable to find AS!\n");
+ ss7_asp_disconnect_stream(lmp->asp);
+ return 0;
+ }
+ /* Fill in settings from first AS (TODO: multiple AS support) */
+ prim->u.rk_reg.key = as->cfg.routing_key;
+ prim->u.rk_reg.traf_mode = as->cfg.mode;
+ osmo_xlm_sap_down(lmp->asp, &prim->oph);
+ break;
+ case SS7_ASP_LM_T_WAIT_NOTIY_RKM:
+ /* No AS has reported via NOTIFY even after dynamic RKM
+ * configuration */
+ ss7_asp_disconnect_stream(lmp->asp);
+ break;
+ case SS7_ASP_LM_T_WAIT_RK_REG_RESP:
+ /* timeout of registration of routing key */
+ ss7_asp_disconnect_stream(lmp->asp);
+ break;
+ }
+ return 0;
+}
+
static const struct osmo_fsm_state lm_states[] = {
[S_IDLE] = {
.in_event_mask = S(LM_E_SCTP_EST_IND),
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42060?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: Ibdc04d9ece0b3955da44849755a87ec28c17f140
Gerrit-Change-Number: 42060
Gerrit-PatchSet: 2
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42059?usp=email )
Change subject: lm: Use layer manager also on transport-role=server
......................................................................
lm: Use layer manager also on transport-role=server
The upper layers (M3UA) should behave similarly eg. on role ASP
independently of transport role being client or server.
Change-Id: I5f0109463323f214e15610b2c4fe253b828fce3b
---
M src/ss7_asp.c
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/ss7_asp.c b/src/ss7_asp.c
index 4314081..68c783e 100644
--- a/src/ss7_asp.c
+++ b/src/ss7_asp.c
@@ -703,8 +703,7 @@
{
OSMO_ASSERT(!asp->lm);
if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA ||
- asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP ||
- asp->cfg.is_server)
+ asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP)
return;
asp->lm = xua_layer_manager_default_alloc(asp);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42059?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: I5f0109463323f214e15610b2c4fe253b828fce3b
Gerrit-Change-Number: 42059
Gerrit-PatchSet: 2
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42025?usp=email )
Change subject: IPSP: don't route any incoming M3UA messages in IPSP case
......................................................................
IPSP: don't route any incoming M3UA messages in IPSP case
An IPSP is a point-to-point association, and we must not route any
such messages.
Change-Id: Iad7280619ec5814cda7a179418079048a5955976
---
M src/m3ua.c
1 file changed, 8 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
diff --git a/src/m3ua.c b/src/m3ua.c
index cad7889..42a9798 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -41,6 +41,7 @@
#include <osmocom/sigtran/protocol/sua.h>
#include "mtp3_hmdc.h"
+#include "mtp3_hmdt.h"
#include "xua_as_fsm.h"
#include "xua_asp_fsm.h"
#include "xua_internal.h"
@@ -667,8 +668,14 @@
xua_msg_free_tag(xua, M3UA_IEI_ROUTE_CTX);
}
+ /* an IPSP by definition is a peer-to-peer service that doesn't
+ * use a signaling gateway, and hence doesn't route messages.
+ * See RFC 4666 Section 1.4.3.4. */
/* xua ownership is passed here: */
- return mtp3_hmdc_rx_from_l2(asp->inst, xua);
+ if (asp->cfg.role == OSMO_SS7_ASP_ROLE_IPSP)
+ return mtp3_hmdt_message_for_distribution(asp->inst, xua);
+ else
+ return mtp3_hmdc_rx_from_l2(asp->inst, xua);
ret_free:
xua_msg_free(xua);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42025?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: Iad7280619ec5814cda7a179418079048a5955976
Gerrit-Change-Number: 42025
Gerrit-PatchSet: 2
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42026?usp=email )
Change subject: IPSP: Add a comment that it's intentional to drop all M3UA SNM for IPSP
......................................................................
IPSP: Add a comment that it's intentional to drop all M3UA SNM for IPSP
An IPSP doesn't have MTP3 network management.
Change-Id: I7b87bf03964e7e9aac683ad860e511f83a685821
---
M src/m3ua.c
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/src/m3ua.c b/src/m3ua.c
index 42a9798..44ae513 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -1149,6 +1149,8 @@
case OSMO_SS7_ASP_ROLE_ASP:
rc = m3ua_rx_snm_asp(asp, xua);
break;
+ case OSMO_SS7_ASP_ROLE_IPSP:
+ /* RFC 4666 Section 1.5.2: there is no MTP3 network management status information */
default:
rc = M3UA_ERR_UNSUPP_MSG_CLASS;
break;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42026?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: I7b87bf03964e7e9aac683ad860e511f83a685821
Gerrit-Change-Number: 42026
Gerrit-PatchSet: 2
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42062?usp=email )
Change subject: lm: Initialize layer manager also on role=SG
......................................................................
lm: Initialize layer manager also on role=SG
Right now the LM will stay in IDLE for role=SG, but it already provides
with an easier logic where all xUA ASPs (no matter their role) have an
associated FSM object, which can be extnded later on.
This way we already valdiate the FSM instance lifecycle wroks as
expected.
It also allows in the future more easily integrating the LM in role
IPSP, where it will need to be extended.
Change-Id: I1f25cf8371ba72d710796e01a9a967d3fafffb99
---
M src/ss7_asp.c
M src/xua_default_lm_fsm.c
2 files changed, 7 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/ss7_asp.c b/src/ss7_asp.c
index 68c783e..5e96519 100644
--- a/src/ss7_asp.c
+++ b/src/ss7_asp.c
@@ -702,8 +702,8 @@
static void ss7_asp_xua_layer_manager_start(struct osmo_ss7_asp *asp)
{
OSMO_ASSERT(!asp->lm);
- if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA ||
- asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP)
+ /* No LM in IPA */
+ if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA)
return;
asp->lm = xua_layer_manager_default_alloc(asp);
diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c
index 2346ffb..3e364c1 100644
--- a/src/xua_default_lm_fsm.c
+++ b/src/xua_default_lm_fsm.c
@@ -167,9 +167,11 @@
switch (event) {
case LM_E_SCTP_EST_IND:
- /* Try to transition to ASP-UP, wait to receive message for a few seconds */
- lm_fsm_state_chg(fi, S_WAIT_ASP_UP);
- osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_UP_REQ, NULL);
+ if (lmp->asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP) {
+ /* Try to transition to ASP-UP, wait to receive message for a few seconds */
+ lm_fsm_state_chg(fi, S_WAIT_ASP_UP);
+ osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_UP_REQ, NULL);
+ }
break;
}
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42062?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: I1f25cf8371ba72d710796e01a9a967d3fafffb99
Gerrit-Change-Number: 42062
Gerrit-PatchSet: 2
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42027?usp=email )
Change subject: IPSP: Allow vty-configuration of IPSP role "ASPs"
......................................................................
IPSP: Allow vty-configuration of IPSP role "ASPs"
We should now have everything in place to support IPSP-SE, let's
accept enabling IPSP role via the VTY.
Change-Id: I0f0fa881471b87a4bb82a0211c6fb6e4c50b48ec
---
M src/ss7_asp_vty.c
1 file changed, 2 insertions(+), 5 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/ss7_asp_vty.c b/src/ss7_asp_vty.c
index d54eb01..b7af9c9 100644
--- a/src/ss7_asp_vty.c
+++ b/src/ss7_asp_vty.c
@@ -414,15 +414,12 @@
{
struct osmo_ss7_asp *asp = vty->index;
- if (!strcmp(argv[0], "ipsp")) {
- vty_out(vty, "IPSP role isn't supported yet%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
-
if (!strcmp(argv[0], "sg"))
asp->cfg.role = OSMO_SS7_ASP_ROLE_SG;
else if (!strcmp(argv[0], "asp"))
asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP;
+ else if (!strcmp(argv[0], "ipsp"))
+ asp->cfg.role = OSMO_SS7_ASP_ROLE_IPSP;
else
OSMO_ASSERT(0);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42027?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: I0f0fa881471b87a4bb82a0211c6fb6e4c50b48ec
Gerrit-Change-Number: 42027
Gerrit-PatchSet: 2
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42028?usp=email )
Change subject: vty: Prohibit configuring an ASP as IPSP in an SG node
......................................................................
vty: Prohibit configuring an ASP as IPSP in an SG node
The spec explicitly prohibits it.
Change-Id: I38bbd9226bad478f8068d02f7a4d7b3711596208
---
M src/ss7_asp_vty.c
1 file changed, 9 insertions(+), 4 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
diff --git a/src/ss7_asp_vty.c b/src/ss7_asp_vty.c
index b7af9c9..27b7462 100644
--- a/src/ss7_asp_vty.c
+++ b/src/ss7_asp_vty.c
@@ -414,14 +414,19 @@
{
struct osmo_ss7_asp *asp = vty->index;
- if (!strcmp(argv[0], "sg"))
+ if (!strcmp(argv[0], "sg")) {
asp->cfg.role = OSMO_SS7_ASP_ROLE_SG;
- else if (!strcmp(argv[0], "asp"))
+ } else if (!strcmp(argv[0], "asp")) {
asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP;
- else if (!strcmp(argv[0], "ipsp"))
+ } else if (!strcmp(argv[0], "ipsp")) {
+ if (cs7_role == CS7_ROLE_SG) {
+ vty_out(vty, "IPSP role can't be used in an SG node since they are point-to-point%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
asp->cfg.role = OSMO_SS7_ASP_ROLE_IPSP;
- else
+ } else {
OSMO_ASSERT(0);
+ }
asp->cfg.role_set_by_vty = true;
return CMD_SUCCESS;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42028?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: I38bbd9226bad478f8068d02f7a4d7b3711596208
Gerrit-Change-Number: 42028
Gerrit-PatchSet: 2
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>