aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-04 15:59:20 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-04 16:06:59 +0200
commit9015d4db52d9de0fea39eede34a3972551a96edf (patch)
treea07a1e836172b553054555015426297e62946e42
parent3cda07754184867c49b7116f6dc000d03c0e33ea (diff)
msc: ignore cb retval on auth/sec mode rx
Just return 0 regardless of the security callback's return value when receiving authentication response or security mode complete messages.
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c8
-rw-r--r--openbsc/src/osmo-cscn/iucs_ranap.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 1c1a7efc9..61356eadf 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1176,10 +1176,10 @@ static int gsm48_rx_mm_auth_resp(struct gsm_subscriber_connection *conn, struct
}
/* Only authentication requested, and we're done. */
- if (!cb)
- return 0;
- return cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_SUCCEEDED,
- NULL, conn, conn->sec_operation->cb_data);
+ if (cb)
+ cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_SUCCEEDED, NULL,
+ conn, conn->sec_operation->cb_data);
+ return 0;
}
/* Receive a GSM 04.08 Mobility Management (MM) message */
diff --git a/openbsc/src/osmo-cscn/iucs_ranap.c b/openbsc/src/osmo-cscn/iucs_ranap.c
index f34a2003e..8c949bb31 100644
--- a/openbsc/src/osmo-cscn/iucs_ranap.c
+++ b/openbsc/src/osmo-cscn/iucs_ranap.c
@@ -68,10 +68,10 @@ int iucs_rx_sec_mode_compl(struct gsm_subscriber_connection *conn,
conn->iu.integrity_protection = INTEGRITY_PROTECTION_IK;
cb = conn->sec_operation->cb;
- if (!cb)
- return 0;
- return cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_SUCCEEDED,
- NULL, conn, conn->sec_operation->cb_data);
+ if (cb)
+ cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_SUCCEEDED, NULL,
+ conn, conn->sec_operation->cb_data);
+ return 0;
}
int iucs_rx_ranap_event(struct gsm_network *network,