pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685?usp=email )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: vty: Introduce cmd 'cs7 instance <0-15> asp NAME audit point-code POINT_CODE'
......................................................................
vty: Introduce cmd 'cs7 instance <0-15> asp NAME audit point-code POINT_CODE'
This command is useful to debug state of a given route on a remote SG.
It can also be used to manually update the state of the local stack when DAUD
response (DAVA/DUNA) arrives, in case we were not properly notified of some
change by the peer or due to some internal bug.
Change-Id: I607df3d84562e56d329bea1a730e26c8cdaae591
---
M src/ss7_asp_vty.c
M tests/vty/osmo_stp_test.vty
2 files changed, 59 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/ss7_asp_vty.c b/src/ss7_asp_vty.c
index c69b66b..9cdaca8 100644
--- a/src/ss7_asp_vty.c
+++ b/src/ss7_asp_vty.c
@@ -99,6 +99,62 @@
{ 0, NULL }
};
+static void tx_daud_pc(struct osmo_ss7_asp *asp, uint32_t pc)
+{
+ uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT];
+ unsigned int num_rctx;
+ char buf_pc[MAX_PC_STR_LEN];
+ uint32_t aff_pc;
+
+ LOGPASP(asp, DLSS7, LOGL_NOTICE, "VTY: Tx DAUD pc=%u=%s\n",
+ pc, osmo_ss7_pointcode_print_buf(buf_pc, sizeof(buf_pc), asp->inst, pc));
+
+ aff_pc = htonl(pc); /* mask = 0 */
+ num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), NULL);
+ xua_tx_snm_daud(asp, rctx, num_rctx, &aff_pc, 1, "VTY");
+}
+
+DEFUN_ATTR(cs7_asp_audit, cs7_asp_audit_cmd,
+ "cs7 instance <0-15> asp NAME audit point-code POINT_CODE",
+ CS7_STR "Instance related commands\n" "SS7 Instance Number\n"
+ "ASP related commands\n" "Name of ASP\n"
+ "Audit destination Point Code (xUA DAUD)\n"
+ "Destination Point Code to audit\n"
+ "Destination Point Code value\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct osmo_ss7_instance *inst;
+ struct osmo_ss7_asp *asp;
+ int pc;
+
+ inst = osmo_ss7_instance_find(atoi(argv[0]));
+ if (!inst) {
+ vty_out(vty, "%% Unknown instance '%s'%s", argv[0], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ asp = osmo_ss7_asp_find_by_name(inst, argv[1]);
+ if (!asp) {
+ vty_out(vty, "%% Unknown ASP '%s'%s", argv[1], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ pc = osmo_ss7_pointcode_parse(asp->inst, argv[2]);
+ if (pc < 0) {
+ vty_out(vty, "%% Invalid point code (%s)%s", argv[2], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ if (asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP) {
+ vty_out(vty, "%% ASP audit (DAUD) can't be sent in role '%s'%s",
+ get_value_string(osmo_ss7_asp_role_names, asp->cfg.role), VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ tx_daud_pc(asp, pc);
+ return CMD_SUCCESS;
+}
+
DEFUN_ATTR(cs7_asp, cs7_asp_cmd,
"asp NAME <0-65535> <0-65535> " XUA_VAR_STR,
"Configure Application Server Process\n"
@@ -1356,6 +1412,8 @@
NO_STR "Disable quirk to work around interop issues\n",
"\n", "\n", 0);
+ install_lib_element(ENABLE_NODE, &cs7_asp_audit_cmd);
+
install_node(&asp_node, NULL);
install_lib_element_ve(&show_cs7_asp_cmd);
install_lib_element_ve(&show_cs7_asp_name_cmd);
diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty
index 0d6ffff..3f8dfaf 100644
--- a/tests/vty/osmo_stp_test.vty
+++ b/tests/vty/osmo_stp_test.vty
@@ -31,6 +31,7 @@
show cs7 (sua|m3ua|ipa) (sctp|tcp) [<0-65534>]
show cs7 config
cs7 instance <0-15> asp NAME disconnect
+ cs7 instance <0-15> asp NAME audit point-code POINT_CODE
show cs7 instance <0-15> asp
show cs7 instance <0-15> asp name ASP_NAME
show cs7 instance <0-15> asp-remaddr
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685?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: I607df3d84562e56d329bea1a730e26c8cdaae591
Gerrit-Change-Number: 40685
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(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/+/40694?usp=email )
Change subject: sccp: MTP-TRANSFER.req: Set OPC before route lookup
......................................................................
sccp: MTP-TRANSFER.req: Set OPC before route lookup
Before this commit, all SCCP UNIT-DATA.req came with unset xua->mtp.opc
and hence route lookup was done with opc=0 in mtp route label.
Since loadsharing may take into account some OPC bits to distribute
traffic, set the OPC properly before route lookup.
Change-Id: I85e1d6c48f3c9082dcfaaeaa97a805cc0a372463
---
M src/sccp_scrc.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
fixeria: 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
Jenkins Builder: Verified
diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c
index e28e584..d8239e3 100644
--- a/src/sccp_scrc.c
+++ b/src/sccp_scrc.c
@@ -142,6 +142,7 @@
struct xua_msg *xua,
const struct osmo_sccp_addr *called)
{
+ struct osmo_sccp_addr calling;
struct osmo_ss7_route *rt;
struct osmo_ss7_route_label rtlabel;
@@ -159,6 +160,11 @@
* primitive and send it via link
*/
+ if (sua_addr_parse(&calling, xua, SUA_IEI_SRC_ADDR) == 0 &&
+ (calling.presence & OSMO_SCCP_ADDR_T_PC))
+ xua->mtp.opc = calling.pc;
+
+
if (called->presence & OSMO_SCCP_ADDR_T_PC)
xua->mtp.dpc = called->pc;
if (!xua->mtp.dpc) {
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40694?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: I85e1d6c48f3c9082dcfaaeaa97a805cc0a372463
Gerrit-Change-Number: 40694
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40700?usp=email )
Change subject: rebar.lock: use more recent exometer_core
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40700?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ic0fad544d1763ac84a69d1ee7df498d80c1c5f3e
Gerrit-Change-Number: 40700
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 16 Jul 2025 11:49:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes