diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2020-08-12 17:34:27 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-08-12 19:02:11 +0000 |
commit | f954e354649056f01dad64c5e8a7b6bbeb2426a3 (patch) | |
tree | 3408ac0be681de553cacbdb42c195a8f20eb93a1 | |
parent | abf03a1d64a81f779d3150fa0bbbd0b15fdd6d81 (diff) |
abis_rsl.c: make sure emergency calls are rejected early
If a CHAN RQD indicates an emergency call on a BTS that does not allow
emergency calls, then respond with an IMMEDIAGE ASSIGNMENT REJECT
message to deny the emergency call early.
Related: OS#4548
Change-Id: I148c540269bffd703f38233a1e689e863c175e97
-rw-r--r-- | src/osmo-bsc/abis_rsl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 1ffdd06a5..6787511f5 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1394,11 +1394,20 @@ static int rsl_rx_chan_rqd(struct msgb *msg) /* check availability / allocate channel * - * - First try to allocate SDCCH. + * - First check for EMERGENCY call attempts, + * - then try to allocate SDCCH. * - If SDCCH is not available, try a TCH/H (less bandwidth). * - If there is still no channel available, try a TCH/F. * */ + if (chreq_reason == GSM_CHREQ_REASON_EMERG) { + if (bts->si_common.rach_control.t2 & 0x4) { + LOG_BTS(bts, DRSL, LOGL_NOTICE, "CHAN RQD: MS attempts EMERGENCY CALL although EMERGENCY CALLS " + "are not allowed in sysinfo (spec violation by MS!)\n"); + rsl_tx_imm_ass_rej(bts, rqd_ref); + return -EINVAL; + } + } lchan = lchan_select_by_type(bts, GSM_LCHAN_SDCCH); if (!lchan) { LOG_BTS(bts, DRSL, LOGL_NOTICE, "CHAN RQD: no resources for %s 0x%x, retrying with %s\n", |