aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/abis_rsl.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-02-06 18:53:34 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2018-02-06 19:39:57 +0100
commitaa4adb8fbf9bd66ec6d628250ffe1a4106a9724d (patch)
treec89bda4d2a9174c4c9d3e17b4d89e1b676b2dab6 /src/libbsc/abis_rsl.c
parentcc48efe40062d5730af5f820fc33ee0a3dcf6f1a (diff)
abis_rsl: do not allow SACCH in MF mode on SAPI=0
osmo-msc does currently not check if an MS attemts to establish an SACCH link on SAPI=0. This combination is not permitted and should be dropped. - Make sure that establish indication for SAPI=0 and channel-type=SACCH is not permitted See also TTCN3 Testcase: BSC_Tests.TC_rll_est_ind_inval_sacch Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Closes: OS#2750
Diffstat (limited to 'src/libbsc/abis_rsl.c')
-rw-r--r--src/libbsc/abis_rsl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index 189316631..261e6fe27 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -2194,6 +2194,21 @@ static int abis_rsl_rx_rll(struct msgb *msg)
break;
}
+ /* Note: Check for MF SACCH on SAPI=0 (not permitted). By
+ * definition we establish a link in multiframe (MF) mode.
+ * (see also 3GPP TS 48.058, chapter 3.1. However, on SAPI=0
+ * SACCH is only allowed in UL mode, not in MF mode.
+ * (see also 3GPP TS 44.005, figure 5) So we have to drop such
+ * Establish Indications */
+ if (sapi == 0 && (rllh->link_id >> 6 & 0x03) == 1) {
+ LOGP(DRLL, LOGL_NOTICE, "MS attempted to establish an SACCH in MF mode on SAPI=0 (not permitted)\n");
+
+ /* Note: We do not need to close the channel,
+ * since we might still get a proper Establish Ind.
+ * If not, T3101 will close the channel on timeout. */
+ break;
+ }
+
msg->lchan->sapis[rllh->link_id & 0x7] = LCHAN_SAPI_MS;
osmo_timer_del(&msg->lchan->T3101);
if (msgb_l2len(msg) >