Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40580?usp=email )
Change subject: as: Avoid adding dyn route when IPA AS becomes active
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40580?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: I8997d40f2a779734432b40d27f9345d9a739d36f
Gerrit-Change-Number: 40580
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 04 Jul 2025 07:08:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579?usp=email )
Change subject: ss7_vty: Avoid adding route to local PC in role ASP
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579/comment/6d6af214_626f3… :
PS2, Line 15: only then
: otherwise
This is a bit hard to understand IMHO.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579?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: Ic602de42e37c4579f530823bb41e0a8193ce73bb
Gerrit-Change-Number: 40579
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: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 04 Jul 2025 07:06:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge, osmith, pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579?usp=email )
Change subject: ss7_vty: Avoid adding route to local PC in role ASP
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579?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: Ic602de42e37c4579f530823bb41e0a8193ce73bb
Gerrit-Change-Number: 40579
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: 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>
Gerrit-Comment-Date: Thu, 03 Jul 2025 20:24:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: daniel, laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579?usp=email )
Change subject: ss7_vty: Avoid adding route to local PC in role ASP
......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579/comment/acd05c99_8f764… :
PS1, Line 7: rote
> route
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579?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: Ic602de42e37c4579f530823bb41e0a8193ce73bb
Gerrit-Change-Number: 40579
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: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Jul 2025 20:13:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel, laforge, osmith, pespin.
Hello Jenkins Builder, daniel, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by daniel
Change subject: ss7_vty: Avoid adding route to local PC in role ASP
......................................................................
ss7_vty: Avoid adding route to local PC in role ASP
This commit basically reverts b4f1b2cb8bd404f08601dc8ca700b672a455846c
from ~4 years ago.
In ASP role, the routing-key is configured with a local PC, since that's
what's announced during RKM towards the SG.
Hence, it makes no sense adding a route pointing to a local PCm because
the M3UA routing decisions first check if the DPC is local, and only then
otherwise tries to route it.
Change-Id: Ic602de42e37c4579f530823bb41e0a8193ce73bb
---
M src/ss7_as_vty.c
M src/ss7_vty.c
M src/ss7_vty.h
3 files changed, 1 insertion(+), 25 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/79/40579/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40579?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: Ic602de42e37c4579f530823bb41e0a8193ce73bb
Gerrit-Change-Number: 40579
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: 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>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40578?usp=email )
Change subject: cosmetic: Fix typo in comment
......................................................................
cosmetic: Fix typo in comment
Change-Id: Ide34bf01230fd416c8192a90474039e2f41cb6cd
---
M src/ss7_vty.c
M src/xua_snm.c
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
daniel: Looks good to me, approved
diff --git a/src/ss7_vty.c b/src/ss7_vty.c
index a3f1a34..9916185 100644
--- a/src/ss7_vty.c
+++ b/src/ss7_vty.c
@@ -1334,7 +1334,7 @@
llist_for_each_entry(as, &inst->as_list, list)
ss7_vty_write_one_as(vty, as, show_dyn_config);
- /* now dump everything that is relevent for the SG role */
+ /* now dump everything that is relevant for the SG role */
if (cs7_role == CS7_ROLE_SG) {
/* dump routes, as their target ASs exist */
diff --git a/src/xua_snm.c b/src/xua_snm.c
index 6bbeec7..04568d2 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -167,7 +167,7 @@
rt = ss7_route_table_find_route_by_dpc_mask_as(s7i->rtable_system, pc, 0xffffff, as, true);
if (!rt) {
/* No dynamic fully qualified route found. Add dynamic fully
- * squalified route and mark it as (un)available: */
+ * qualified route and mark it as (un)available: */
rt = ss7_route_create(s7i->rtable_system, pc, 0xffffff, true, as->cfg.name);
if (!rt) {
LOGPAS(as, DLSS7, LOGL_ERROR, "Unable to create dynamic route for pc=%u=%s status=%s\n",
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40578?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: Ide34bf01230fd416c8192a90474039e2f41cb6cd
Gerrit-Change-Number: 40578
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40573?usp=email )
Change subject: xua_rkm: Improve handling of newly_assigned_as array
......................................................................
xua_rkm: Improve handling of newly_assigned_as array
* Make sure we don't end up with duplicated AS in the array, to avoid
signalling the same event multiple times.
* Once finished filling the array, no need to iterate the full allocated
array, but only the amount of elements filled in.
Change-Id: I4fbac8ff61541c6804e2f01a9c965ec630d59080
---
M src/xua_rkm.c
1 file changed, 29 insertions(+), 19 deletions(-)
Approvals:
Jenkins Builder: Verified
daniel: 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/xua_rkm.c b/src/xua_rkm.c
index d4d1aa3..1009d18 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -151,6 +151,19 @@
* RKM REG request */
#define MAX_NEW_AS 16
+/* Lookup "as" pointer in array "newly_assigned_as" with "num_newly_assigned_as" elements. */
+static bool newly_assigned_as_in_array(struct osmo_ss7_as * const *newly_assigned_as,
+ unsigned int num_newly_assigned_as,
+ const struct osmo_ss7_as *as)
+{
+ unsigned int i;
+ for (i = 0; i < num_newly_assigned_as; i++) {
+ if (as == newly_assigned_as[i])
+ return true;
+ }
+ return false;
+}
+
/* SG: handle a single registration request IE (nested IEs in 'innner' */
static int handle_rkey_reg(struct osmo_ss7_asp *asp, struct xua_msg *inner,
struct msgb *resp, struct osmo_ss7_as **newly_assigned_as,
@@ -161,6 +174,7 @@
struct osmo_ss7_as *as;
struct osmo_ss7_route *rt;
char namebuf[32];
+ bool as_already_in_array;
/* mandatory local routing key ID */
rk_id = xua_msg_get_u32(inner, M3UA_IEI_LOC_RKEY_ID);
@@ -228,15 +242,18 @@
return -1;
}
+ /* Early return before allocating stuff if no space left.
+ * If AS didn't exist before, it can't be already in the array:*/
+ as_already_in_array = as && newly_assigned_as_in_array(newly_assigned_as, *nas_idx, as);
+ if (!as_already_in_array && *nas_idx >= max_nas_idx) {
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n",
+ max_nas_idx+1);
+ msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
+ return -1;
+ }
+
if (as) {
LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Found existing AS for RCTX %u\n", rctx);
- /* Early return before allocating stuff if no space left: */
- if (*nas_idx >= max_nas_idx) {
- LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n",
- max_nas_idx+1);
- msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
- return -1;
- }
if (as->cfg.routing_key.pc != dpc) {
LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: DPC doesn't match, rejecting AS (%u != %u)\n",
@@ -261,14 +278,6 @@
as->cfg.mode_set_by_peer = true;
}
} else {
- /* Early return before allocating stuff if no space left: */
- if (*nas_idx >= max_nas_idx) {
- LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n",
- max_nas_idx+1);
- msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
- return -1;
- }
-
/* Create an AS for this routing key */
snprintf(namebuf, sizeof(namebuf), "as-rkm-%u", rctx);
as = osmo_ss7_as_find_or_create(asp->inst, namebuf, OSMO_SS7_ASP_PROT_M3UA);
@@ -303,7 +312,8 @@
ss7_as_add_asp(as, asp);
msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_SUCCESS, rctx);
/* append to list of newly assigned as */
- newly_assigned_as[(*nas_idx)++] = as;
+ if (!as_already_in_array)
+ newly_assigned_as[(*nas_idx)++] = as;
return 0;
}
@@ -313,7 +323,7 @@
struct xua_msg_part *part;
struct msgb *resp = m3ua_msgb_alloc(__func__);
struct osmo_ss7_as *newly_assigned_as[MAX_NEW_AS];
- unsigned int i, nas_idx = 0;
+ unsigned int i, num_newly_assigned_as = 0;
memset(newly_assigned_as, 0, sizeof(newly_assigned_as));
@@ -333,7 +343,7 @@
/* handle single registration and append result to
* 'resp' */
handle_rkey_reg(asp, inner, resp, newly_assigned_as,
- ARRAY_SIZE(newly_assigned_as), &nas_idx);
+ ARRAY_SIZE(newly_assigned_as), &num_newly_assigned_as);
xua_msg_free(inner);
}
@@ -344,7 +354,7 @@
/* and *after* the RKM REG Response inform the newly assigned
* ASs about the fact that there's an INACTIVE ASP for them,
* which will cause them to send NOTIFY to the client */
- for (i = 0; i < ARRAY_SIZE(newly_assigned_as); i++) {
+ for (i = 0; i < num_newly_assigned_as; i++) {
struct osmo_ss7_as *as = newly_assigned_as[i];
if (!as)
continue;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40573?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: I4fbac8ff61541c6804e2f01a9c965ec630d59080
Gerrit-Change-Number: 40573
Gerrit-PatchSet: 1
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40575?usp=email )
Change subject: ipa: tear down conn trying to add >16th ASP to AS
......................................................................
ipa: tear down conn trying to add >16th ASP to AS
If a user tries to add more than 16 ASPs to an AS, it will fail
internally. In that scenario, close the connection.
Change-Id: Iaf02f69c7a53827037ec500ce946b947ab5ea2bd
---
M src/xua_asp_fsm.c
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
daniel: 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
Jenkins Builder: Verified
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index 86d86b7..70fb0b3 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -1124,7 +1124,11 @@
iafp->ipa_unit->unit_name);
goto out_err;
}
- ss7_as_add_asp(as, asp);
+ rc = ss7_as_add_asp(as, asp);
+ if (rc < 0) {
+ LOGPFSML(fi, LOGL_ERROR, "Cannot add ASP '%s' to AS '%s'\n", asp->cfg.name, as->cfg.name);
+ goto out_err;
+ }
/* TODO: OAP Authentication? */
/* Send ID_ACK */
if (fd >= 0) {
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40575?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: Iaf02f69c7a53827037ec500ce946b947ab5ea2bd
Gerrit-Change-Number: 40575
Gerrit-PatchSet: 1
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40574?usp=email )
Change subject: xua_rkm: Reply RKM RKEY REG with err insufficient resources
......................................................................
xua_rkm: Reply RKM RKEY REG with err insufficient resources
If a user tries to add more than 16 ASPs to an AS, it will fail
internally. In that scenario, inform the peer.
Change-Id: I352dbc0a1319348b127e173599a1d967ef7bcb26
---
M src/xua_rkm.c
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
daniel: Looks good to me, approved
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index 1009d18..8817f49 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -309,7 +309,12 @@
}
/* Success: Add just-create AS to connected ASP + report success */
- ss7_as_add_asp(as, asp);
+ if (ss7_as_add_asp(as, asp) < 0) {
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: Cannot associate ASP to AS %s\n", as->cfg.name);
+ msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
+ return -1;
+ }
+
msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_SUCCESS, rctx);
/* append to list of newly assigned as */
if (!as_already_in_array)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40574?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: I352dbc0a1319348b127e173599a1d967ef7bcb26
Gerrit-Change-Number: 40574
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>
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40575?usp=email )
Change subject: ipa: tear down conn trying to add >16th ASP to AS
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40575?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: Iaf02f69c7a53827037ec500ce946b947ab5ea2bd
Gerrit-Change-Number: 40575
Gerrit-PatchSet: 1
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-Comment-Date: Thu, 03 Jul 2025 20:11:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes