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

April 2025

  • 1 participants
  • 1186 discussions
[XS] Change in libosmocore[master]: Abort configure run on big endian hosts
by laforge 14 Apr '25

14 Apr '25
Attention is currently required from: Alexander Huemer. laforge has posted comments on this change by Alexander Huemer. ( https://gerrit.osmocom.org/c/libosmocore/+/40014?usp=email ) Change subject: Abort configure run on big endian hosts ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40014?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9bf16113acbbc1e100fd928446a91b927d3c6cbc Gerrit-Change-Number: 40014 Gerrit-PatchSet: 2 Gerrit-Owner: Alexander Huemer <alexander.huemer(a)xx.vu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Alexander Huemer <alexander.huemer(a)xx.vu> Gerrit-Comment-Date: Mon, 14 Apr 2025 10:52:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: buildsystem: build out-of-tree
by osmith 14 Apr '25

14 Apr '25
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40032?usp=email ) Change subject: buildsystem: build out-of-tree ...................................................................... buildsystem: build out-of-tree The buildsystem used to create symlinks to dependency source files in the testsuite directories, and then building inside that source directory. This lead to many unrelated files being in the source directory. Change the logic to create symlinks to all sources in a separate $BUILDDIR instead (default: _build) and do the build there. Advantages: * Source directories are not cluttered with other files anymore. * Clean up logic becomes much simpler and faster (rm -rf _build instead of generating a Makefile and running "make clean" in every testsuite directory). * No need to generate gitignore files on the fly anymore. * Using a separate $BUILDDIR is now possible, this will be used by testenv in a follow-up patch when running with podman, to make sure that build artifacts from podman and not using podman are not mixed as they are incompatible. Related: OS#6599 Change-Id: If18aaf2a2a0d55bb617e5cb1b73f6ee4b1952494 --- M .gitignore M Makefile M _buildsystem/gen_links.inc.sh M _buildsystem/regen_makefile.inc.sh D _buildsystem/rmlinks.sh M _testenv/testenv/testsuite.py M start-testsuite.sh 7 files changed, 89 insertions(+), 58 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/32/40032/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40032?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If18aaf2a2a0d55bb617e5cb1b73f6ee4b1952494 Gerrit-Change-Number: 40032 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-CC: Jenkins Builder
1 0
0 0
[M] Change in libosmo-sigtran[master]: asp: Rework s/get_all_rctx_for_asp/ss7_asp_get_all_rctx_be/g
by laforge 14 Apr '25

