diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-04-27 17:26:34 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2021-04-27 17:34:23 +0200 |
commit | 18abd1a808f60e2825d022a683e8b4fbc266c8c6 (patch) | |
tree | e47540213d421f953200c7d4325d67853e82decd /src/osmo-bsc/lb.c | |
parent | 5979f2bcceb8f9352c79ce67170fa19ff7a0b312 (diff) |
Lb: stop RESET FSM when sccp_user is unbound
A crash was reported in bssmap_le_tx_reset() sending a RESET with
sccp_user == NULL. Looking at the issue I noticed that when the
sccp_user is torn down, the RESET FSM should also be terminated.
Add bssmap_reset_term_and_free() to the generic RESET FSM implementation
and call from lb_stop() before sccp_user is set to NULL.
Related: OS#5134
Change-Id: If412ef990fcdde8ff88098a5169e86f05cd1c7f0
Diffstat (limited to 'src/osmo-bsc/lb.c')
-rw-r--r-- | src/osmo-bsc/lb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osmo-bsc/lb.c b/src/osmo-bsc/lb.c index be7d4461a..0ff7c5c82 100644 --- a/src/osmo-bsc/lb.c +++ b/src/osmo-bsc/lb.c @@ -399,6 +399,12 @@ static void lb_start_reset_fsm() bsc_gsmnet->smlc->bssmap_reset = bssmap_reset_alloc(bsc_gsmnet, "Lb", &cfg); } +static void lb_stop_reset_fsm() +{ + bssmap_reset_term_and_free(bsc_gsmnet->smlc->bssmap_reset); + bsc_gsmnet->smlc->bssmap_reset = NULL; +} + static int lb_start() { uint32_t default_pc; @@ -482,6 +488,7 @@ static int lb_stop() LOGP(DLCS, LOGL_INFO, "Shutting down Lb link\n"); lb_cancel_all(); + lb_stop_reset_fsm(); osmo_sccp_user_unbind(bsc_gsmnet->smlc->sccp_user); bsc_gsmnet->smlc->sccp_user = NULL; return 0; |