diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2021-01-26 22:16:29 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2021-01-26 22:42:06 +0100 |
commit | 80184ae1714f52cbeed8d94472975f07122e806f (patch) | |
tree | 2a93d36c64cbf3db545b1fa784e42f81e1e16ddb | |
parent | 20a90a9b86bf254dfe543ccfcdf6a0b9181b8a90 (diff) |
abis_rsl: check if emergency calling is disabled before premption
If an emergency call arrives at the BSC while all TCH are busy, one TCH
is cleared in favor of the emergency call. However, if emergency calls
are disabled (system information), it is still possible that an MS might
try an emergency call anyway or that due to interference a regular call
might look like an emergency call (channel request reason). In those
cases the preemption must not happen and the emergency call must be
rejected.
Change-Id: I1af1f4fefcbe6a886bb5396901ce0cb2368a0e19
Related: OS#4976
-rw-r--r-- | src/osmo-bsc/abis_rsl.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 321bcb421..388e2fc2a 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1546,6 +1546,17 @@ static int rsl_rx_chan_rqd(struct msgb *msg) break; } + /* Block emergency calls if we explicitly disable them via sysinfo. */ + if (rqd->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); + talloc_free(rqd); + return 0; + } + } + /* Enqueue request */ llist_add_tail(&rqd->entry, &bts->chan_rqd_queue); @@ -1702,16 +1713,6 @@ void abis_rsl_chan_rqd_queue_poll(struct gsm_bts *bts) * - If there is still no channel available, try a TCH/F. * */ - if (rqd->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); - llist_del(&rqd->entry); - talloc_free(rqd); - return; - } - } /* Emergency calls will be put on a free TCH/H or TCH/F directly in the code below, all other channel requests * will get an SDCCH first (if possible). */ |