14 Apr '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40013?usp=email ) Change subject: asp: Rework s/get_all_rctx_for_asp/ss7_asp_get_all_rctx_be/g ...................................................................... asp: Rework s/get_all_rctx_for_asp/ss7_asp_get_all_rctx_be/g This function will gain other users in other files in follow-up patches. While at it, constify and reorder params. Change-Id: Ic3a1c0bd663fe33ab14828e30e057a8beaa84c3f --- M src/osmo_ss7_asp.c M src/ss7_asp.h M src/xua_snm.c 3 files changed, 30 insertions(+), 27 deletions(-) Approvals: fixeria: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index bb3c2dd..c054369 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -1300,3 +1300,25 @@ osmo_ss7_asp_restart(asp); } + +/* Obtain all routing contexts (in network byte order) that exist within the given ASP */ +unsigned int ss7_asp_get_all_rctx_be(const struct osmo_ss7_asp *asp, uint32_t *rctx, unsigned int rctx_size, + const struct osmo_ss7_as *excl_as) +{ + unsigned int count = 0; + struct osmo_ss7_as *as; + + llist_for_each_entry(as, &asp->inst->as_list, list) { + if (as == excl_as) + continue; + if (!osmo_ss7_as_has_asp(as, asp)) + continue; + if (as->cfg.routing_key.context == 0) + continue; + if (count >= rctx_size) + break; + rctx[count] = htonl(as->cfg.routing_key.context); + count++; + } + return count; +} diff --git a/src/ss7_asp.h b/src/ss7_asp.h index 7a001e0..bdde5bd 100644 --- a/src/ss7_asp.h +++ b/src/ss7_asp.h @@ -128,5 +128,8 @@ void ss7_asp_restart_after_reconfigure(struct osmo_ss7_asp *asp); void osmo_ss7_asp_remove_default_lm(struct osmo_ss7_asp *asp); +unsigned int ss7_asp_get_all_rctx_be(const struct osmo_ss7_asp *asp, uint32_t *rctx, unsigned int rctx_size, + const struct osmo_ss7_as *excl_as); + #define LOGPASP(asp, subsys, level, fmt, args ...) \ _LOGSS7((asp)->inst, subsys, level, "ASP(%s) " fmt, (asp)->cfg.name, ## args) diff --git a/src/xua_snm.c b/src/xua_snm.c index edb1210..3dd988f 100644 --- a/src/xua_snm.c +++ b/src/xua_snm.c @@ -66,28 +66,6 @@ return out; } -/* obtain all routing contexts (in network byte order) that exist within the given ASP */ -static unsigned int get_all_rctx_for_asp(uint32_t *rctx, unsigned int rctx_size, - struct osmo_ss7_asp *asp, struct osmo_ss7_as *excl_as) -{ - unsigned int count = 0; - struct osmo_ss7_as *as; - - llist_for_each_entry(as, &asp->inst->as_list, list) { - if (as == excl_as) - continue; - if (!osmo_ss7_as_has_asp(as, asp)) - continue; - if (as->cfg.routing_key.context == 0) - continue; - if (count >= rctx_size) - break; - rctx[count] = htonl(as->cfg.routing_key.context); - count++; - } - return count; -} - static void xua_tx_snm_available(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, const uint32_t *aff_pc, unsigned int num_aff_pc, const char *info_str, bool available) @@ -192,7 +170,7 @@ if (asp->cfg.role != OSMO_SS7_ASP_ROLE_SG) continue; - num_rctx = get_all_rctx_for_asp(rctx, ARRAY_SIZE(rctx), asp, as); + num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), as); /* this can happen if the given ASP is only in the AS that reports the change, * which shall be excluded */ if (num_rctx == 0) @@ -238,7 +216,7 @@ if (asp->cfg.proto != OSMO_SS7_ASP_PROT_SUA) continue; - num_rctx = get_all_rctx_for_asp(rctx, ARRAY_SIZE(rctx), asp, as); + num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), as); /* this can happen if the given ASP is only in the AS that reports the change, * which shall be excluded */ if (num_rctx == 0) @@ -269,7 +247,7 @@ if (asp->cfg.role != OSMO_SS7_ASP_ROLE_SG) continue; - num_rctx = get_all_rctx_for_asp(rctx, ARRAY_SIZE(rctx), asp, as); + num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), as); /* this can happen if the given ASP is only in the AS that reports the change, * which shall be excluded */ if (num_rctx == 0) @@ -299,7 +277,7 @@ if (asp->cfg.role != OSMO_SS7_ASP_ROLE_SG) continue; - num_rctx = get_all_rctx_for_asp(rctx, ARRAY_SIZE(rctx), asp, as); + num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), as); /* this can happen if the given ASP is only in the AS that reports the change, * which shall be excluded */ if (num_rctx == 0) @@ -326,7 +304,7 @@ aff_pc = (const uint32_t *) ie_aff_pc->dat; num_aff_pc = ie_aff_pc->len / sizeof(uint32_t); - num_rctx = get_all_rctx_for_asp(rctx, ARRAY_SIZE(rctx), asp, NULL); + num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), NULL); LOGPASP(asp, log_ss, LOGL_INFO, "Rx DAUD(%s) for %s\n", info_str ? info_str : "", format_affected_pcs_c(xua, asp->inst, ie_aff_pc)); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40013?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: Ic3a1c0bd663fe33ab14828e30e057a8beaa84c3f Gerrit-Change-Number: 40013 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(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]: asp: Document misisng Optional ASP Identifier in Tx ASPUP ACK
by laforge 14 Apr '25

