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 -----
  • 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

October 2026

  • 1 participants
  • 1227 discussions
[S] Change in onomondo-eim[master]: esipa_json_handler: use atoms as JSON field names
by laforge 09 Oct '26

09 Oct '26
Attention is currently required from: dexter. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43818?usp=email ) Change subject: esipa_json_handler: use atoms as JSON field names ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43818?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-eim Gerrit-Branch: master Gerrit-Change-Id: I14edb8f60c755dfc8940015fe7c3436fa14e32b1 Gerrit-Change-Number: 43818 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Oct 2026 12:19:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in onomondo-eim[master]: es9p_client: fix decoding of euiccCiPKIdToBeUsed (JSON)
by laforge 09 Oct '26

09 Oct '26
Attention is currently required from: dexter, jolly. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43781?usp=email ) Change subject: es9p_client: fix decoding of euiccCiPKIdToBeUsed (JSON) ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43781?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-eim Gerrit-Branch: master Gerrit-Change-Id: I490f984055faddb02b68e0717077ef7ddcd63b67 Gerrit-Change-Number: 43781 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Oct 2026 12:18:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-e1d[master]: Allow vpair with E1oIP
by laforge 09 Oct '26

09 Oct '26
Attention is currently required from: jolly, nt2mku, tnt. laforge has posted comments on this change by nt2mku. ( https://gerrit.osmocom.org/c/osmo-e1d/+/43764?usp=email ) Change subject: Allow vpair with E1oIP ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/43764?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I510180ac52ca1a9091430e85f46c963cf086b1d0 Gerrit-Change-Number: 43764 Gerrit-PatchSet: 1 Gerrit-Owner: nt2mku <degrunert.web(a)googlemail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: tnt <tnt(a)246tNt.com> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: nt2mku <degrunert.web(a)googlemail.com> Gerrit-Attention: tnt <tnt(a)246tNt.com> Gerrit-Comment-Date: Fri, 09 Oct 2026 12:17:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in pysim[master]: pySim/global_platform: make functionality available outside of cmd2
by laforge 09 Oct '26

09 Oct '26
Attention is currently required from: Hoernchen, dexter, fixeria, pespin. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42741?usp=email ) Change subject: pySim/global_platform: make functionality available outside of cmd2 ...................................................................... Patch Set 7: (1 comment) File pySim/global_platform/__init__.py: https://gerrit.osmocom.org/c/pysim/+/42741/comment/466c6879_33069d58?usp=em… : PS7, Line 692: I would love if there was some kind of method by which an API user can see what kind of command-methods a class like this exposes. So here we have put_key, gp_version, get_status, set_status, etc. and one has to manually read through the source to find them. One option would be to have some kind of decorator, which some other code could then use as 'tag' to detect such SCC methods. Another option would be some kind of list of SCC methods inside the class. Yet another option would be to prefix them with something like scc_ to set them apart. There might even be better options like having some kind of intermediate 'container class' like we wave in cmd2 with the AddlShellCommands. I'm leaving it up to you to think what makes most sense. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/42741?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: Idf4e4b58bf49ba62b2c22de4c49a2dcacfa872cb Gerrit-Change-Number: 42741 Gerrit-PatchSet: 7 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Oct 2026 12:15:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[XS] Change in libosmo-sigtran[master]: ss7_route_table.h: Add missing forward declarations
by pespin 09 Oct '26

09 Oct '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43834?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ss7_route_table.h: Add missing forward declarations ...................................................................... ss7_route_table.h: Add missing forward declarations Change-Id: I3b8ac78bf61e8478d8d64c28f320205889595e98 --- M src/ss7_route_table.h 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/ss7_route_table.h b/src/ss7_route_table.h index 98cddab..24b2d9c 100644 --- a/src/ss7_route_table.h +++ b/src/ss7_route_table.h @@ -8,6 +8,8 @@ * SS7 Routing Tables ***********************************************************************/ +struct osmo_ss7_as; +struct osmo_ss7_linkset; struct osmo_ss7_instance; enum osmo_ss7_route_status; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43834?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: I3b8ac78bf61e8478d8d64c28f320205889595e98 Gerrit-Change-Number: 43834 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: xua_rkm: Add function helpers to set routes for AS route-key
by pespin 09 Oct '26

