Attention is currently required from: daniel, laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40621?usp=email )
Change subject: xua_snm: Tx DUNA/DAVA to ASPs with single AS and no coordinated rctx
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
ping
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40621?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: Ibda223090e7d503d8501c50f4cdf0b8b8c65a724
Gerrit-Change-Number: 40621
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: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Jul 2025 11:36:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40615?usp=email )
Change subject: Submit SCRC Routing Failure indications asynchronously
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> My point was that if we generically would enqueue all upward primitives at the SCCP user SAP, we wou […]
Yes, that would be the other approach, but since this is basically the only primitive going back upwards synchronously, it has the advantage that then we are not generating an extra select() call for each message we transmit to lower layer (including also user data).
So for now this is the less invasive and more performant approach.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40615?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: I17ae7174f7ffee8c9a004435e522803a97d4fb7b
Gerrit-Change-Number: 40615
Gerrit-PatchSet: 2
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: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 10 Jul 2025 11:34:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40627?usp=email )
Change subject: Make sure MSC/SGSN PC are added to sccp-addressbook
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> So far the philosophy was that the defaults apply if nothing else is configured explicitly by the us […]
The previous behavior still holds true in the sense that the default is only applied upon start of the cnlink if no config is found. The difference is that now a default entry is created in the book instead of running without an entry. So IMHO the current behavior is more similar in both user-config and no-user-config, which is better.
If the user later on decides to specify its own address in the address book it can be done by creating the new address entry and then if wished removing the default address with "no sccp-address" VTY command.
The default sccp address will only be recreated and used if there's still some cnlink which has no address configured.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40627?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I6a537adca27dd2bbad33d0f2be71eb41d6ad3a27
Gerrit-Change-Number: 40627
Gerrit-PatchSet: 1
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: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Jul 2025 11:31:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-netif/+/40628?usp=email )
Change subject: osmux: Use while loop to tear down entire llist
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40628?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Id98619b1e91f12b0febf40118113bb53bd526702
Gerrit-Change-Number: 40628
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-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Jul 2025 11:16:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40586?usp=email )
Change subject: vty: Make sure user doesn't configure AS in ASP role with a non-local PC as routing-key
......................................................................
vty: Make sure user doesn't configure AS in ASP role with a non-local PC as routing-key
AS in ASP mode doesn't expect to route incomign traffic to other nodes.
They are expected to announce its routing-key (local PC) to the SG so it
knows how to reach it and in turn announce (un)availability to other
SG/ASPs in the network.
Change-Id: Ibbf990fd8dcbdc67ebc4118597b34a5767320cf6
---
M src/ss7_as_vty.c
M src/ss7_vty.c
M src/ss7_vty.h
3 files changed, 14 insertions(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c
index 0b0ddc1..e94e0c2 100644
--- a/src/ss7_as_vty.c
+++ b/src/ss7_as_vty.c
@@ -581,6 +581,18 @@
struct osmo_ss7_as *as = vty->index;
vty->node = L_CS7_NODE;
vty->index = as->inst;
+
+ /* Config sanity checks: */
+
+ /* AS in ASP role should be configured with a local PC which they can
+ * then announce using RKM.
+ * Still, allow STPs to have AS(P) configured in an ASP mode to talk to a
+ * peer STP by announcing remove PCs. */
+ if (cs7_role == CS7_ROLE_ASP &&
+ ss7_as_get_local_role(as) == OSMO_SS7_ASP_ROLE_ASP &&
+ !osmo_ss7_pc_is_local(as->inst, as->cfg.routing_key.pc))
+ vty_out(vty, "%% AS with local role ASP should have a local PC configured in its routing-key. Fix your config!%s", VTY_NEWLINE);
+
return 0;
}
diff --git a/src/ss7_vty.c b/src/ss7_vty.c
index d774236..b333c7f 100644
--- a/src/ss7_vty.c
+++ b/src/ss7_vty.c
@@ -76,7 +76,7 @@
* Core CS7 Configuration
***********************************************************************/
-static enum cs7_role_t cs7_role;
+enum cs7_role_t cs7_role;
void *g_ctx;
static struct cmd_node cs7_node = {
diff --git a/src/ss7_vty.h b/src/ss7_vty.h
index 3bafffd..18dc5a6 100644
--- a/src/ss7_vty.h
+++ b/src/ss7_vty.h
@@ -18,6 +18,7 @@
};
extern void *g_ctx;
+extern enum cs7_role_t cs7_role;
extern const struct value_string ipproto_vals[];
#define CS7_STR "ITU-T Signaling System 7\n"
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40586?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: Ibbf990fd8dcbdc67ebc4118597b34a5767320cf6
Gerrit-Change-Number: 40586
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>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40611?usp=email )
Change subject: vty: Introduce missing cmd 'point-code override opc'
......................................................................
vty: Introduce missing cmd 'point-code override opc'
This patch introduces several improvements and fixes around the
'point-code override' feature:
* properly split overriding OPC vs DPC over VTY: Before this patch only
DPC cmd was available despite being used for OPC under ASP role. Even
the VTY command had a description entry for OPC but it was not
implemented yet.
* Allow proper overriding with PC 0.
* Allow overriding of both OPC and DPC in SG role.
* Figure out role based on role VTY configuration instead of IPA
client/server config.
Related: OS#6806
Change-Id: Id8ba5252a088dafe85bb25e13298c585acef277d
---
M src/ipa.c
M src/ss7_as.h
M src/ss7_as_vty.c
M tests/vty/osmo_stp_test.vty
4 files changed, 107 insertions(+), 30 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/ipa.c b/src/ipa.c
index 58646fa..8035889 100644
--- a/src/ipa.c
+++ b/src/ipa.c
@@ -265,25 +265,40 @@
* information inside the non-CR/CC connection oriented
* messages.
*
- * The only other alternative we have is to simply have a
- * STP (server) side configuration that specifies which point
- * code those messages are to be routed to, and then use this
- * 'override DPC' in the routing decision. We could do the same
- * for the source point code to ensure responses are routed back
- * to us. This is all quite ugly, but then what can we do :/
+ * The only other alternative we have is to:
+ *
+ * ASP role: we assume whatever was received at the ASP/AS was meant to
+ * reach us and hence set the DPC to the PC configured in the
+ * 'routing-key'. In this case the 'override OPC' is used so that upper
+ * layers can find out where it came from, so it can answer back if needed.
+ *
+ * SG role (STP): By default, the AS associated with the ASP assumes the
+ * OPC of the message received was transmitted to us from the PC
+ * configured in the 'routing-key'. If set, 'override OPC' can be used
+ * to also tweak the originating PC, which can be useful in setups with
+ * traffic coming from another STP where want to set eg. the OPC to the
+ * PC of the originating AS. In this case the 'override DPC'.
+ * allows to find out where those messages are to be routed to in the
+ * routing decision.
+ *
+ * This is all quite ugly, but then what can we do :/
*/
/* First, determine the DPC and OPC to use */
- if (asp->cfg.is_server) {
- /* Source: the PC of the routing key */
- opc = as->cfg.routing_key.pc;
- /* Destination: Based on VTY config */
- dpc = as->cfg.pc_override.dpc;
- } else {
+ if (asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP) {
/* Source: Based on VTY config */
- opc = as->cfg.pc_override.dpc;
+ opc = as->cfg.pc_override.opc;
/* Destination: PC of the routing key */
dpc = as->cfg.routing_key.pc;
+ } else {
+ /* Source: if set, based on VTY config,
+ * otherwise by default the PC of the routing key */
+ if (as->cfg.pc_override.opc_enabled)
+ opc = as->cfg.pc_override.opc;
+ else
+ opc = as->cfg.routing_key.pc;
+ /* Destination: Based on VTY config */
+ dpc = as->cfg.pc_override.dpc;
}
/* Second, patch this into the SCCP message */
diff --git a/src/ss7_as.h b/src/ss7_as.h
index be10f48..98151f8 100644
--- a/src/ss7_as.h
+++ b/src/ss7_as.h
@@ -104,6 +104,9 @@
uint32_t recovery_timeout_msec;
uint8_t qos_class;
struct {
+ bool opc_enabled;
+ bool dpc_enabled;
+ uint32_t opc;
uint32_t dpc;
enum osmo_ss7_as_patch_sccp_mode sccp_mode;
} pc_override;
diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c
index e94e0c2..6ce57d4 100644
--- a/src/ss7_as_vty.c
+++ b/src/ss7_as_vty.c
@@ -344,18 +344,19 @@
}
DEFUN_ATTR(as_pc_override, as_pc_override_cmd,
- "point-code override dpc PC",
+ "point-code override (opc|dpc) PC",
"Point Code Specific Features\n"
- "Override (force) a point-code to hard-coded value\n"
- "Override Source Point Code\n"
- "Override Destination Point Code\n"
+ "Override (force) a point-code of messages received at the AS\n"
+ "Override Source Point Code of received messages\n"
+ "Override Destination Point Code of received messages\n"
"New Point Code\n",
CMD_ATTR_IMMEDIATE)
{
struct osmo_ss7_as *as = vty->index;
- int pc = osmo_ss7_pointcode_parse(as->inst, argv[0]);
+ bool change_dpc = !strcmp(argv[0], "dpc");
+ int pc = osmo_ss7_pointcode_parse(as->inst, argv[1]);
if (pc < 0) {
- vty_out(vty, "Invalid point code (%s)%s", argv[0], VTY_NEWLINE);
+ vty_out(vty, "Invalid point code (%s)%s", argv[1], VTY_NEWLINE);
return CMD_WARNING;
}
@@ -365,11 +366,48 @@
return CMD_WARNING;
}
- as->cfg.pc_override.dpc = pc;
+ if (change_dpc) {
+ if (cs7_role == CS7_ROLE_ASP) {
+ vty_out(vty, "%% Overriding the DPC of AS '%s' in role ASP makes no sense. "
+ "Assuming user meant 'point-code override opc %s' to stay backway-comaptible. "
+ "Please update your config!%s",
+ as->cfg.name, argv[1], VTY_NEWLINE);
+ as->cfg.pc_override.opc_enabled = true;
+ as->cfg.pc_override.opc = pc;
+ return CMD_SUCCESS;
+ }
+ as->cfg.pc_override.dpc_enabled = true;
+ as->cfg.pc_override.dpc = pc;
+ } else {
+ as->cfg.pc_override.opc_enabled = true;
+ as->cfg.pc_override.opc = pc;
+ }
return CMD_SUCCESS;
}
+DEFUN_ATTR(as_no_pc_override, as_no_pc_override_cmd,
+ "no point-code override (opc|dpc)",
+ NO_STR
+ "Point Code Specific Features\n"
+ "Override (force) a point-code of messages received at the AS\n"
+ "Override Source Point Code of received messages\n"
+ "Override Destination Point Code of received messages\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct osmo_ss7_as *as = vty->index;
+ bool change_dpc = !strcmp(argv[0], "dpc");
+
+ if (change_dpc) {
+ as->cfg.pc_override.dpc_enabled = false;
+ as->cfg.pc_override.dpc = 0;
+ } else {
+ as->cfg.pc_override.opc_enabled = false;
+ as->cfg.pc_override.opc = 0;
+ }
+ return CMD_SUCCESS;
+}
+
DEFUN_ATTR(as_pc_patch_sccp, as_pc_patch_sccp_cmd,
"point-code override patch-sccp (disabled|both)",
"Point Code Specific Features\n"
@@ -450,7 +488,10 @@
vty_out(vty, " ssn %u", rkey->ssn);
vty_out(vty, "%s", VTY_NEWLINE);
- if (as->cfg.pc_override.dpc)
+ if (as->cfg.pc_override.opc_enabled)
+ vty_out(vty, " point-code override opc %s%s",
+ osmo_ss7_pointcode_print(as->inst, as->cfg.pc_override.opc), VTY_NEWLINE);
+ if (as->cfg.pc_override.dpc_enabled)
vty_out(vty, " point-code override dpc %s%s",
osmo_ss7_pointcode_print(as->inst, as->cfg.pc_override.dpc), VTY_NEWLINE);
@@ -584,15 +625,30 @@
/* Config sanity checks: */
- /* AS in ASP role should be configured with a local PC which they can
- * then announce using RKM.
- * Still, allow STPs to have AS(P) configured in an ASP mode to talk to a
- * peer STP by announcing remove PCs. */
- if (cs7_role == CS7_ROLE_ASP &&
- ss7_as_get_local_role(as) == OSMO_SS7_ASP_ROLE_ASP &&
- !osmo_ss7_pc_is_local(as->inst, as->cfg.routing_key.pc))
- vty_out(vty, "%% AS with local role ASP should have a local PC configured in its routing-key. Fix your config!%s", VTY_NEWLINE);
+ if (cs7_role == CS7_ROLE_ASP) {
+ int as_role = ss7_as_get_local_role(as);
+ /* AS in ASP role should be configured with a local PC which they can
+ * then announce using RKM.
+ * Still, allow STPs to have AS(P) configured in an ASP mode to talk to a
+ * peer STP by announcing remove PCs. */
+ if (as_role == OSMO_SS7_ASP_ROLE_ASP &&
+ !osmo_ss7_pc_is_local(as->inst, as->cfg.routing_key.pc))
+ vty_out(vty, "%% AS '%s' with local role ASP should have a local PC configured in its "
+ "routing-key. Fix your config!%s", as->cfg.name, VTY_NEWLINE);
+ if (as->cfg.proto == OSMO_SS7_ASP_PROT_IPA) {
+ if (as_role == OSMO_SS7_ASP_ROLE_ASP &&
+ !as->cfg.pc_override.opc_enabled)
+ vty_out(vty, "%% ipa AS '%s' with local role ASP should have a "
+ "'point-code override opc PC' configured in its routing-key. Fix your config!%s",
+ as->cfg.name, VTY_NEWLINE);
+ if (as_role == OSMO_SS7_ASP_ROLE_SG &&
+ !as->cfg.pc_override.dpc_enabled)
+ vty_out(vty, "%% ipa AS '%s' with local role SG should have a "
+ "'point-code override dpc PC' configured in its routing-key. Fix your config!%s",
+ as->cfg.name, VTY_NEWLINE);
+ }
+ }
return 0;
}
@@ -619,5 +675,6 @@
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_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/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty
index 4502c74..a253c5a 100644
--- a/tests/vty/osmo_stp_test.vty
+++ b/tests/vty/osmo_stp_test.vty
@@ -387,7 +387,8 @@
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
- point-code override dpc PC
+ point-code override (opc|dpc) PC
+ no point-code override (opc|dpc)
point-code override patch-sccp (disabled|both)
OsmoSTP(config-cs7-as)# ?
@@ -406,6 +407,7 @@
OsmoSTP(config-cs7-as)# no ?
asp Specify ASP to be removed from this AS
traffic-mode Remove explicit traffic mode of operation of this AS
+ point-code Point Code Specific Features
OsmoSTP(config-cs7-as)# do show cs7 instance 0 as all
Routing Routing Key Cic Cic Traffic
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40611?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: Id8ba5252a088dafe85bb25e13298c585acef277d
Gerrit-Change-Number: 40611
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>