14 Apr '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40007?usp=email ) Change subject: asp: Document misisng Optional ASP Identifier in Tx ASPUP ACK ...................................................................... asp: Document misisng Optional ASP Identifier in Tx ASPUP ACK This will basically use the same code logic as ASPUP branch above, so document it here so that it is added in both places at the same time. Change-Id: I9d8fabd8dccea4d45d78c6934737bfea25385e4a --- M src/xua_asp_fsm.c 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index b55500b..e285e18 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -231,6 +231,17 @@ case XUA_ASP_E_ASPSM_ASPUP_ACK: /* RFC3868 Ch. 3.5.2 */ xua->hdr = XUA_HDR(SUA_MSGC_ASPSM, SUA_ASPSM_UP_ACK); + /* Optional: ASP ID */ +#if 0 + /* TODO: RFC 4666 3.5.2: + * "The optional ASP Identifier parameter is specifically useful for IPSP + * communication. In that case, the IPSP answering the ASP Up message + * MAY include its own ASP Identifier value." */ + if (ss7_asp_peer_requires_asp_id(asp)) { /* Maybe configure in VTY "asp" node? */ + asp_id = /* get a unique id of asp within as, eg. the index in as->asps[] */; + xua_msg_add_u32(xua, SUA_IEI_ASP_ID, asp_id); + } +#endif /* Optional: Info String */ break; case XUA_ASP_E_ASPSM_ASPDN: -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40007?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: I9d8fabd8dccea4d45d78c6934737bfea25385e4a Gerrit-Change-Number: 40007 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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
[M] Change in libosmo-sigtran[master]: ipa: Store ASP IPA SLS into its own field
by laforge 14 Apr '25

