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

July 2025

  • 1 participants
  • 1492 discussions
[S] Change in osmo-ccid-firmware[master]: 7816 fsm: ensure errors always return a msgb
by Hoernchen 16 Jul '25

16 Jul '25
Attention is currently required from: pespin. Hoernchen has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/40703?usp=email ) Change subject: 7816 fsm: ensure errors always return a msgb ...................................................................... Patch Set 1: (1 comment) File ccid_common/iso7816_fsm.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/40703/comment/0db733ac_b5… : PS1, Line 1510: OSMO_ASSERT(fi->fsm == &tpdu_fsm); > this assert can still be kept? Or makes no sense? checked by the function. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/40703?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: If32484675a0a10f1504477f5eea00c879ec78f1e Gerrit-Change-Number: 40703 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 16 Jul 2025 14:29:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ccid-firmware[master]: 7816 fsm: ensure errors always return a msgb
by pespin 16 Jul '25

16 Jul '25
Attention is currently required from: Hoernchen. pespin has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/40703?usp=email ) Change subject: 7816 fsm: ensure errors always return a msgb ...................................................................... Patch Set 1: (1 comment) File ccid_common/iso7816_fsm.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/40703/comment/483f9fe7_44… : PS1, Line 1510: OSMO_ASSERT(fi->fsm == &tpdu_fsm); this assert can still be kept? Or makes no sense? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/40703?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: If32484675a0a10f1504477f5eea00c879ec78f1e Gerrit-Change-Number: 40703 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Wed, 16 Jul 2025 14:10:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[XS] Change in libosmo-sigtran[master]: sccp_sclc: Remove SCCP cause mask in N-NOTICE.ind 'Reason for return'...
by pespin 16 Jul '25

16 Jul '25
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40702?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: sccp_sclc: Remove SCCP cause mask in N-NOTICE.ind 'Reason for return' field ...................................................................... sccp_sclc: Remove SCCP cause mask in N-NOTICE.ind 'Reason for return' field ITU Q.713 A.5 states "There is a one-to-one mapping between the return cause of UDTS, XUDTS or LUDTS messages and the reason for return in the N-NOTICE primitives". This matches with the list of strings listed in ITU Q.711 6.2.2.2.4 "Reason for return". "return cause" can in turn be found in ITU Q.713 3.12. During sccp_sclc_rx_scrc_rout_fail(), we are encoding the "return cause" param into the xua_msg usig gen_ret_msg(), which encodes it as SUA by prepending the SUA_CAUSE_T_RETURN bitmask cause-type to it. However, when constructing the primitive N-NOTICE.ind, we need to remove that mask when filling in "Reason for return". Change-Id: Iccff1e8809769edae36081a79119eb8da901841a --- M include/osmocom/sigtran/sccp_sap.h M src/sccp_sclc.c 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/02/40702/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40702?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Iccff1e8809769edae36081a79119eb8da901841a Gerrit-Change-Number: 40702 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[S] Change in osmo-ccid-firmware[master]: 7816 fsm: ensure errors always return a msgb
by Hoernchen 16 Jul '25

