Change in osmo-bsc[master]: gsm_04_08_rr: block EMERGENCY SETUP when EMERGENCY CALLS are denied

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

laforge gerrit-no-reply at lists.osmocom.org
Wed Aug 12 18:24:12 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19565 )

Change subject: gsm_04_08_rr: block EMERGENCY SETUP when EMERGENCY CALLS are denied
......................................................................

gsm_04_08_rr: block EMERGENCY SETUP when EMERGENCY CALLS are denied

If the BSC configuration is set up to deny emergency calls, make sure
that an EMERGENCY SETUP will not be passed to the MSC, instead ensure
that the call is released.

Change-Id: Ia6eb38370ce4165d221d2ffbe1cd105c0628313c
Related: OS#4548
---
M src/osmo-bsc/gsm_04_08_rr.c
1 file changed, 19 insertions(+), 0 deletions(-)

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



diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index e54a937..8bf4b2a 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -43,6 +43,7 @@
 #include <osmocom/bsc/handover_fsm.h>
 #include <osmocom/bsc/gsm_08_08.h>
 #include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/bsc_msc_data.h>
 #include <osmocom/bsc/system_information.h>
 #include <osmocom/bsc/bts.h>
 
@@ -988,6 +989,24 @@
 			break;
 		}
 		break;
+	case GSM48_PDISC_CC:
+		/* Make sure that EMERGENCY CALLS can not be made if the
+		 * VTY configuration does not permit. */
+		if (msg_type == GSM48_MT_CC_EMERG_SETUP) {
+			if (msg->lchan->ts->trx->bts->si_common.rach_control.t2 & 0x4) {
+				LOG_LCHAN(msg->lchan, LOGL_NOTICE, "MS attempts EMERGENCY SETUP although EMERGENCY CALLS"
+                                          " are not allowed in sysinfo (spec violation by MS!)\n");
+				lchan_release(msg->lchan, true, true, GSM48_RR_CAUSE_PREMPTIVE_REL);
+				break;
+			}
+			if (!conn->sccp.msc->allow_emerg) {
+				LOG_LCHAN(msg->lchan, LOGL_NOTICE, "MS attempts EMERGENCY SETUP, but EMERGENCY CALLS are"
+                                          " denied on this BSC (check BTS config!)\n");
+				lchan_release(msg->lchan, true, true, GSM48_RR_CAUSE_PREMPTIVE_REL);
+				break;
+			}
+		}
+		/* fall through */
 	default:
 		bsc_dtap(conn, link_id, msg);
 		break;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia6eb38370ce4165d221d2ffbe1cd105c0628313c
Gerrit-Change-Number: 19565
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200812/397e5f12/attachment.htm>


More information about the gerrit-log mailing list