14 Apr '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40005?usp=email ) Change subject: ipa: Store ASP IPA SLS into its own field ...................................................................... ipa: Store ASP IPA SLS into its own field Storing the 4-bit SLS into asp_id field is a total hack which just pollutes the code and makes it more difficult to understand. Add a new field into ss7_asp to store that information cleanly. Moreover, asp_id field itself is right now a total mess on its own, since it is used both for local and remote ASP Identifiers at the same time. This will be fixed in a follow-up commitset. Change-Id: I6ec346417ceeabfce9c7b856040be2179c59195e --- M src/osmo_ss7_asp.c M src/ss7_asp.h M src/xua_asp_fsm.c 3 files changed, 30 insertions(+), 28 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index 7e444b4..bb3c2dd 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -851,9 +851,7 @@ msg->dst = asp; rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_RX_TOTAL); - /* we simply use the lower 4 bits of the asp_id, which is initialized to a pseudo-random value upon - * connect */ - return ipa_rx_msg(asp, msg, asp->asp_id & 0xf); + return ipa_rx_msg(asp, msg, asp->ipa.sls); } /* netif code tells us we can read something from the socket */ @@ -1035,9 +1033,7 @@ msg->dst = asp; rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_RX_TOTAL); - /* we simply use the lower 4 bits of the asp_id, which is initialized to a pseudo-random value upon - * connect */ - return ipa_rx_msg(asp, msg, asp->asp_id & 0xf); + return ipa_rx_msg(asp, msg, asp->ipa.sls); } /* read call-back for M3UA-over-TCP socket */ diff --git a/src/ss7_asp.h b/src/ss7_asp.h index 483c5ea..df2f4c3 100644 --- a/src/ss7_asp.h +++ b/src/ss7_asp.h @@ -63,6 +63,15 @@ /*! Pending message for non-blocking IPA read */ struct msgb *pending_msg; + /* IPA proto ASP specific fields. */ + struct { + /* Incoming IPA PDUs have no SLS field, hence a potentially + * unique one within AS is assigned to this ASP and applied + * manually when received. */ + uint8_t sls:4; + bool sls_assigned; + } ipa; + struct { char *name; char *description; diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 93c6d4d..4956417 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -1104,34 +1104,34 @@ } } -/* Assign a 4 bit asp_id (as unqiue as possible) which will be used as SLS for incoming IPA PDUs.*/ -static void _ipa_asp_pick_unused_asp_id_as_sls(struct osmo_ss7_asp *asp, const struct osmo_ss7_as *as) +/* Assign a 4 bit SLS (as unqiue as possible) for incoming IPA PDUs.*/ +static void _ipa_asp_pick_unused_sls(struct osmo_ss7_asp *asp, const struct osmo_ss7_as *as) { - for (unsigned int asp_id = 0; asp_id <= 0x0f; asp_id++) { + for (unsigned int sls = 0; sls <= 0x0f; sls++) { bool used = false; for (unsigned i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { if (!as->cfg.asps[i]) continue; if (as->cfg.asps[i] == asp) continue; - if (!as->cfg.asps[i]->asp_id_present) + if (!as->cfg.asps[i]->ipa.sls_assigned) continue; - if (as->cfg.asps[i]->asp_id == asp_id) { + if (as->cfg.asps[i]->ipa.sls == sls) { used = true; break; } } if (used) continue; - /* Found an unused asp_id, use it: */ - asp->asp_id = asp_id; - asp->asp_id_present = true; - LOGPASP(asp, DLSS7, LOGL_DEBUG, "Assigned unsued asp_id = %u to be used as SLS\n", asp_id); + /* Found an unused SLS, use it: */ + asp->ipa.sls = sls; + asp->ipa.sls_assigned = true; + LOGPASP(asp, DLSS7, LOGL_DEBUG, "Assigned unsued SLS = %u\n", sls); return; } - LOGPASP(asp, DLSS7, LOGL_INFO, "All asp_ids in IPA AS picked, unique SLS not possible, picking random one\n"); - asp->asp_id = rand() & 0x0f; - asp->asp_id_present = true; + LOGPASP(asp, DLSS7, LOGL_INFO, "All SLS in IPA AS picked, unique SLS not possible, picking random one\n"); + asp->ipa.sls = rand() & 0x0f; + asp->ipa.sls_assigned = true; } static void ipa_asp_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -1160,12 +1160,9 @@ case XUA_ASP_E_AS_ASSIGNED: as = data; osmo_talloc_replace_string(iafp->ipa_unit, &iafp->ipa_unit->unit_name, as->cfg.name); - /* In IPA, asp_id is not really used on the wire, and we - * actually use internally the lower 4 bits of the field to - * fill in a potentailly unique SLS to apply to PDUs received from the IPA socket. - * Now that AS is known, try picking an unused asp_id inside the AS. - * we use the lower 4 bits of the asp_id field as SLS; */ - _ipa_asp_pick_unused_asp_id_as_sls(iafp->asp, as); + /* Now that AS is known, try picking an unused SLS inside the AS. + * It will be applied to PDUs received from the IPA socket. */ + _ipa_asp_pick_unused_sls(iafp->asp, as); /* Now that the AS is known, start the client side: */ if (iafp->role == OSMO_SS7_ASP_ROLE_ASP && fi->state == IPA_ASP_S_DOWN) { LOGPFSML(fi, LOGL_NOTICE, "Bringing up ASP now once it has been assigned to an AS\n"); @@ -1310,13 +1307,13 @@ if (as) { unit_name = as->cfg.name; - /* Allocacate potentially unique asp_id within AS since AS is already known: */ - _ipa_asp_pick_unused_asp_id_as_sls(asp, as); + /* Allocacate potentially unique SLS within AS since AS is already known: */ + _ipa_asp_pick_unused_sls(asp, as); } else if (asp->dyn_allocated) { LOGPFSML(fi, LOGL_INFO, "Dynamic ASP is not assigned to any AS, " "using ASP name instead of AS name as ipa_unit_name\n"); unit_name = asp->cfg.name; - /* asp->asp_id will be assigned together with AS unit_name during XUA_ASP_E_AS_ASSIGNED. */ + /* asp->ipa.sls will be assigned together with AS unit_name during XUA_ASP_E_AS_ASSIGNED. */ } else { /* ASP in client mode will be brought up when this ASP is added * to an AS, see XUA_ASP_E_AS_ASSIGNED. */ @@ -1325,7 +1322,7 @@ can_start = false; } unit_name = asp->cfg.name; - /* asp->asp_id will be assigned together with AS unit_name during XUA_ASP_E_AS_ASSIGNED. */ + /* asp->ipa.sls will be assigned together with AS unit_name during XUA_ASP_E_AS_ASSIGNED. */ } iafp->role = role; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40005?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: I6ec346417ceeabfce9c7b856040be2179c59195e Gerrit-Change-Number: 40005 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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]: asp: Rename and clarify asp_id field
by laforge 14 Apr '25