16 Jul '25
Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/40703?usp=email ) Change subject: 7816 fsm: ensure errors always return a msgb ...................................................................... 7816 fsm: ensure errors always return a msgb Change-Id: If32484675a0a10f1504477f5eea00c879ec78f1e --- M ccid_common/iso7816_fsm.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/03/40703/1 diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index f6d2185..0aa9571 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -668,7 +668,7 @@ if (!msgb_tailroom(atp->atr)) { LOGPFSML(fi, LOGL_ERROR, "ATR overflow !?!"); - osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_SW_ERR_IND, NULL); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_SW_ERR_IND, atp->atr); return -1; } msgb_put_u8(atp->atr, byte); @@ -726,15 +726,15 @@ default: LOGPFSML(fi, LOGL_ERROR, "Invalid TS received: 0x%02X\n", byte); /* FIXME: somehow indiicate to user */ - osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_SW_ERR_IND, NULL); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_SW_ERR_IND, atp->atr); break; } atp->i = 0; /* first interface byte sub-group is coming (T0 is kind of TD0) */ break; case ISO7816_E_WTIME_EXP: - osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_ATR_ERR_IND, NULL); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_ATR_ERR_IND, atp->atr); break; - default: + default: OSMO_ASSERT(0); } } @@ -840,7 +840,7 @@ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_ATR_DONE_IND, atp->atr); break; default: - osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_ATR_ERR_IND, NULL); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_ATR_ERR_IND, atp->atr); break; } break; @@ -1507,14 +1507,14 @@ static void tpdu_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - OSMO_ASSERT(fi->fsm == &tpdu_fsm); + struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); switch (event) { case ISO7816_E_RX_ERR_IND: case ISO7816_E_TX_ERR_IND: /* FIXME: handle this in some different way */ osmo_fsm_inst_state_chg(fi, TPDU_S_DONE, 0, 0); - osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, NULL); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, tfp->tpdu); break; case ISO7816_E_TPDU_CLEAR_REQ: osmo_fsm_inst_state_chg(fi, TPDU_S_INIT, 0, 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/40703?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: If32484675a0a10f1504477f5eea00c879ec78f1e Gerrit-Change-Number: 40703 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-sigtran[master]: sccp_sap.h: Improve documentation of N-NOTICE.ind fields
by pespin 16 Jul '25

16 Jul '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40702?usp=email ) Change subject: sccp_sap.h: Improve documentation of N-NOTICE.ind fields ...................................................................... sccp_sap.h: Improve documentation of N-NOTICE.ind fields Change-Id: Iccff1e8809769edae36081a79119eb8da901841a --- M include/osmocom/sigtran/sccp_sap.h 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/02/40702/1 diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index 65eff74..7399b3d 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -256,8 +256,10 @@ struct osmo_scu_notice_param { struct osmo_sccp_addr called_addr; struct osmo_sccp_addr calling_addr; + /* ITU Q.711 6.2.2.2.4 "Reason for return": + * enum sccp_return_cause (ITU Q.713 3.12), as per ITU Q.713 A.5. */ uint32_t cause; - uint32_t importance; + uint32_t importance; /* ITU Q.711 6.2.2.2.6, Q.713 3.19 */ /* user data */ }; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40702?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: Iccff1e8809769edae36081a79119eb8da901841a Gerrit-Change-Number: 40702 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua_as_fsm: Fix wrong pointer cast during XUA_ASPAS_ASP_DOWN_IND
by pespin 16 Jul '25

16 Jul '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40695?usp=email ) Change subject: xua_as_fsm: Fix wrong pointer cast during XUA_ASPAS_ASP_DOWN_IND ...................................................................... xua_as_fsm: Fix wrong pointer cast during XUA_ASPAS_ASP_DOWN_IND Change-Id: Ied523e080419723e0a3eb2f8103897b241bff41f --- M src/xua_as_fsm.c M src/xua_as_fsm.h 2 files changed, 17 insertions(+), 9 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/xua_as_fsm.c b/src/xua_as_fsm.c index 7afcb6d..c39132b 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -586,14 +586,8 @@ switch (event) { case XUA_ASPAS_ASP_DOWN_IND: - case XUA_ASPAS_ASP_INACTIVE_IND: - inact_ind_pars = data; - if (check_any_other_asp_in_active(xafp->as, inact_ind_pars->asp)) { - if (event == XUA_ASPAS_ASP_INACTIVE_IND && inact_ind_pars->asp_requires_notify) { - fill_notify_statchg_pars(fi, &npar); - tx_notify(inact_ind_pars->asp, &npar); - } /* ASP_DOWN_IND: ignore, nothing to be sent */ - } else { + asp = data; + if (!check_any_other_asp_in_active(xafp->as, asp)) { uint32_t recovery_msec = xafp->as->cfg.recovery_timeout_msec; osmo_fsm_inst_state_chg(fi, XUA_AS_S_PENDING, 0, 0); /* Start T(r) */ @@ -602,6 +596,20 @@ * recovery or T(r) expiry */ } break; + case XUA_ASPAS_ASP_INACTIVE_IND: + inact_ind_pars = data; + if (!check_any_other_asp_in_active(xafp->as, inact_ind_pars->asp)) { + uint32_t recovery_msec = xafp->as->cfg.recovery_timeout_msec; + osmo_fsm_inst_state_chg(fi, XUA_AS_S_PENDING, 0, 0); + /* Start T(r) */ + osmo_timer_schedule(&xafp->recovery.t_r, MSEC_TO_S_US(recovery_msec)); + /* FIXME: Queue all signalling messages until + * recovery or T(r) expiry */ + } else if (inact_ind_pars->asp_requires_notify) { + fill_notify_statchg_pars(fi, &npar); + tx_notify(inact_ind_pars->asp, &npar); + } + break; case XUA_ASPAS_ASP_ACTIVE_IND: asp = data; /* RFC466 sec 4.3.4.3 ASP Active Procedures*/ diff --git a/src/xua_as_fsm.h b/src/xua_as_fsm.h index 08f626b..5f6c7f3 100644 --- a/src/xua_as_fsm.h +++ b/src/xua_as_fsm.h @@ -21,7 +21,7 @@ enum xua_as_event { XUA_ASPAS_ASP_INACTIVE_IND, /* param: struct xua_as_event_asp_inactive_ind_pars* */ - XUA_ASPAS_ASP_DOWN_IND, + XUA_ASPAS_ASP_DOWN_IND, /* param: struct osmo_ss7_asp* */ XUA_ASPAS_ASP_ACTIVE_IND, XUA_AS_E_RECOVERY_EXPD, XUA_AS_E_TRANSFER_REQ, /* param: struct xua_msg*, ownership transferred. */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40695?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: Ied523e080419723e0a3eb2f8103897b241bff41f Gerrit-Change-Number: 40695 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>
1 0
0 0
[M] Change in libosmo-sigtran[master]: xua_asp_fsm: Move helper function to ss7_asp internal API
by pespin 16 Jul '25

16 Jul '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40696?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )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(-) Approvals: fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ss7_asp.c b/src/ss7_asp.c index 0fea556..7b819de 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) +{ + const 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 8000839..c3a77da 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -195,33 +195,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) { @@ -303,7 +276,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: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I3eb57c3fb690e7486b52b2c433b25930d16599e5 Gerrit-Change-Number: 40696 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>
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua_default_lm_fsm: Activate all ASPs in tmode broadcast/loadshare/ro...
by pespin 16 Jul '25

16 Jul '25
pespin has submitted this change. ( 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(-) Approvals: pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index 2cf2010..92a6ea2 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 already 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: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I548b88fa70b308033cb225623e803b731755651e Gerrit-Change-Number: 40697 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>
1 0
0 0
[M] Change in libosmo-sigtran[master]: xua: Introduce internal APIs to transmit DAUD
by pespin 16 Jul '25

16 Jul '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40684?usp=email ) Change subject: xua: Introduce internal APIs to transmit DAUD ...................................................................... xua: Introduce internal APIs to transmit DAUD Change-Id: Iab6126f1a9eac1a66bb8ec362b87e20a5eb795ff --- M src/m3ua.c M src/sua.c M src/xua_internal.h M src/xua_snm.c 4 files changed, 55 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/m3ua.c b/src/m3ua.c index f073c8e..7d3945c 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -883,7 +883,6 @@ return xua; } -#if 0 /* not used so far */ /* 3.4.3 Destination Available (DAUD) */ static struct xua_msg *m3ua_encode_daud(const uint32_t *rctx, unsigned int num_rctx, const uint32_t *aff_pc, unsigned int num_aff_pc, @@ -895,7 +894,6 @@ xua->hdr.msg_type = M3UA_SNM_DAUD; return xua; } -#endif /* 3.4.5 Destination User Part Unavailable (DUPU) */ static struct xua_msg *m3ua_encode_dupu(const uint32_t *rctx, unsigned int num_rctx, @@ -976,6 +974,21 @@ m3ua_tx_xua_asp(asp, xua); } +/*! Transmit SSNM DAUD message requesting [un]availability status of certain point code[s] + * \param[in] asp ASP through which to transmit message. Must be ACTIVE. + * \param[in] rctx array of Routing Contexts in network byte order. + * \param[in] num_rctx number of rctx + * \param[in] aff_pc array of 'Affected Point Code' in network byte order. + * \param[in] num_aff_pc number of aff_pc + * \param[in] info_string optional information string (can be NULL). + */ +void m3ua_tx_snm_daud(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_string) +{ + struct xua_msg *xua = m3ua_encode_daud(rctx, num_rctx, aff_pc, num_aff_pc, info_string); + m3ua_tx_xua_asp(asp, xua); +} + /*! Transmit SSNM DUPU message indicating user unavailability. * \param[in] asp ASP through which to transmit message. Must be ACTIVE. * \param[in] rctx array of Routing Contexts in network byte order. diff --git a/src/sua.c b/src/sua.c index 7d14f3b..448bdee 100644 --- a/src/sua.c +++ b/src/sua.c @@ -825,7 +825,6 @@ return xua; } -#if 0 /* not used so far */ /* 3.4.3 Destination Available (DAUD) */ static struct xua_msg *sua_encode_daud(const uint32_t *rctx, unsigned int num_rctx, const uint32_t *aff_pc, unsigned int num_aff_pc, @@ -837,7 +836,6 @@ xua->hdr.msg_type = SUA_SNM_DAUD; return xua; } -#endif /* 3.4.5 Destination User Part Unavailable (DUPU) */ static struct xua_msg *sua_encode_dupu(const uint32_t *rctx, unsigned int num_rctx, @@ -914,6 +912,23 @@ xua_msg_add_data(xua, SUA_IEI_INFO_STRING, strlen(info_string)+1, (const uint8_t *) info_string); } +/*! Transmit SSNM DAUD message requesting [un]availability status of certain point code[s] + * \param[in] asp ASP through which to transmit message. Must be ACTIVE. + * \param[in] rctx array of Routing Contexts in network byte order. + * \param[in] num_rctx number of rctx + * \param[in] aff_pc array of 'Affected Point Code' in network byte order. + * \param[in] num_aff_pc number of aff_pc + * \param[in] aff_ssn affected SSN (optional) + * \param[in] smi subsystem multiplicity indicator (optional) + * \param[in] info_string optional information string (can be NULL). + */ +void sua_tx_snm_daud(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, + const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *aff_ssn, + const uint32_t *smi, const char *info_string) +{ + struct xua_msg *xua = sua_encode_daud(rctx, num_rctx, aff_pc, num_aff_pc, aff_ssn, smi, info_string); + sua_tx_xua_asp(asp, xua); +} /*! Transmit SSNM DUPU message indicating user unavailability. * \param[in] asp ASP through which to transmit message. Must be ACTIVE. diff --git a/src/xua_internal.h b/src/xua_internal.h index b0bc98c..0061449 100644 --- a/src/xua_internal.h +++ b/src/xua_internal.h @@ -28,6 +28,9 @@ void sua_tx_snm_congestion(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *ssn, const uint8_t cong_level, const char *info_string); +void sua_tx_snm_daud(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, + const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *aff_ssn, + const uint32_t *smi, const char *info_string); void sua_tx_dupu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, uint32_t dpc, uint16_t user, uint16_t cause, const char *info_str); @@ -42,6 +45,8 @@ const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *concerned_dpc, const uint8_t *cong_level, const char *info_string); +void m3ua_tx_snm_daud(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_string); void m3ua_tx_dupu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, uint32_t dpc, uint16_t user, uint16_t cause, const char *info_str); @@ -95,6 +100,9 @@ void xua_snm_pc_available(struct osmo_ss7_as *as, const uint32_t *aff_pc, unsigned int num_aff_pc, const char *info_str, bool available); +void xua_tx_snm_daud(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); + enum ss7_asp_lm_timer { /* 0 kept unused on purpose since it's handled specially by osmo_fsm */ SS7_ASP_LM_T_WAIT_ASP_UP = 1, diff --git a/src/xua_snm.c b/src/xua_snm.c index e613573..eda03c9 100644 --- a/src/xua_snm.c +++ b/src/xua_snm.c @@ -83,6 +83,21 @@ } } +void xua_tx_snm_daud(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) +{ + switch (asp->cfg.proto) { + case OSMO_SS7_ASP_PROT_M3UA: + m3ua_tx_snm_daud(asp, rctx, num_rctx, aff_pc, num_aff_pc, info_str); + break; + case OSMO_SS7_ASP_PROT_SUA: + sua_tx_snm_daud(asp, rctx, num_rctx, aff_pc, num_aff_pc, NULL, NULL, info_str); + break; + default: + break; + } +} + static void xua_tx_upu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, uint32_t dpc, uint16_t user, uint16_t cause, const char *info_str) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40684?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: Iab6126f1a9eac1a66bb8ec362b87e20a5eb795ff Gerrit-Change-Number: 40684 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>
1 0
0 0
[M] Change in libosmo-sigtran[master]: asp: Support Tx DAUD when ASP becomes activated
by pespin 16 Jul '25

