pespin has uploaded this change for review. ( 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, 6 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/62/42062/1
diff --git a/src/ss7_asp.c b/src/ss7_asp.c
index e69ffd1..6d73a32 100644
--- a/src/ss7_asp.c
+++ b/src/ss7_asp.c
@@ -919,8 +919,7 @@
}
/* Apply default LM FSM for client ASP */
- if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA &&
- asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP)
+ if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA)
asp->lm = xua_layer_manager_default_alloc(asp);
if ((rc = xua_asp_fsm_start(asp, LOGL_DEBUG)) < 0)
diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c
index bfd00e9..5d275c0 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: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I1f25cf8371ba72d710796e01a9a967d3fafffb99
Gerrit-Change-Number: 42062
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/60/42060/1
diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c
index aa60db2..bfd00e9 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: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ibdc04d9ece0b3955da44849755a87ec28c17f140
Gerrit-Change-Number: 42060
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/59/42059/1
diff --git a/src/ss7_asp.c b/src/ss7_asp.c
index 4109325..e69ffd1 100644
--- a/src/ss7_asp.c
+++ b/src/ss7_asp.c
@@ -920,8 +920,7 @@
/* Apply default LM FSM for client ASP */
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)
asp->lm = xua_layer_manager_default_alloc(asp);
if ((rc = xua_asp_fsm_start(asp, LOGL_DEBUG)) < 0)
--
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: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I5f0109463323f214e15610b2c4fe253b828fce3b
Gerrit-Change-Number: 42059
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42056?usp=email )
Change subject: Move osmo_xlm_sap_down to ss7_asp.c
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42056?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I9a8d0e0fc1fd193db8dd3901911848ed8564616f
Gerrit-Change-Number: 42056
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 05 Feb 2026 13:25:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42053?usp=email )
Change subject: ss7_asp: remove lm during ASP destroy
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42053?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Iee339b49d4b73a9afde60c4b8f6f5a03ad8a822d
Gerrit-Change-Number: 42053
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 05 Feb 2026 13:24:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42051?usp=email )
Change subject: Move osmo_xua_layer_manager definition to ss7_asp.h
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42051?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: If7efb8996de0c407f5a466ff959095c8872ddc76
Gerrit-Change-Number: 42051
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 05 Feb 2026 13:24:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: lynxis lazus.
laforge has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/pysim/+/42057?usp=email )
Change subject: euicc: extend get_profiles_info to retrieve all known tags
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42057?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: Ia6878519a480bd625bb1fa2567c1fd2e0e89b071
Gerrit-Change-Number: 42057
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 05 Feb 2026 13:23:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes