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

dexter gerrit-no-reply at lists.osmocom.org
Tue Aug 11 17:02:41 UTC 2020


dexter has uploaded this change for review. ( 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, 17 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/65/19565/1

diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index e54a937..869b491 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,22 @@
 			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: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200811/3028e546/attachment.htm>


More information about the gerrit-log mailing list