14 Apr '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006?usp=email ) Change subject: asp: Rename and clarify asp_id field ...................................................................... asp: Rename and clarify asp_id field The asp_id (RFC4666 ASP Identifier) can be (and may be) different on each SGP peer of an ASP. Previously, we were storing in the same field the value provided by the peer, and using this same value when sending our own ASP Identifier during ASPUP. This was not causing a problem since actually we have no real way to set asp_id_present on our own in ASP mode yet, so no local ASP Identifier is ever being transmitted. This patch renames the asp_id field to remote_asp_id, since that's the meaning it has in almost all places where it is being used. The only place where it is being used so far, during Tx ASPUP, has been documented and disabled since in reality the asp_id_present was not set as mentioned above. Furthermore, the remote ASP Identifier we receive from the peer ASP is actually meaningful within a given AS, meaning that if an ASP is part of several AS, we should be storing 1 remote ASP identifier for each AS it serves. This is documented in ss7_asp7.h for later Change-Id: I8e4304099db6fb12cf4b40a5b9a4aa3a83c95fde --- M src/ss7_asp.h M src/xua_as_fsm.c M src/xua_asp_fsm.c 3 files changed, 26 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/src/ss7_asp.h b/src/ss7_asp.h index df2f4c3..7a001e0 100644 --- a/src/ss7_asp.h +++ b/src/ss7_asp.h @@ -43,9 +43,15 @@ /*! pre-formatted human readable local/remote socket name */ char *sock_name; - /* ASP Identifier for ASP-UP + NTFY */ - uint32_t asp_id; - bool asp_id_present; + /* ASP Identifier for ASP-UP + NTFY, as received by the peer. + * (In IPA ASPs it's used internally to hold 4-bit SLS). + * FIXME: This should actually be stored in a AS-ASP relation, since it + * can be different per AS, see RFC4666 3.5.1 + * "The optional ASP Identifier parameter contains a unique value that + * is locally significant among the ASPs that support an AS". + */ + uint32_t remote_asp_id; + bool remote_asp_id_present; /* Layer Manager to which we talk */ const struct osmo_xua_layer_manager *lm; diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 2034659..0493b9b 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -83,9 +83,9 @@ continue; /* Optional: ASP Identifier (if sent in ASP-UP) */ - if (asp->asp_id_present) { + if (asp->remote_asp_id_present) { npar->presence |= NOTIFY_PAR_P_ASP_ID; - npar->asp_id = asp->asp_id; + npar->asp_id = asp->remote_asp_id; } else npar->presence &= ~NOTIFY_PAR_P_ASP_ID; @@ -370,8 +370,8 @@ .status_info = M3UA_NOTIFY_I_OT_ALT_ASP_ACT, }; - if (asp_cmp->asp_id_present) - npar.asp_id = asp_cmp->asp_id; + if (asp_cmp->remote_asp_id_present) + npar.asp_id = asp_cmp->remote_asp_id; for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { struct osmo_ss7_asp *asp = as->cfg.asps[i]; diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 4956417..b55500b 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -215,8 +215,17 @@ /* RFC 3868 Ch. 3.5.1 */ xua->hdr = XUA_HDR(SUA_MSGC_ASPSM, SUA_ASPSM_UP); /* Optional: ASP ID */ - if (asp->asp_id_present) - xua_msg_add_u32(xua, SUA_IEI_ASP_ID, asp->asp_id); +#if 0 + /* TODO: RFC 4666 3.8.1: + * 'The "ASP Identifier Required" error is sent by an SGP in + * response to an ASP Up message that does not contain an ASP + * Identifier parameter when the SGP requires one. The ASP SHOULD + * resend the ASP Up message with an ASP Identifier.' */ + if (ss7_asp_peer_requires_asp_id(asp)) { /* Maybe configure in VTY "asp" node? */ + asp_id = /* get a unique id of asp within as, eg. the index in as->asps[] */; + xua_msg_add_u32(xua, SUA_IEI_ASP_ID, asp_id); + } +#endif /* Optional: Info String */ break; case XUA_ASP_E_ASPSM_ASPUP_ACK: @@ -455,8 +464,8 @@ asp_id_ie = xua_msg_find_tag(data, SUA_IEI_ASP_ID); /* Optional ASP Identifier: Store for NTFY */ if (asp_id_ie) { - asp->asp_id = xua_msg_part_get_u32(asp_id_ie); - asp->asp_id_present = true; + asp->remote_asp_id = xua_msg_part_get_u32(asp_id_ie); + asp->remote_asp_id_present = true; } /* send ACK */ peer_send(fi, XUA_ASP_E_ASPSM_ASPUP_ACK, NULL); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006?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: I8e4304099db6fb12cf4b40a5b9a4aa3a83c95fde Gerrit-Change-Number: 40006 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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]: asp: Expect optional ASP Identifier in Rx ASPUP ACK
by laforge 14 Apr '25

14 Apr '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40008?usp=email ) Change subject: asp: Expect optional ASP Identifier in Rx ASPUP ACK ...................................................................... asp: Expect optional ASP Identifier in Rx ASPUP ACK Change-Id: Idaa1a547d835402ca82e4abbae90681a3286d4da --- M src/xua_asp_fsm.c M tests/ss7/ss7_test.c 2 files changed, 20 insertions(+), 5 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index e285e18..3834ece 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -461,6 +461,11 @@ case XUA_ASP_E_ASPSM_ASPUP_ACK: /* only if role ASP */ ENSURE_ASP_OR_IPSP(fi, event); + /* Optional ASP Identifier */ + if ((asp_id_ie = xua_msg_find_tag(data, SUA_IEI_ASP_ID))) { + asp->remote_asp_id = xua_msg_part_get_u32(asp_id_ie); + asp->remote_asp_id_present = true; + } osmo_fsm_inst_state_chg(fi, XUA_ASP_S_INACTIVE, 0, 0); /* inform layer manager */ send_xlm_prim_simple(fi, OSMO_XLM_PRIM_M_ASP_UP, PRIM_OP_CONFIRM); @@ -472,9 +477,8 @@ case XUA_ASP_E_ASPSM_ASPUP: /* only if role SG */ ENSURE_SG_OR_IPSP(fi, event); - asp_id_ie = xua_msg_find_tag(data, SUA_IEI_ASP_ID); /* Optional ASP Identifier: Store for NTFY */ - if (asp_id_ie) { + if ((asp_id_ie = xua_msg_find_tag(data, SUA_IEI_ASP_ID))) { asp->remote_asp_id = xua_msg_part_get_u32(asp_id_ie); asp->remote_asp_id_present = true; } diff --git a/tests/ss7/ss7_test.c b/tests/ss7/ss7_test.c index f61ee0a..bb96e71 100644 --- a/tests/ss7/ss7_test.c +++ b/tests/ss7/ss7_test.c @@ -10,6 +10,7 @@ #include <osmocom/sigtran/osmo_ss7.h> #include <osmocom/sigtran/protocol/m3ua.h> +#include <osmocom/sigtran/protocol/sua.h> #include <osmocom/core/utils.h> #include <osmocom/core/msgb.h> @@ -276,6 +277,8 @@ { struct osmo_ss7_as *as; struct osmo_ss7_asp *asp; + struct xua_msg *xua; + int rc; OSMO_ASSERT(osmo_ss7_as_find_by_name(s7i, "as1") == NULL); as = osmo_ss7_as_find_or_create(s7i, "as1", OSMO_SS7_ASP_PROT_M3UA); @@ -296,9 +299,17 @@ osmo_ss7_asp_restart(asp); /* ask FSM to send ASP-UP.req */ - osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_M_ASP_UP_REQ, NULL); - osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_ASPSM_ASPUP_ACK, NULL); - osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_ASPTM_ASPAC_ACK, NULL); + rc = osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_M_ASP_UP_REQ, NULL); + OSMO_ASSERT(rc == 0); + + xua = xua_msg_alloc(); + xua->hdr = XUA_HDR(SUA_MSGC_ASPSM, SUA_ASPSM_UP_ACK); + rc = osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_ASPSM_ASPUP_ACK, xua); + xua_msg_free(xua); + OSMO_ASSERT(rc == 0); + + rc = osmo_fsm_inst_dispatch(asp->fi, XUA_ASP_E_ASPTM_ASPAC_ACK, NULL); + OSMO_ASSERT(rc == 0); OSMO_ASSERT(osmo_ss7_as_del_asp(as, "asp1") == 0); OSMO_ASSERT(osmo_ss7_as_del_asp(as, "asp2") == -ENODEV); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40008?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: Idaa1a547d835402ca82e4abbae90681a3286d4da Gerrit-Change-Number: 40008 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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
[XS] Change in libosmo-sigtran[master]: xua_as_fsm: Remove unneeded double call to fill_notify_statchg_pars()
by laforge 14 Apr '25

14 Apr '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40010?usp=email ) Change subject: xua_as_fsm: Remove unneeded double call to fill_notify_statchg_pars() ...................................................................... xua_as_fsm: Remove unneeded double call to fill_notify_statchg_pars() Recent commit introduced the helper func fill_notify_statchg_pars(), and while doing so it wrongly added calls to it twice in xua_as_fsm_onenter(). The first one is actually not needed, so remove it. Fixes: f2e324e2f82efc93fd2a1124fa216d680659ed40 Change-Id: I5d1e2768de13e9ab5ede849b3c06347c8669de1c --- M src/xua_as_fsm.c 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 0493b9b..5adc469 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -419,8 +419,6 @@ struct osmo_ss7_as *as = xafp->as; struct osmo_xlm_prim_notify npar; - fill_notify_statchg_pars(fi, &npar); - switch (fi->state) { case XUA_AS_S_INACTIVE: /* continue below */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40010?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: I5d1e2768de13e9ab5ede849b3c06347c8669de1c Gerrit-Change-Number: 40010 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(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]: Unify amount of supported rctx items in IE to 128
by laforge 14 Apr '25

14 Apr '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40012?usp=email ) Change subject: Unify amount of supported rctx items in IE to 128 ...................................................................... Unify amount of supported rctx items in IE to 128 Change-Id: I703c9e62ed909dc1cd9c3e943612205856edbf2c --- M include/osmocom/sigtran/osmo_ss7.h M src/xua_asp_fsm.c M src/xua_snm.c 3 files changed, 9 insertions(+), 6 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 264507b..0bde3d9 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -11,6 +11,9 @@ #include <osmocom/core/socket.h> #include <osmocom/core/rate_ctr.h> +/* Maximum number of supported RCTXs present in RFC4666 Routing Context IE. */ +#define OSMO_SS7_MAX_RCTX_COUNT 128 + struct osmo_ss7_instance; extern struct llist_head osmo_ss7_instances; diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 3834ece..4603734 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -174,7 +174,7 @@ static int xua_msg_add_asp_rctx(struct xua_msg *xua, struct osmo_ss7_asp *asp) { struct osmo_ss7_as *as; - uint32_t rctx[128]; + uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT]; unsigned int i = 0; /* iterate over all ASs and build array of routing contexts */ diff --git a/src/xua_snm.c b/src/xua_snm.c index 1481178..edb1210 100644 --- a/src/xua_snm.c +++ b/src/xua_snm.c @@ -175,7 +175,7 @@ { struct osmo_ss7_instance *s7i = as->inst; struct osmo_ss7_asp *asp; - uint32_t rctx[32]; + uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT]; unsigned int num_rctx; /* inform local users via a MTP-{PAUSE, RESUME} primitive */ @@ -217,7 +217,7 @@ { struct osmo_ss7_instance *s7i = as->inst; struct osmo_ss7_asp *asp; - uint32_t rctx[32]; + uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT]; unsigned int num_rctx; uint32_t _smi = smi ? *smi : 0; /* 0 == reserved/unknown in SUA */ @@ -252,7 +252,7 @@ { struct osmo_ss7_instance *s7i = as->inst; struct osmo_ss7_asp *asp; - uint32_t rctx[32]; + uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT]; unsigned int num_rctx; /* Translate to MTP-STATUS.ind towards SCCP (will create N-PCSTATE.ind to SCU) */ @@ -284,7 +284,7 @@ { struct osmo_ss7_instance *s7i = as->inst; struct osmo_ss7_asp *asp; - uint32_t rctx[32]; + uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT]; unsigned int num_rctx; /* TODO: How to translate to MTP and towards SCCP (create N-PCSTATE.ind to SCU) */ @@ -318,7 +318,7 @@ unsigned int num_aff_pc; unsigned int num_rctx; const uint32_t *aff_pc; - uint32_t rctx[32]; + uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT]; int log_ss = osmo_ss7_asp_get_log_subsys(asp); int i; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40012?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: I703c9e62ed909dc1cd9c3e943612205856edbf2c Gerrit-Change-Number: 40012 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(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]: asp: Rename and clarify asp_id field
by laforge 14 Apr '25

14 Apr '25
Attention is currently required from: pespin. laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006?usp=email ) Change subject: asp: Rename and clarify asp_id field ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006?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: I8e4304099db6fb12cf4b40a5b9a4aa3a83c95fde Gerrit-Change-Number: 40006 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 14 Apr 2025 10:50:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • ...
  • 119
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.