diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2019-09-16 18:07:54 +0200 |
---|---|---|
committer | neels <nhofmeyr@sysmocom.de> | 2019-09-26 23:05:51 +0000 |
commit | 1bfe0e1cd166ada40cb7914dbfaa7ceef7d84f95 (patch) | |
tree | fa22840abc653b643152f3a7b922893ce6726e38 /src | |
parent | 002fb01faa5c19820c7dfedffc4f768f1b9145b9 (diff) |
catch GSUP auth result without auth_fsm
When a vlr_subscr receives an Send Auth Info result, properly check whether the
subscriber has an auth_fsm.
Before, a missing auth_fsm would crash osmo-msc with:
vlr.c:762 Trying to dispatch event 1 to non-existent FSM instance!
Related: OS#4191
Change-Id: I1995d8f68cfde1140968fb9a97bd054de950de2e
Diffstat (limited to 'src')
-rw-r--r-- | src/libvlr/vlr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index a22724043..80710b2e1 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -757,6 +757,12 @@ static int vlr_subscr_handle_sai_res(struct vlr_subscr *vsub, struct osmo_fsm_inst *auth_fi = vsub->auth_fsm; void *data = (void *) gsup; + if (!auth_fi) { + LOGVSUBP(LOGL_ERROR, vsub, "Received GSUP %s, but there is no auth_fsm\n", + osmo_gsup_message_type_name(gsup->message_type)); + return -1; + } + switch (gsup->message_type) { case OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: osmo_fsm_inst_dispatch(auth_fi, VLR_AUTH_E_HLR_SAI_ACK, data); |