Attention is currently required from: pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685?usp=email )
Change subject: vty: Introduce cmd 'cs7 instance <0-15> asp NAME audit point-code POINT_CODE'
......................................................................
Patch Set 2:
(4 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685/comment/aa032dbb_ba77f… :
PS2, Line 10: when response arrive
: in case we run under some sort of misalignment with peer.
I find this part of the statement hard to read/understand. Could you rephrase please? What response? The response to DAUD? Maybe "... to manually update the local state in situations when the (what?) response arrives during some sort of misalignment with the peer"?
File src/ss7_asp_vty.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685/comment/48a553e2_6bf47… :
PS2, Line 110: osmo_ss7_pointcode_print_buf
Why not using `osmo_ss7_pointcode_print()` here?
Does not seem like you have to use a local buffer here...
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685/comment/1f75d70b_087e4… :
PS2, Line 118: audit point-code
Are you planning to add more commands related to `audit`?
If not, maybe make it a single term like `audit-point-code` or `audit-pc`?
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40685/comment/1eb0326d_899d9… :
PS2, Line 132: vty_out
cosmetic: here and below: missing `%%`
--
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: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I607df3d84562e56d329bea1a730e26c8cdaae591
Gerrit-Change-Number: 40685
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 15 Jul 2025 18:45:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40696?usp=email )
Change subject: xua_asp_fsm: Move helper function to ss7_asp internal API
......................................................................
xua_asp_fsm: Move helper function to ss7_asp internal API
This function will be used in other files in follow-up commit.
Change-Id: I3eb57c3fb690e7486b52b2c433b25930d16599e5
---
M src/ss7_asp.c
M src/ss7_asp.h
M src/xua_asp_fsm.c
3 files changed, 30 insertions(+), 28 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/96/40696/1
diff --git a/src/ss7_asp.c b/src/ss7_asp.c
index 0fea556..86de153 100644
--- a/src/ss7_asp.c
+++ b/src/ss7_asp.c
@@ -1549,3 +1549,30 @@
{
return _ss7_asp_get_all_rctx(asp, rctx, rctx_size, excl_as, false);
}
+
+/* determine the osmo_ss7_as_traffic_mode to be used by this ASP; will
+ * iterate over all AS configured for this ASP. If they're compatible,
+ * a single traffic mode is returned as enum osmo_ss7_as_traffic_mode.
+ * If they're incompatible, -EINVAL is returned. If there is none
+ * configured, -1 is returned */
+int ss7_asp_determine_traf_mode(const struct osmo_ss7_asp *asp)
+{
+ struct osmo_ss7_as *as;
+ int tmode = -1;
+
+ llist_for_each_entry(as, &asp->inst->as_list, list) {
+ if (!osmo_ss7_as_has_asp(as, asp))
+ continue;
+ /* we only care about traffic modes explicitly set */
+ if (!as->cfg.mode_set_by_vty)
+ continue;
+ if (tmode == -1) {
+ /* this is the first AS; we use this traffic mode */
+ tmode = as->cfg.mode;
+ } else {
+ if (tmode != as->cfg.mode)
+ return -EINVAL;
+ }
+ }
+ return tmode;
+}
diff --git a/src/ss7_asp.h b/src/ss7_asp.h
index ec74e82..e25c85c 100644
--- a/src/ss7_asp.h
+++ b/src/ss7_asp.h
@@ -172,5 +172,7 @@
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);
+int ss7_asp_determine_traf_mode(const struct osmo_ss7_asp *asp);
+
#define LOGPASP(asp, subsys, level, fmt, args ...) \
_LOGSS7((asp)->inst, subsys, level, "ASP(%s) " fmt, (asp)->cfg.name, ## args)
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index 06d4a86..730b97a 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -194,33 +194,6 @@
talloc_free(aff_pc);
}
-/* determine the osmo_ss7_as_traffic_mode to be used by this ASP; will
- * iterate over all AS configured for this ASP. If they're compatible,
- * a single traffic mode is returned as enum osmo_ss7_as_traffic_mode.
- * If they're incompatible, -EINVAL is returned. If there is none
- * configured, -1 is returned */
-static int determine_traf_mode(struct osmo_ss7_asp *asp)
-{
- struct osmo_ss7_as *as;
- int tmode = -1;
-
- llist_for_each_entry(as, &asp->inst->as_list, list) {
- if (!osmo_ss7_as_has_asp(as, asp))
- continue;
- /* we only care about traffic modes explicitly set */
- if (!as->cfg.mode_set_by_vty)
- continue;
- if (tmode == -1) {
- /* this is the first AS; we use this traffic mode */
- tmode = as->cfg.mode;
- } else {
- if (tmode != as->cfg.mode)
- return -EINVAL;
- }
- }
- return tmode;
-}
-
/* add M3UA_IEI_ROUTE_CTX to xua_msg containig all routing keys of ASs within ASP */
static int xua_msg_add_asp_rctx(struct xua_msg *xua, struct osmo_ss7_asp *asp)
{
@@ -302,7 +275,7 @@
/* RFC3868 Ch. 3.6.1 */
xua->hdr = XUA_HDR(SUA_MSGC_ASPTM, SUA_ASPTM_ACTIVE);
/* Optional: Traffic Mode Type */
- rc = determine_traf_mode(asp);
+ rc = ss7_asp_determine_traf_mode(asp);
if (rc >= 0)
xua_msg_add_u32(xua, M3UA_IEI_TRAF_MODE_TYP, osmo_ss7_tmode_to_xua(rc));
/* Optional: Routing Context */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40696?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I3eb57c3fb690e7486b52b2c433b25930d16599e5
Gerrit-Change-Number: 40696
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/94/40694/1
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: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I85e1d6c48f3c9082dcfaaeaa97a805cc0a372463
Gerrit-Change-Number: 40694
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40697?usp=email )
Change subject: xua_default_lm_fsm: Activate all ASPs in tmode broadcast/loadshare/roundrobin
......................................................................
xua_default_lm_fsm: Activate all ASPs in tmode broadcast/loadshare/roundrobin
If an ASP in an AS in tmode != override went down and up again, the LM
FSM was not re-activating it. This commit fixes it.
In tmode Override we don't want to swap the already active ASP, but in
other tmodes we want to have all of them activated.
This bug didn't affect during initial startup because usually all ASPs
were being activated while the AS wasn't yet active.
Change-Id: I548b88fa70b308033cb225623e803b731755651e
---
M src/xua_default_lm_fsm.c
1 file changed, 12 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/97/40697/1
diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c
index 2cf2010..dff5421 100644
--- a/src/xua_default_lm_fsm.c
+++ b/src/xua_default_lm_fsm.c
@@ -245,12 +245,18 @@
case LM_E_NOTIFY_IND:
OSMO_ASSERT(oxp->oph.primitive == OSMO_XLM_PRIM_M_NOTIFY);
OSMO_ASSERT(oxp->oph.operation == PRIM_OP_INDICATION);
- if (oxp->u.notify.status_type == M3UA_NOTIFY_T_STATCHG &&
- (oxp->u.notify.status_info == M3UA_NOTIFY_I_AS_INACT ||
- oxp->u.notify.status_info == M3UA_NOTIFY_I_AS_PEND)) {
- lm_fsm_state_chg(fi, S_ACTIVE);
- osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_ACTIVE_REQ, NULL);
- }
+
+ /* Not handling/interested in other status changes for now. */
+ if (oxp->u.notify.status_type != M3UA_NOTIFY_T_STATCHG)
+ break;
+
+ /* Don't change active ASP if there's alreasy one active. */
+ if (ss7_asp_determine_traf_mode(lmp->asp) == OSMO_SS7_AS_TMOD_OVERRIDE &&
+ oxp->u.notify.status_info == M3UA_NOTIFY_I_AS_ACT)
+ break;
+
+ lm_fsm_state_chg(fi, S_ACTIVE);
+ osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_ACTIVE_REQ, NULL);
break;
case LM_E_AS_INACTIVE_IND:
/* we now know that an AS is associated with this ASP at
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40697?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I548b88fa70b308033cb225623e803b731755651e
Gerrit-Change-Number: 40697
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>