pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42565?usp=email )
Change subject: xua_lm: Fix ending up from active to idle forever ......................................................................
xua_lm: Fix ending up from active to idle forever
Previous transition to S_IDLE was wrong, since there's no way to recover from that state unless the SCTP connection is closed. Instead, try harder waiting for some new notifications to try re-activating the ASP and see if the AS becomes active, or end up timing out and reconnecting to re-attempt complete set of steps.
Change-Id: I5c97c0ede9c27c63f9259b43b7267a3d5d71681d --- M src/xua_default_lm_fsm.c 1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/65/42565/1
diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index a7e8d9c..6f25e17 100644 --- a/src/xua_default_lm_fsm.c +++ b/src/xua_default_lm_fsm.c @@ -310,11 +310,15 @@ break; case LM_E_NOTIFY_IND: oxp = data; + ENSURE_ASP_OR_IPSP(fi, event); 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_ACT) - lm_fsm_state_chg(fi, S_IDLE); + oxp->u.notify.status_info != M3UA_NOTIFY_I_AS_ACT) { + /* There not much we can do here, Go back to S_WAIT_NOTIFY to either wait for + * some notification to re-attempt, or end up timing out and reconnecting.*/ + lm_fsm_state_chg(fi, S_WAIT_NOTIFY); + } break; } } @@ -404,7 +408,8 @@ .in_event_mask = S(LM_E_ASP_ACT_IND) | S(LM_E_AS_INACTIVE_IND) | S(LM_E_NOTIFY_IND), - .out_state_mask = S(S_IDLE), + .out_state_mask = S(S_IDLE) | + S(S_WAIT_NOTIFY), .name = "ACTIVE", .action = lm_active, },