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