This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15993 ) Change subject: xua: On new ASPAC, set and notify other ASPs as inactive ...................................................................... xua: On new ASPAC, set and notify other ASPs as inactive RFC4666 sec 4.3.4.3. ASP Active Procedures: """ In the case of an Override mode AS, receipt of an ASP Active message at an SGP causes the (re)direction of all traffic for the AS to the ASP that sent the ASP Active message. Any previously active ASP in the AS is now considered to be in the state ASP-INACTIVE and SHOULD no longer receive traffic from the SGP within the AS. The SGP or IPSP then MUST send a Notify message ("Alternate ASP_Active") to the previously active ASP in the AS and SHOULD stop traffic to/from that ASP. The ASP receiving this Notify MUST consider itself now in the ASP-INACTIVE state, if it is not already aware of this via inter-ASP communication with the Overriding ASP. """ Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45 --- M src/xua_as_fsm.c 1 file changed, 35 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 5d0b327..c25902e 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -211,6 +211,37 @@ return false; } +/* Tell other previously-active ASPs that a new ASP has been activated and mark + them as inactive. Used in override mode when an ASP becomes active. */ +static void notify_any_other_active_asp_as_inactive(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) +{ + unsigned int i; + struct msgb *msg; + struct osmo_xlm_prim_notify npar = { + .status_type = M3UA_NOTIFY_T_OTHER, + .status_info = M3UA_NOTIFY_I_OT_ALT_ASP_ACT, + }; + + if (asp_cmp->asp_id_present) + npar.asp_id = asp_cmp->asp_id; + + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + struct osmo_ss7_asp *asp = as->cfg.asps[i]; + if (!asp || !osmo_ss7_asp_active(asp)) + continue; + + if (asp_cmp == asp) + continue; + + msg = encode_notify(&npar); + osmo_ss7_asp_send(asp, msg); + + osmo_fsm_inst_state_chg(asp->fi, XUA_ASP_S_INACTIVE, 0, 0); + } + + return; +} + static void t_r_callback(void *_fi) { struct osmo_fsm_inst *fi = _fi; @@ -321,7 +352,10 @@ } break; case XUA_ASPAS_ASP_ACTIVE_IND: - /* ignore */ + asp = data; + /* RFC466 sec 4.3.4.3 ASP Active Procedures*/ + if (xafp->as->cfg.mode == OSMO_SS7_AS_TMOD_OVERRIDE) + notify_any_other_active_asp_as_inactive(xafp->as, asp); break; case XUA_AS_E_TRANSFER_REQ: /* message for transmission */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45 Gerrit-Change-Number: 15993 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191107/110844df/attachment.htm>