16 Jul '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40501?usp=email ) ( 6 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: asp: Support Tx DAUD when ASP becomes activated ...................................................................... asp: Support Tx DAUD when ASP becomes activated Otherwise the local Signalling Point has no way to know whether the remote Signalling Points it wants to talk to are actually already connected to the STP when it becomes active after the process starts up, unless it attempts to transmit a message to it. This pocedure is documented both for M3UA and SUA: * RFC4666 4.6, RFC3868 4.6 * RFC4666 4.5.3, RFC3868 4.5.3 "ASP Auditing" * RFC4666 5.5.1.1.3 "Support for ASP Querying of SS7 Destination States" The M3UA specs (RFC4666 5.5.1.1.3) explicitly state that the point codes to audit are not to be provided by uppers layers, so picking the ones from the locally configured address book for now: """ Note: there is no primitive for the MTP3-User to request this audit from the M3UA layer, as this is initiated by an internal M3UA management function. """ This is not enabled by default since it's optional according to specs, and some SGs may actually return errors (it's possible according to RFC4666 to deny access to auditing by the SG). Related: OS#5917 Related: SYS#7501 Change-Id: I7c8c5099d4d00ea6f4a8db59ed6b833fb0ffa43d --- M src/ss7_asp.h M src/ss7_asp_vty.c M src/xua_asp_fsm.c M tests/vty/osmo_stp_test.vty 4 files changed, 120 insertions(+), 17 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/ss7_asp.h b/src/ss7_asp.h index 6bc0201..ec74e82 100644 --- a/src/ss7_asp.h +++ b/src/ss7_asp.h @@ -113,6 +113,9 @@ uint8_t qos_class; uint32_t quirks; + /* Whether to Tx xUA DAUD during ASP activation when in ASP role. */ + bool daud_act; + /* T_defs used by the default_lm: */ struct osmo_tdef *T_defs_xua; diff --git a/src/ss7_asp_vty.c b/src/ss7_asp_vty.c index 0c79b0f..c69b66b 100644 --- a/src/ss7_asp_vty.c +++ b/src/ss7_asp_vty.c @@ -548,6 +548,36 @@ return CMD_SUCCESS; } +/* TODO: "destination-audit periodic <time_inteval(s)>" See M3UA RFC4666 4.5.3 "Periodic". */ +DEFUN_ATTR(asp_destination_audit_asp_active, asp_destination_audit_asp_active_cmd, + "destination-audit asp-active", + "Configure ASP Auditing (xUA DAUD)\n" + "Transmit DAUD after ASP successful activate (for remote PCs in sccp address-book)\n", + CMD_ATTR_NODE_EXIT) +{ + struct osmo_ss7_asp *asp = vty->index; + + if (asp->cfg.role != OSMO_SS7_ASP_ROLE_ASP) { + vty_out(vty, "%% 'destination-audit' only possible in role ASP!%s", VTY_NEWLINE); + return CMD_WARNING; + } + + asp->cfg.daud_act = true; + return CMD_SUCCESS; +} + +DEFUN_ATTR(asp_no_destination_audit_asp_active, asp_no_destination_audit_asp_active_cmd, + "no destination-audit asp-active", + NO_STR "Configure ASP Auditing (xUA DAUD)\n" + "Transmit xUA DAUD after ASP successful activate (for remote PCs in sccp address-book)\n", + CMD_ATTR_NODE_EXIT) +{ + struct osmo_ss7_asp *asp = vty->index; + + asp->cfg.daud_act = false; + return CMD_SUCCESS; +} + DEFUN_ATTR(asp_block, asp_block_cmd, "block", "Allows a SCTP Association with ASP, but doesn't let it become active\n", @@ -1259,6 +1289,9 @@ if (asp->cfg.tcp.user_timeout_present) vty_out(vty, " tcp-param user-timeout %u%s", asp->cfg.tcp.user_timeout_value, VTY_NEWLINE); + if (asp->cfg.daud_act) + vty_out(vty, " destination-audit asp-active%s", VTY_NEWLINE); + for (i = 0; i < sizeof(uint32_t) * 8; i++) { if (!(asp->cfg.quirks & ((uint32_t) 1 << i))) continue; @@ -1350,6 +1383,8 @@ install_lib_element(L_CS7_ASP_NODE, &asp_no_tcp_param_keepalive_cfg_cmd); install_lib_element(L_CS7_ASP_NODE, &asp_tcp_param_user_timeout_cmd); install_lib_element(L_CS7_ASP_NODE, &asp_no_tcp_param_user_timeout_cmd); + install_lib_element(L_CS7_ASP_NODE, &asp_destination_audit_asp_active_cmd); + install_lib_element(L_CS7_ASP_NODE, &asp_no_destination_audit_asp_active_cmd); install_lib_element(L_CS7_ASP_NODE, &asp_quirk_cmd); install_lib_element(L_CS7_ASP_NODE, &asp_no_quirk_cmd); gen_asp_timer_xua_cmd_strs(&asp_timer_xua_cmd); diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index b7c6947..8000839 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -31,6 +31,7 @@ #include "ss7_asp.h" #include "ss7_internal.h" #include "ss7_xua_srv.h" +#include "sccp_internal.h" #include "xua_asp_fsm.h" #include "xua_as_fsm.h" #include "xua_internal.h" @@ -146,6 +147,54 @@ xua_asp_send_xlm_prim_simple(asp, prim_type, op); } +static void xua_asp_tx_snm_daud_address_book(struct osmo_ss7_asp *asp) +{ + struct osmo_ss7_instance *inst = asp->inst; + uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT]; + unsigned int num_rctx; + uint32_t *aff_pc = NULL; + unsigned int num_aff_pc = 0; + struct osmo_sccp_addr_entry *entry; + + num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), NULL); + + /* First count required size of num_aff_pc array: */ + llist_for_each_entry(entry, &inst->cfg.sccp_address_book, list) { + if (!(entry->addr.presence & OSMO_SCCP_ADDR_T_PC)) + continue; + if (osmo_ss7_pc_is_local(inst, entry->addr.pc)) + continue; + num_aff_pc++; + } + if (num_aff_pc == 0) { + LOGPASP(asp, DLSS7, LOGL_NOTICE, "Skip Tx DAUD: No SCCP in address book\n"); + return; + } + aff_pc = talloc_array(asp, uint32_t, num_aff_pc); + OSMO_ASSERT(aff_pc); + + num_aff_pc = 0; + llist_for_each_entry(entry, &inst->cfg.sccp_address_book, list) { + uint32_t curr_aff_pc; + unsigned int i; + if (!(entry->addr.presence & OSMO_SCCP_ADDR_T_PC)) + continue; + if (osmo_ss7_pc_is_local(inst, entry->addr.pc)) + continue; + LOGPASP(asp, DLSS7, LOGL_DEBUG, "Tx DAUD: Requesting status of DPC=%u=%s\n", + entry->addr.pc, osmo_ss7_pointcode_print2(inst, entry->addr.pc)); + curr_aff_pc = htonl(entry->addr.pc); /* mask = 0 */ + for (i = 0; i < num_aff_pc; i++) + if (aff_pc[i] == curr_aff_pc) + break; + if (i == num_aff_pc) /* not found in array */ + aff_pc[num_aff_pc++] = curr_aff_pc; + } + + xua_tx_snm_daud(asp, rctx, num_rctx, aff_pc, num_aff_pc, "Isolation-ASP-ACTIVE"); + 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. @@ -699,6 +748,18 @@ struct xua_asp_fsm_priv *xafp = fi->priv; struct osmo_ss7_asp *asp = xafp->asp; + if (asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP && asp->cfg.daud_act) { + /* RFC4666 4.6, RFC3868 4.6: "The ASP MAY choose to audit the availability + * of unavailable destinations by sending DAUD messages. + * This would be the case when, for example, an AS becomes active at an ASP + * and does not have current destination statuses." + * See also RFC4666 4.5.3, RFC3868 4.5.3 "ASP Auditing". + * See also RFC4666 5.5.1.1.3 "Support for ASP Querying of SS7 Destination States" + */ + LOGPFSML(fi, LOGL_INFO, "Tx DAUD\n"); + xua_asp_tx_snm_daud_address_book(asp); + } + dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND, asp); } diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty index a253c5a..0d6ffff 100644 --- a/tests/vty/osmo_stp_test.vty +++ b/tests/vty/osmo_stp_test.vty @@ -289,6 +289,8 @@ no tcp-param keepalive (time|intvl|probes) tcp-param user-timeout <0-65535> no tcp-param user-timeout + destination-audit asp-active + no destination-audit asp-active quirk (no_notify|daud_in_asp|snm_inactive) no quirk (no_notify|daud_in_asp|snm_inactive) timer xua (ack|beat) <1-999999> @@ -300,27 +302,29 @@ OsmoSTP(config-cs7-asp)# ? ... - description Save human-readable description of the object - remote-ip Specify Remote IP Address of ASP - no Negate a command or set its defaults - local-ip Specify Local IP Address from which to contact ASP - qos-class Specify QoS Class of ASP - role Specify the xUA role for this ASP - transport-role Specify the transport layer role for this ASP - sctp-param Configure SCTP parameters - tcp-param Configure TCP parameters - quirk Enable quirk to work around interop issues - timer Configure ASP default timer values - block Allows a SCTP Association with ASP, but doesn't let it become active - shutdown Terminates SCTP association; New associations will be rejected + description Save human-readable description of the object + remote-ip Specify Remote IP Address of ASP + no Negate a command or set its defaults + local-ip Specify Local IP Address from which to contact ASP + qos-class Specify QoS Class of ASP + role Specify the xUA role for this ASP + transport-role Specify the transport layer role for this ASP + sctp-param Configure SCTP parameters + tcp-param Configure TCP parameters + destination-audit Configure ASP Auditing (xUA DAUD) + quirk Enable quirk to work around interop issues + timer Configure ASP default timer values + block Allows a SCTP Association with ASP, but doesn't let it become active + shutdown Terminates SCTP association; New associations will be rejected ... OsmoSTP(config-cs7-asp)# no ? ... - sctp-param Configure SCTP parameters - tcp-param Configure TCP parameters - quirk Disable quirk to work around interop issues - shutdown Terminates SCTP association; New associations will be rejected + sctp-param Configure SCTP parameters + tcp-param Configure TCP parameters + destination-audit Configure ASP Auditing (xUA DAUD) + quirk Disable quirk to work around interop issues + shutdown Terminates SCTP association; New associations will be rejected ... OsmoSTP(config-cs7-asp)# remote-ip 127.0.0.200 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40501?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: I7c8c5099d4d00ea6f4a8db59ed6b833fb0ffa43d Gerrit-Change-Number: 40501 Gerrit-PatchSet: 7 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-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.