09 Oct '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43830?usp=email ) Change subject: xua_rkm: Add function helpers to set routes for AS route-key ...................................................................... xua_rkm: Add function helpers to set routes for AS route-key Those will be used in follow-up commit introducing automatic AS route-key full qualified routes for statically configured AS. Related: OS#7070 Change-Id: I1dd83ae2b0d23c92304476692ef6bd9c2417e454 --- M src/ss7_as.c M src/ss7_as.h M src/xua_rkm.c 3 files changed, 54 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/ss7_as.c b/src/ss7_as.c index 7ad105a..605a646 100644 --- a/src/ss7_as.c +++ b/src/ss7_as.c @@ -741,3 +741,49 @@ return false; } + +/* Add a fully qualified route to routing table based on configured AS routing-key: */ +struct osmo_ss7_route *ss7_as_routing_key_create_route(struct osmo_ss7_as *as) +{ + struct osmo_ss7_route *rt; + int rc; + + rt = ss7_route_alloc(as->inst->rtable_system, + as->cfg.routing_key.pc, + 0xFFFFFF, + true); + if (!rt) + goto ret_free; + if (ss7_route_set_linkset(rt, as->cfg.name) < 0) + goto ret_free; + + rc = ss7_route_insert(rt); + if (rc == -EADDRINUSE) { + talloc_free(rt); + return ss7_route_table_find_route_by_dpc_mask(as->inst->rtable_system, + as->cfg.routing_key.pc, + 0xFFFFFF, + true); + } + + return rt; + +ret_free: + talloc_free(rt); + return NULL; +} + +/* Remove fully qualified route from routing table based on configured AS routing-key: */ +int ss7_as_routing_key_delete_route(struct osmo_ss7_as *as) +{ + struct osmo_ss7_route *rt; + rt = ss7_route_table_find_route_by_dpc_mask(as->inst->rtable_system, + as->cfg.routing_key.pc, 0xffffff, + true); + if (!rt) + return -ENOENT; + + /* Release the associated route */ + ss7_route_destroy(rt); + return 0; +} diff --git a/src/ss7_as.h b/src/ss7_as.h index 3d36102..329350b 100644 --- a/src/ss7_as.h +++ b/src/ss7_as.h @@ -200,6 +200,9 @@ const struct osmo_ss7_asp *excl_asp); void ss7_as_loadshare_binding_table_reset(struct osmo_ss7_as *as); +struct osmo_ss7_route *ss7_as_routing_key_create_route(struct osmo_ss7_as *as); +int ss7_as_routing_key_delete_route(struct osmo_ss7_as *as); + void ss7_as_del_asp_update_llist_round_robin(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp, struct ss7_as_asp_assoc **state); #define ss7_as_asp_assoc_llist_round_robin(as, state) \ ss7_llist_round_robin(&(as)->assoc_asp_list, (void **)state, struct ss7_as_asp_assoc, as_entry) diff --git a/src/xua_rkm.c b/src/xua_rkm.c index 61f9dc6..72581a6 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -330,7 +330,7 @@ as->cfg.routing_key.ssn = OSSMO_SS7_RKEY_SSN_UNSET; /* add dynamic route for that routing key */ - rt = ss7_route_create(as->inst->rtable_system, dpc, 0xFFFFFF, true, namebuf); + rt = ss7_as_routing_key_create_route(as); if (!rt) { LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: Cannot insert route for DPC %s / as %s\n", osmo_ss7_pointcode_print(asp->inst, dpc), namebuf); @@ -431,7 +431,6 @@ { struct osmo_ss7_instance *inst = asp->inst; struct osmo_ss7_as *as; - struct osmo_ss7_route *rt; as = ss7_asp_find_as_by_rctx(asp, rctx); if (!as) { @@ -451,19 +450,13 @@ return -1; } - rt = ss7_route_table_find_route_by_dpc_mask(inst->rtable_system, - as->cfg.routing_key.pc, 0xffffff, - true); - if (!rt) { - msgb_append_dereg_res(resp, M3UA_RKM_DEREG_ERR_UNKNOWN, 0); - return -1; - } - 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)); - /* Release the associated route */ - ss7_route_destroy(rt); + if (ss7_as_routing_key_delete_route(as) < 0) { + msgb_append_dereg_res(resp, M3UA_RKM_DEREG_ERR_UNKNOWN, 0); + return -1; + } /* 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); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43830?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: I1dd83ae2b0d23c92304476692ef6bd9c2417e454 Gerrit-Change-Number: 43830 Gerrit-PatchSet: 3 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: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-sigtran[master]: sua: Add missing include mtp_sap.h
by pespin 09 Oct '26

09 Oct '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43836?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: sua: Add missing include mtp_sap.h ...................................................................... sua: Add missing include mtp_sap.h The file uses MTP_SIO, but didn't include mtp_sap.h, where it is defined. Change-Id: I496ae727bccb667c16ad36c201d74eb81513b511 --- M src/sua.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index 6972091..37364c5 100644 --- a/src/sua.c +++ b/src/sua.c @@ -35,6 +35,7 @@ #include <osmocom/netif/stream.h> +#include <osmocom/sigtran/mtp_sap.h> #include <osmocom/sigtran/sccp_sap.h> #include <osmocom/sigtran/protocol/mtp.h> #include <osmocom/sigtran/protocol/sua.h> -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43836?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: I496ae727bccb667c16ad36c201d74eb81513b511 Gerrit-Change-Number: 43836 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-sigtran[master]: sccp_scrc: Add missing include mtp_sap.h
by pespin 09 Oct '26

09 Oct '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43835?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: sccp_scrc: Add missing include mtp_sap.h ...................................................................... sccp_scrc: Add missing include mtp_sap.h The file uses osmo_mtp_prim_xfer_req_prepend(), which is in mtp_sap.h, but it's not including it. Change-Id: I78f30dee05ff1f29b59ccf6f0ccbfe8d76109fa0 --- M src/sccp_scrc.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c index 1e12ffd..f18ce02 100644 --- a/src/sccp_scrc.c +++ b/src/sccp_scrc.c @@ -28,6 +28,7 @@ #include <osmocom/sccp/sccp_types.h> #include <osmocom/sigtran/osmo_ss7.h> +#include <osmocom/sigtran/mtp_sap.h> #include <osmocom/sigtran/sccp_sap.h> #include <osmocom/sigtran/sccp_helpers.h> #include <osmocom/sigtran/protocol/sua.h> -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43835?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: I78f30dee05ff1f29b59ccf6f0ccbfe8d76109fa0 Gerrit-Change-Number: 43835 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: as_vty: Support configuring OPC+mask and improve input validation
by pespin 09 Oct '26

