Fix SCCP client crash on xUA server (STP) disconnect

When the server (STP) disappears from a live SCCP client,
then the xUA default layer manager receives LM_E_SCTP_DISC_IND,
which is traversing retart_asp().  In there, we first terminate
the current instance of the layer manager FSM, and then re-initialize
the ASP to use the default layer manager using
osmo_ss7_asp_use_default_lm().

However, osmo_ss7_asp_use_default_lm() uses the presence of an
asp->lm_priv pointer as a sign that the old layer manager is still
running and attempts to terminate it - despite being terminated
just before in restart_as().

So let's simply remove the termination from restart_asp(), and
leave it to osmo_ss7_asp_use_default_lm().

Fixes: OS#2402
Change-Id: I062d3af17539de864b56d079fe9b8d76ad99cf1e
This commit is contained in:
Harald Welte 2017-08-15 23:25:21 +02:00
parent 52d1ee9617
commit 485a1be9d8
1 changed files with 0 additions and 1 deletions

View File

@ -126,7 +126,6 @@ static void restart_asp(struct osmo_fsm_inst *fi)
int log_level = fi->log_level;
osmo_ss7_asp_restart(asp);
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
osmo_ss7_asp_use_default_lm(asp, log_level);
}