Change in osmo-msc[master]: rx CM Service Req: reject double use sooner

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Jan 12 09:51:23 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12471 )

Change subject: rx CM Service Req: reject double use sooner
......................................................................

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
---
M src/libmsc/gsm_04_08.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
2 files changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 60da275..646e9a0 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -726,6 +726,14 @@
 						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 @@
 	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);
 
diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err
index 7443d06..b9e38fa 100644
--- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err
+++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err
@@ -316,8 +316,7 @@
   MSC <--GERAN-A-- MS: GSM48_MT_MM_CM_SERV_REQ
 DREF IMSI:901700000004620: MSC conn use + dtap == 1 (0x2: dtap)
 DRLL Dispatching 04.08 message GSM48_MT_MM_CM_SERV_REQ (0x5:0x24)
-DMM RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Rx CM SERVICE REQUEST cm_service_type=0x08 MI(IMSI)=901700000004620
-DMM Cannot accept CM Service Request, conn already busy establishing authenticity
+DBSSAP RAN_conn(LU:901700000004620){RAN_CONN_S_AUTH_CIPH}: Cannot accept CM Service Request, conn already busy establishing authenticity
 DMM -> CM SERVICE Reject cause: 22
 DMSC msc_tx 3 bytes to IMSI:901700000004620 via GERAN-A
 - DTAP --GERAN-A--> MS: GSM48_MT_MM_CM_SERV_REJ: 052216

-- 
To view, visit https://gerrit.osmocom.org/12471
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I39209ee6662694aa054a2fc0d21eae76fb33e2f1
Gerrit-Change-Number: 12471
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-CC: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190112/dd067b45/attachment.htm>


More information about the gerrit-log mailing list