Change in ...osmo-msc[master]: catch GSUP auth result without auth_fsm

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Thu Sep 26 23:05:51 UTC 2019


neels has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-msc/+/15544 )

Change subject: catch GSUP auth result without auth_fsm
......................................................................

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
---
M src/libvlr/vlr.c
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  neels: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index a227240..80710b2 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -757,6 +757,12 @@
 	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);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15544
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I1995d8f68cfde1140968fb9a97bd054de950de2e
Gerrit-Change-Number: 15544
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190926/c0082908/attachment.htm>


More information about the gerrit-log mailing list