09 Oct '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43813?usp=email ) Change subject: as_vty: Support configuring OPC+mask and improve input validation ...................................................................... as_vty: Support configuring OPC+mask and improve input validation This commit still doesn't use OPC, only allows setting it. This is fine since it's actually the same with SI and SSN. Further future work will use all those fields when matching an AS on incoming messages. Related: OS#7070 Change-Id: Icd9e43736ea9240060244cebcacba1f8119043a5 --- M include/osmocom/sigtran/osmo_ss7.h M src/ss7_as.c M src/ss7_as_vty.c M src/xua_rkm.c M tests/vty/osmo_stp_test.vty M tests/vty/ss7_asp_test.vty 6 files changed, 167 insertions(+), 33 deletions(-) Approvals: fixeria: 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/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 594cbae..9357b0f 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -140,14 +140,19 @@ * SS7 Routing key ***********************************************************************/ +#define OSSMO_SS7_RKEY_SI_UNSET 0xff +#define OSSMO_SS7_RKEY_SSN_UNSET 0x00 struct osmo_ss7_routing_key { uint32_t context; uint32_t l_rk_id; uint32_t pc; - uint8_t si; - uint32_t ssn; - /* FIXME: more complex routing keys */ + uint8_t si; /* OSSMO_SS7_RKEY_SI_UNSET == unset */ + uint32_t ssn; /* OSSMO_SS7_RKEY_SSN_UNSET == unset */ + + /* opc=0 & opc_mask=0 matches any. */ + uint32_t opc; + uint32_t opc_mask; }; diff --git a/src/ss7_as.c b/src/ss7_as.c index fe236cf..7ad105a 100644 --- a/src/ss7_as.c +++ b/src/ss7_as.c @@ -182,6 +182,8 @@ as->cfg.mode = OSMO_SS7_AS_TMOD_OVERRIDE; as->cfg.recovery_timeout_msec = 2000; as->cfg.routing_key.l_rk_id = ss7_find_free_l_rk_id(inst); + as->cfg.routing_key.si = OSSMO_SS7_RKEY_SI_UNSET; + as->cfg.routing_key.ssn = OSSMO_SS7_RKEY_SSN_UNSET; #ifdef WITH_TCAP_LOADSHARING /* loadshare-tcap based id sharing */ diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c index 4d7d460..7d5eea0 100644 --- a/src/ss7_as_vty.c +++ b/src/ss7_as_vty.c @@ -36,6 +36,7 @@ #include <osmocom/vty/misc.h> #include <osmocom/sigtran/protocol/mtp.h> +#include <osmocom/sigtran/osmo_ss7.h> #include "ss7_as.h" #ifdef WITH_TCAP_LOADSHARING @@ -335,6 +336,11 @@ "Define a routing key\n" \ "Routing context number\n" \ "Destination Point Code\n" +#define ROUTING_KEY_OPC_ARG " opc POINT_CODE MASK" +#define ROUTING_KEY_OPC_ARG_STRS \ + "Match on Originating Point Code and Mask\n" \ + "Originating Point Code\n" \ + "Originating Point Code Mask\n" #define ROUTING_KEY_SI_ARG " si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup)" #define ROUTING_KEY_SI_ARG_STRS \ "Match on Service Indicator\n" \ @@ -352,31 +358,92 @@ "Sub-System Number to match on\n" static int _rout_key(struct vty *vty, - const char *rcontext, const char *dpc, - const char *si, const char *ssn) + const char *rctx_str, const char *dpc_str, + const char *opc_str, const char *opc_mask_str, + const char *si_str, const char *ssn_str) { struct osmo_ss7_as *as = vty->index; struct osmo_ss7_routing_key *rkey = &as->cfg.routing_key; - int pc; + int dpc, opc, opc_mask; + int64_t rctx; + uint8_t si; + int64_t ssn; - if (as->cfg.proto == OSMO_SS7_ASP_PROT_IPA && atoi(rcontext) != 0) { + if (osmo_str_to_int64(&rctx, rctx_str, 10, 0, UINT32_MAX) != 0) { + vty_out(vty, "Invalid Routing Context (%s)%s", rctx_str, VTY_NEWLINE); + return CMD_WARNING; + } + + if (as->cfg.proto == OSMO_SS7_ASP_PROT_IPA && rctx != 0) { vty_out(vty, "IPA doesn't support routing contexts; only permitted routing context " "is 0\n"); return CMD_WARNING; } - pc = osmo_ss7_pointcode_parse(as->inst, dpc); - if (pc < 0) { - vty_out(vty, "Invalid point code (%s)%s", dpc, VTY_NEWLINE); + dpc = osmo_ss7_pointcode_parse(as->inst, dpc_str); + if (dpc < 0) { + vty_out(vty, "Invalid Point Code (%s)%s", dpc_str, VTY_NEWLINE); return CMD_WARNING; } - rkey->pc = pc; + if (opc_str) { + OSMO_ASSERT(opc_mask_str); + opc = osmo_ss7_pointcode_parse(as->inst, opc_str); + if (opc < 0) { + vty_out(vty, "Invalid Originating Point Code (%s)%s", opc_str, VTY_NEWLINE); + return CMD_WARNING; + } + opc_mask = osmo_ss7_pointcode_parse_mask_or_len(as->inst, opc_mask_str); + if (opc_mask < 0) { + vty_out(vty, "Invalid Originating Point Code Mask (%s)%s", opc_mask_str, VTY_NEWLINE); + return CMD_WARNING; + } + } else { + /* Match all OPC: */ + opc = 0; + opc_mask = 0; + } - rkey->context = atoi(rcontext); /* FIXME: input validation */ - rkey->si = si ? get_string_value(mtp_si_vals, si) : 0; /* FIXME: input validation */ - rkey->ssn = ssn ? atoi(ssn) : 0; /* FIXME: input validation */ + if (si_str) + si = get_string_value(mtp_si_vals, si_str); + else + si = OSSMO_SS7_RKEY_SI_UNSET; + if (ssn_str) { + if (osmo_str_to_int64(&ssn, ssn_str, 10, 0, 254 /* max(enum osmo_sccp_ssn) */) != 0) { + vty_out(vty, "Invalid SSN (%s)%s", ssn_str, VTY_NEWLINE); + return CMD_WARNING; + } + if (ssn != OSSMO_SS7_RKEY_SSN_UNSET) { + if (si == OSSMO_SS7_RKEY_SI_UNSET) { + /* Assume si == SCCP: */ + si = MTP_SI_SCCP; + } + if (si != MTP_SI_SCCP) { + vty_out(vty, "Invalid SI (%s) together with SSN (%s)%s", si_str, ssn_str, VTY_NEWLINE); + return CMD_WARNING; + } + if (as->cfg.proto != OSMO_SS7_ASP_PROT_SUA) { + /* FIXME: we may later want to support this: + * M3UA: Decode SCCP early if si==SCCP in m3ua_rx_xfer(). + * IPA: We already parse sccp in ipa_rx_msg_up() -> patch_sccp_with_pc() */ + vty_out(vty, "%s AS doesn't support matching on AS; only permitted on SUA AS%s", + osmo_ss7_asp_protocol_name(as->cfg.proto), VTY_NEWLINE); + return CMD_WARNING; + } + } + } else { + ssn = OSSMO_SS7_RKEY_SSN_UNSET; + } + + rkey->context = rctx; + /* truncate mask to maximum. Let's avoid callers specifying arbitrary large + * masks to ensure we don't fail duplicate detection with longer mask lengths */ + rkey->pc = osmo_ss7_pc_normalize(&as->inst->cfg.pc_fmt, dpc); + rkey->opc = osmo_ss7_pc_normalize(&as->inst->cfg.pc_fmt, opc); + rkey->opc_mask = osmo_ss7_pc_normalize(&as->inst->cfg.pc_fmt, opc_mask); + rkey->si = si; + rkey->ssn = ssn; return CMD_SUCCESS; } @@ -385,7 +452,31 @@ ROUTING_KEY_CMD_STRS, CMD_ATTR_IMMEDIATE) { - return _rout_key(vty, argv[0], argv[1], NULL, NULL); + return _rout_key(vty, argv[0], argv[1], NULL, NULL, NULL, NULL); +} + +DEFUN_ATTR(as_rout_key_opc, as_rout_key_opc_cmd, + ROUTING_KEY_CMD ROUTING_KEY_OPC_ARG, + ROUTING_KEY_CMD_STRS ROUTING_KEY_OPC_ARG_STRS, + CMD_ATTR_IMMEDIATE) +{ + return _rout_key(vty, argv[0], argv[1], argv[2], argv[3], NULL, NULL); +} + +DEFUN_ATTR(as_rout_key_opc_si, as_rout_key_opc_si_cmd, + ROUTING_KEY_CMD ROUTING_KEY_OPC_ARG ROUTING_KEY_SI_ARG, + ROUTING_KEY_CMD_STRS ROUTING_KEY_OPC_ARG_STRS ROUTING_KEY_SI_ARG_STRS, + CMD_ATTR_IMMEDIATE) +{ + return _rout_key(vty, argv[0], argv[1], argv[2], argv[3], argv[4], NULL); +} + +DEFUN_ATTR(as_rout_key_opc_si_ssn, as_rout_key_opc_si_ssn_cmd, + ROUTING_KEY_CMD ROUTING_KEY_OPC_ARG ROUTING_KEY_SI_ARG ROUTING_KEY_SSN_ARG, + ROUTING_KEY_CMD_STRS ROUTING_KEY_OPC_ARG_STRS ROUTING_KEY_SI_ARG_STRS ROUTING_KEY_SSN_ARG_STRS, + CMD_ATTR_IMMEDIATE) +{ + return _rout_key(vty, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } DEFUN_ATTR(as_rout_key_si, as_rout_key_si_cmd, @@ -393,15 +484,7 @@ ROUTING_KEY_CMD_STRS ROUTING_KEY_SI_ARG_STRS, CMD_ATTR_IMMEDIATE) { - return _rout_key(vty, argv[0], argv[1], argv[2], NULL); -} - -DEFUN_ATTR(as_rout_key_ssn, as_rout_key_ssn_cmd, - ROUTING_KEY_CMD ROUTING_KEY_SSN_ARG, - ROUTING_KEY_CMD_STRS ROUTING_KEY_SSN_ARG_STRS, - CMD_ATTR_IMMEDIATE) -{ - return _rout_key(vty, argv[0], argv[1], NULL, argv[2]); + return _rout_key(vty, argv[0], argv[1], NULL, NULL, argv[2], NULL); } DEFUN_ATTR(as_rout_key_si_ssn, as_rout_key_si_ssn_cmd, @@ -409,7 +492,15 @@ ROUTING_KEY_CMD_STRS ROUTING_KEY_SI_ARG_STRS ROUTING_KEY_SSN_ARG_STRS, CMD_ATTR_IMMEDIATE) { - return _rout_key(vty, argv[0], argv[1], argv[2], argv[3]); + return _rout_key(vty, argv[0], argv[1], NULL, NULL, argv[2], argv[3]); +} + +DEFUN_ATTR(as_rout_key_ssn, as_rout_key_ssn_cmd, + ROUTING_KEY_CMD ROUTING_KEY_SSN_ARG, + ROUTING_KEY_CMD_STRS ROUTING_KEY_SSN_ARG_STRS, + CMD_ATTR_IMMEDIATE) +{ + return _rout_key(vty, argv[0], argv[1], NULL, NULL, NULL, argv[2]); } DEFUN_ATTR(as_pc_override, as_pc_override_cmd, @@ -572,10 +663,14 @@ rkey = &as->cfg.routing_key; vty_out(vty, " routing-key %u %s", rkey->context, osmo_ss7_pointcode_print(as->inst, rkey->pc)); - if (rkey->si) + if (rkey->opc != 0 || rkey->opc_mask != 0) + vty_out(vty, " opc %s %s", + osmo_ss7_pointcode_print(as->inst, rkey->opc), + osmo_ss7_pointcode_print2(as->inst, rkey->opc_mask)); + if (rkey->si != OSSMO_SS7_RKEY_SI_UNSET) vty_out(vty, " si %s", get_value_string(mtp_si_vals, rkey->si)); - if (rkey->ssn) + if (rkey->ssn != OSSMO_SS7_RKEY_SSN_UNSET) vty_out(vty, " ssn %u", rkey->ssn); vty_out(vty, "%s", VTY_NEWLINE); @@ -592,10 +687,29 @@ static void show_one_as(struct vty *vty, struct osmo_ss7_as *as) { + char opc[MAX_PC_STR_LEN+MAX_PC_STR_LEN+1] = { '\0' }; + char si[16] = { '\0' }; + char ssn[16] = { '\0' }; + + if (as->cfg.routing_key.opc != 0 || as->cfg.routing_key.opc_mask != 0) { + snprintf(opc, sizeof(opc), "%s/%s", + osmo_ss7_pointcode_print(as->inst, as->cfg.routing_key.opc), + osmo_ss7_pointcode_print2(as->inst, as->cfg.routing_key.opc_mask)); + } + + if (as->cfg.routing_key.si != OSSMO_SS7_RKEY_SI_UNSET) + snprintf(si, sizeof(si), "%u", as->cfg.routing_key.si); + + if (as->cfg.routing_key.ssn != OSSMO_SS7_RKEY_SSN_UNSET) + snprintf(si, sizeof(si), "%u", as->cfg.routing_key.ssn); + vty_out(vty, "%-12s %-12s %-10u %-13s %4s %13s %3s %5s %4s %10s%s", - as->cfg.name, osmo_fsm_inst_state_name(as->fi), as->cfg.routing_key.context, + as->cfg.name, + osmo_fsm_inst_state_name(as->fi), + as->cfg.routing_key.context, osmo_ss7_pointcode_print(as->inst, as->cfg.routing_key.pc), - "", "", "", "", "", osmo_ss7_as_traffic_mode_name(as->cfg.mode), + si, opc, ssn, "", "", + osmo_ss7_as_traffic_mode_name(as->cfg.mode), VTY_NEWLINE); } @@ -776,9 +890,12 @@ install_lib_element(L_CS7_AS_NODE, &as_recov_tout_cmd); install_lib_element(L_CS7_AS_NODE, &as_qos_class_cmd); install_lib_element(L_CS7_AS_NODE, &as_rout_key_cmd); + install_lib_element(L_CS7_AS_NODE, &as_rout_key_opc_cmd); + install_lib_element(L_CS7_AS_NODE, &as_rout_key_opc_si_cmd); + install_lib_element(L_CS7_AS_NODE, &as_rout_key_opc_si_ssn_cmd); install_lib_element(L_CS7_AS_NODE, &as_rout_key_si_cmd); - install_lib_element(L_CS7_AS_NODE, &as_rout_key_ssn_cmd); install_lib_element(L_CS7_AS_NODE, &as_rout_key_si_ssn_cmd); + install_lib_element(L_CS7_AS_NODE, &as_rout_key_ssn_cmd); install_lib_element(L_CS7_AS_NODE, &as_pc_override_cmd); install_lib_element(L_CS7_AS_NODE, &as_no_pc_override_cmd); install_lib_element(L_CS7_AS_NODE, &as_pc_patch_sccp_cmd); diff --git a/src/xua_rkm.c b/src/xua_rkm.c index cbcdc52..61f9dc6 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -322,8 +322,12 @@ as->cfg.mode_set_by_peer = true; } /* fill routing key */ - as->cfg.routing_key.pc = dpc; as->cfg.routing_key.context = rctx; + as->cfg.routing_key.pc = dpc; + as->cfg.routing_key.opc = 0; /* TODO: support OPC List IE */ + as->cfg.routing_key.opc_mask = 0; + as->cfg.routing_key.si = OSSMO_SS7_RKEY_SI_UNSET; + as->cfg.routing_key.ssn = OSSMO_SS7_RKEY_SSN_UNSET; /* add dynamic route for that routing key */ rt = ss7_route_create(as->inst->rtable_system, dpc, 0xFFFFFF, true, namebuf); diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty index fdcdc26..66273b9 100644 --- a/tests/vty/osmo_stp_test.vty +++ b/tests/vty/osmo_stp_test.vty @@ -472,9 +472,12 @@ recovery-timeout <1-2000> qos-class <0-7> routing-key RCONTEXT DPC + routing-key RCONTEXT DPC opc POINT_CODE MASK + routing-key RCONTEXT DPC opc POINT_CODE MASK si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup) + routing-key RCONTEXT DPC opc POINT_CODE MASK si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup) ssn SSN routing-key RCONTEXT DPC si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup) - routing-key RCONTEXT DPC ssn SSN routing-key RCONTEXT DPC si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup) ssn SSN + routing-key RCONTEXT DPC ssn SSN point-code override (opc|dpc) PC no point-code override (opc|dpc) point-code override patch-sccp (disabled|both) diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index 08d8ed6..b136883 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -457,9 +457,12 @@ recovery-timeout <1-2000> qos-class <0-7> routing-key RCONTEXT DPC + routing-key RCONTEXT DPC opc POINT_CODE MASK + routing-key RCONTEXT DPC opc POINT_CODE MASK si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup) + routing-key RCONTEXT DPC opc POINT_CODE MASK si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup) ssn SSN routing-key RCONTEXT DPC si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup) - routing-key RCONTEXT DPC ssn SSN routing-key RCONTEXT DPC si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup) ssn SSN + routing-key RCONTEXT DPC ssn SSN point-code override (opc|dpc) PC no point-code override (opc|dpc) point-code override patch-sccp (disabled|both) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43813?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: Icd9e43736ea9240060244cebcacba1f8119043a5 Gerrit-Change-Number: 43813 Gerrit-PatchSet: 3 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: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: xua_rkm: Add function helpers to set routes for AS route-key
by pespin 09 Oct '26

09 Oct '26
Attention is currently required from: fixeria. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43830?usp=email ) Change subject: xua_rkm: Add function helpers to set routes for AS route-key ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43830?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: I1dd83ae2b0d23c92304476692ef6bd9c2417e454 Gerrit-Change-Number: 43830 Gerrit-PatchSet: 3 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: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Oct 2026 12:10:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • ...
  • 123
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.