aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-01-04 17:42:05 +0100
committerHarald Welte <laforge@gnumonks.org>2019-01-12 09:51:22 +0000
commit7ce21dc589d94f841b380540e7089956432e5b6c (patch)
treebb22edd91179fd46cbe401c7c42217a680627104 /src
parent46c06e28c18241b586ecb5847daa6a5ab6b49b84 (diff)
rx CM Service Req: reject double use sooner
When a CM Service Req is being rejected, we should do so before changing the state of the current conn. Concerning multiple CM Service Requests: in fact we should store multiple requests, but first fix the status quo of rejecting multiple requests. Change-Id: I39209ee6662694aa054a2fc0d21eae76fb33e2f1
Diffstat (limited to 'src')
-rw-r--r--src/libmsc/gsm_04_08.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 60da27508..646e9a017 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -726,6 +726,14 @@ int gsm48_rx_mm_serv_req(struct ran_conn *conn, struct msgb *msg)
GSM48_REJECT_INCORRECT_MESSAGE);
}
+ if (ran_conn_is_establishing_auth_ciph(conn)) {
+ LOG_RAN_CONN(conn, LOGL_ERROR,
+ "Cannot accept CM Service Request, conn already busy establishing authenticity\n");
+ msc_vlr_tx_cm_serv_rej(conn, GSM48_REJECT_CONGESTION);
+ return -EINVAL;
+ /* or should we accept and note down the service request anyway? */
+ }
+
gsm48_mi_to_string(mi_string, sizeof(mi_string), mi, mi_len);
mi_type = mi[0] & GSM_MI_TYPE_MASK;
@@ -764,13 +772,6 @@ int gsm48_rx_mm_serv_req(struct ran_conn *conn, struct msgb *msg)
if (ran_conn_is_accepted(conn))
return cm_serv_reuse_conn(conn, mi_p);
- if (ran_conn_is_establishing_auth_ciph(conn)) {
- LOGP(DMM, LOGL_ERROR,
- "Cannot accept CM Service Request, conn already busy establishing authenticity\n");
- msc_vlr_tx_cm_serv_rej(conn, GSM48_REJECT_CONGESTION);
- return -EINVAL;
- /* or should we accept and note down the service request anyway? */
- }
ran_conn_update_id(conn, COMPLETE_LAYER3_CM_SERVICE_REQ, mi_string);