pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41512?usp=email )
Change subject: Destroy rkm_dyn_allocated AS automatically when running out of ASPs
......................................................................
Destroy rkm_dyn_allocated AS automatically when running out of ASPs
This allows merging the freeing of AS inside the ASP/AS FSMs.
It also should fix cases like SG in transport-role client.
Change-Id: I743af584cd77924654d22ccf5d36d4479ba3b7f5
---
M src/ss7_as.c
M src/ss7_asp.c
M src/xua_asp_fsm.c
M src/xua_rkm.c
4 files changed, 40 insertions(+), 23 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
diff --git a/src/ss7_as.c b/src/ss7_as.c
index cd6d66a..440385a 100644
--- a/src/ss7_as.c
+++ b/src/ss7_as.c
@@ -193,10 +193,13 @@
/*! \brief Delete given ASP from given AS
* \param[in] as Application Server from which \ref asp is deleted
* \param[in] asp Application Server Process to delete from \ref as
- * \returns 0 on success; negative in case of error */
+ * \returns 0 on success; negative in case of error
+ *
+ * \ref as may be freed during the function call. */
int ss7_as_del_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp)
{
unsigned int i;
+ bool found = false;
LOGPAS(as, DLSS7, LOGL_INFO, "Removing ASP %s from AS\n", asp->cfg.name);
@@ -211,11 +214,20 @@
for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
if (as->cfg.asps[i] == asp) {
as->cfg.asps[i] = NULL;
- return 0;
+ found = true;
+ break;
}
}
- return -EINVAL;
+ /* RKM-dynamically allocated AS: If there are no other ASPs, destroy the AS.
+ * RFC 4666 4.4.2: "If a Deregistration results in no more ASPs in an
+ * Application Server, an SG MAY delete the Routing Key data."
+ */
+ if (as->rkm_dyn_allocated && osmo_ss7_as_count_asp(as) == 0)
+ osmo_ss7_as_destroy(as);
+
+
+ return found ? 0 : -EINVAL;
}
/*! \brief Delete given ASP from given AS
diff --git a/src/ss7_asp.c b/src/ss7_asp.c
index 377d9e4..076d91f 100644
--- a/src/ss7_asp.c
+++ b/src/ss7_asp.c
@@ -745,7 +745,7 @@
void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp)
{
- struct osmo_ss7_as *as;
+ struct osmo_ss7_as *as, *as2;
OSMO_ASSERT(ss7_initialized);
LOGPASP(asp, DLSS7, LOGL_INFO, "Destroying ASP\n");
@@ -757,8 +757,9 @@
if (asp->fi)
osmo_fsm_inst_term(asp->fi, OSMO_FSM_TERM_REQUEST, NULL);
- /* unlink from all ASs we are part of */
- llist_for_each_entry(as, &asp->inst->as_list, list)
+ /* Unlink from all ASs we are part of.
+ * Some RKM-dynamically allocated ASs may be freed as a result from this: */
+ llist_for_each_entry_safe(as, as2, &asp->inst->as_list, list)
ss7_as_del_asp(as, asp);
/* unlink from ss7_instance */
@@ -1351,9 +1352,6 @@
/* notify ASP FSM and everyone else */
osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_SCTP_COMM_DOWN_IND, NULL);
- /* delete any RKM-dynamically allocated ASs for this ASP */
- xua_rkm_cleanup_dyn_as_for_asp(asp);
-
/* send M-SCTP_RELEASE.ind to Layer Manager */
xua_asp_send_xlm_prim_simple(asp, OSMO_XLM_PRIM_M_SCTP_RELEASE, PRIM_OP_INDICATION);
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index 17071c3..d10420f 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -514,6 +514,13 @@
struct osmo_ss7_asp *asp = xafp->asp;
xua_t_beat_stop(fi);
dispatch_to_all_as(fi, XUA_ASPAS_ASP_DOWN_IND, asp);
+ /* RFC 4666 4.4.2: "An ASP SHOULD deregister from all Application Servers of which it is a
+ * member before attempting to move to the ASP-Down state [...]
+ * If a Deregistration results in no more ASPs in an Application Server, an SG MAY delete
+ * the Routing Key data."
+ * In case it didn't deregsitrer explicitly, make sure to implicitly deregister it:
+ */
+ xua_rkm_cleanup_dyn_as_for_asp(asp);
}
static void xua_asp_fsm_down(struct osmo_fsm_inst *fi, uint32_t event, void *data)
@@ -1101,6 +1108,13 @@
struct osmo_ss7_asp *asp = xafp->asp;
ipa_t_beat_stop(fi);
dispatch_to_all_as(fi, XUA_ASPAS_ASP_DOWN_IND, asp);
+ /* RFC 4666 4.4.2: "An ASP SHOULD deregister from all Application Servers of which it is a
+ * member before attempting to move to the ASP-Down state [...]
+ * If a Deregistration results in no more ASPs in an Application Server, an SG MAY delete
+ * the Routing Key data."
+ * In case it didn't deregsitrer explicitly, make sure to implicitly deregister it:
+ */
+ xua_rkm_cleanup_dyn_as_for_asp(asp);
}
static void ipa_asp_fsm_down(struct osmo_fsm_inst *fi, uint32_t event, void *data)
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index d88fda7..2de830f 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -422,15 +422,11 @@
LOGPASP(asp, DLSS7, LOGL_INFO, "RKM: De-Registering rctx %u for DPC %s\n",
rctx, osmo_ss7_pointcode_print(inst, as->cfg.routing_key.pc));
- /* remove ASP from AS */
- ss7_as_del_asp(as, asp);
- /* FIXME: Rather than spoofing teh ASP-DOWN.ind to the AS here,
- * we should refuse RKM DEREG if the ASP is still ACTIVE */
- osmo_fsm_inst_dispatch(as->fi, XUA_ASPAS_ASP_DOWN_IND, asp);
-
- /* Release the associated route and destroy the dynamically allocated AS */
+ /* Release the associated route */
ss7_route_destroy(rt);
- osmo_ss7_as_destroy(as);
+ /* Dissassociate the ASP from the dynamically allocated AS.
+ * The AS may be freed if it is serving no more ASPs. */
+ ss7_as_del_asp(as, asp);
/* report success */
msgb_append_dereg_res(resp, M3UA_RKM_DEREG_SUCCESS, rctx);
@@ -635,13 +631,10 @@
struct osmo_ss7_as *as, *as2;
llist_for_each_entry_safe(as, as2, &inst->as_list, list) {
- if (!osmo_ss7_as_has_asp(as, asp))
- continue;
if (!as->rkm_dyn_allocated)
continue;
-
- /* If there are no other ASPs, destroy the AS: */
- if (osmo_ss7_as_count_asp(as) == 1)
- osmo_ss7_as_destroy(as);
+ if (!osmo_ss7_as_has_asp(as, asp))
+ continue;
+ ss7_as_del_asp(as, asp);
}
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41512?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: I743af584cd77924654d22ccf5d36d4479ba3b7f5
Gerrit-Change-Number: 41512
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41512?usp=email )
Change subject: Destroy rkm_dyn_allocated AS automatically when running out of ASPs
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41512?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: I743af584cd77924654d22ccf5d36d4479ba3b7f5
Gerrit-Change-Number: 41512
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 26 Nov 2025 10:13:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge, osmith, pespin.
Hello Jenkins Builder, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/41483?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by osmith, Verified-1 by Jenkins Builder
Change subject: Split UPF into its own object
......................................................................
Split UPF into its own object
This allows easily extending per-peer (UPF) functionalities, eg. adding
Heartbeat procedure, as well as a step towards supporting a UPF pool in
the future.
Depends: libosmo-pfcp.git Change-Id I31498c407a8fffd8b47cce8c6bf89dc6e3fcefd2
Related: SYS#7294
Change-Id: I624bafe2fa150f7480b6fb44433c34e83154e06c
---
M TODO-RELEASE
M include/osmocom/hnbgw/hnbgw.h
M include/osmocom/hnbgw/hnbgw_pfcp.h
M src/osmo-hnbgw/hnbgw_pfcp.c
M src/osmo-hnbgw/hnbgw_ranap.c
M src/osmo-hnbgw/osmo_hnbgw_main.c
M src/osmo-hnbgw/ps_rab_ass_fsm.c
M src/osmo-hnbgw/ps_rab_fsm.c
8 files changed, 92 insertions(+), 36 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/83/41483/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/41483?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I624bafe2fa150f7480b6fb44433c34e83154e06c
Gerrit-Change-Number: 41483
Gerrit-PatchSet: 5
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-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41512?usp=email )
Change subject: Destroy rkm_dyn_allocated AS automatically when running out of ASPs
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41512?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: I743af584cd77924654d22ccf5d36d4479ba3b7f5
Gerrit-Change-Number: 41512
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 26 Nov 2025 10:08:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria, lynxis lazus, osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-dev/+/41514?usp=email )
Change subject: src/_update_src_copy: don't copy deleted files
......................................................................
Patch Set 2:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-dev/+/41514/comment/14c5c37f_6a0c5547?usp… :
PS2, Line 10: --autoreconf-in-src-copy (as used by testenv in osmo-ttcn3-hacks) for
is used by?
https://gerrit.osmocom.org/c/osmo-dev/+/41514/comment/bfdda16e_708a094e?usp… :
PS2, Line 13: Fix that it fails on git repos with deleted but not yet commited files:
"Fix that it fails" I don't get this.
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/41514?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I232263bc5bd26c90f1e73b115480269165a1e1f8
Gerrit-Change-Number: 41514
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Wed, 26 Nov 2025 10:05:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: daniel, pespin.
Hello Jenkins Builder, daniel,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/41512?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by daniel, Verified+1 by Jenkins Builder
Change subject: Destroy rkm_dyn_allocated AS automatically when running out of ASPs
......................................................................
Destroy rkm_dyn_allocated AS automatically when running out of ASPs
This allows merging the freeing of AS inside the ASP/AS FSMs.
It also should fix cases like SG in transport-role client.
Change-Id: I743af584cd77924654d22ccf5d36d4479ba3b7f5
---
M src/ss7_as.c
M src/ss7_asp.c
M src/xua_asp_fsm.c
M src/xua_rkm.c
4 files changed, 40 insertions(+), 23 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/12/41512/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41512?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I743af584cd77924654d22ccf5d36d4479ba3b7f5
Gerrit-Change-Number: 41512
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41505?usp=email )
Change subject: xua_rkm: remove unneeded check rkm_dyn_allocated
......................................................................
xua_rkm: remove unneeded check rkm_dyn_allocated
This is always true, as per checks done further above in the same
function.
Change-Id: I2977ddd4aa476172e61b76f7a6501f0af9d25062
---
M src/xua_rkm.c
1 file changed, 4 insertions(+), 7 deletions(-)
Approvals:
laforge: Looks good to me, approved
daniel: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index 44a0eb3..d88fda7 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -428,13 +428,10 @@
* we should refuse RKM DEREG if the ASP is still ACTIVE */
osmo_fsm_inst_dispatch(as->fi, XUA_ASPAS_ASP_DOWN_IND, asp);
- /* if we were dynamically allocated, release the associated
- * route and destroy the AS */
- if (as->rkm_dyn_allocated) {
- /* remove route + AS definition */
- ss7_route_destroy(rt);
- osmo_ss7_as_destroy(as);
- }
+ /* Release the associated route and destroy the dynamically allocated AS */
+ ss7_route_destroy(rt);
+ osmo_ss7_as_destroy(as);
+
/* report success */
msgb_append_dereg_res(resp, M3UA_RKM_DEREG_SUCCESS, rctx);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41505?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: I2977ddd4aa476172e61b76f7a6501f0af9d25062
Gerrit-Change-Number: 41505
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/41508?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: card_key_provider: add PostgreSQL support
......................................................................
card_key_provider: add PostgreSQL support
The Card Key Provider currently only has support for CSV files
as input. Unfortunately using CSV files does not scale very well
when the card inventory is very large and continously updated.
In this case a centralized storage in the form of a database
is the more suitable approach.
This patch adds a PostgreSQL support next to the existing CSV
file support. It also adds an importer tool to import existing
CSV files into the database.
Change-Id: Icba625c02a60d7e1f519b506a46bda5ded0537d3
Related: SYS#7725
---
M README.md
A contrib/csv-to-pgsql.py
M docs/card-key-provider.rst
M pySim-shell.py
M pySim/card_key_provider.py
M requirements.txt
M setup.py
7 files changed, 592 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/41508/4
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41508?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: Icba625c02a60d7e1f519b506a46bda5ded0537d3
Gerrit-Change-Number: 41508
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>