osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41289?usp=email )
Change subject: Don't crash on loc req with disabled SMLC ......................................................................
Don't crash on loc req with disabled SMLC
Fix that OsmoBSC crashes when receiving a location request from the MSC while the SMLC is disabled. With this patch, a system failure is reported to the MSC and the following error message is logged:
SUBSCR_CONN(msc0-conn1_subscr-IMSI-001019935148766)[0x59d28e261f60]{ACTIVE}: Lb link to SMLC is not ready (no RESET-ACK), cannot send BSSMAP-LE PERFORM LOCATION REQUEST with BSSLAP TA Layer3
Suggested-by: Harald Welte laforge@osmocom.org Related: SYS#7714 Related: osmo-ttcn3-hacks I1cd7a7658b21d3eb04443a15ffd5ddf09b466af5 Change-Id: Ie8a66f9decf9fff602f7fecfb71a78fab900066f (cherry picked from commit ea1764f9f474536d96dc8b95bc5aab1261cfefbe) --- M src/osmo-bsc/bssmap_reset.c 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/osmo-bsc/bssmap_reset.c b/src/osmo-bsc/bssmap_reset.c index 018ecba..3c28186 100644 --- a/src/osmo-bsc/bssmap_reset.c +++ b/src/osmo-bsc/bssmap_reset.c @@ -240,6 +240,9 @@
bool bssmap_reset_is_conn_ready(const struct bssmap_reset *bssmap_reset) { + /* bssmap_reset is NULL if SMLC is not enabled in the config */ + if (bssmap_reset == NULL) + return false; return bssmap_reset->fi->state == BSSMAP_RESET_ST_CONN; }