aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-19 13:02:41 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-21 00:31:07 +0200
commit1873a30a4a0a8728046bdcd22e7bc840e292a10b (patch)
treee440367c9d6d46ca016ddff9b7959e872d4725fc /src/common/rsl.c
parentbac9224b3b2834726af73383110a5d1c36906116 (diff)
RSL: Reject RLL messages for lchans that are not active yet
The Radio Link Layer (RLL) messages only make sense when a given logical channel is active. If it isn't active, let's reject the messages with an RSL ERROR REPORT with cause "Message sequence error", wich according to spec means: "A message with an existing message type which is not possible according to the specification and to the state of the BTS is erroneous." Related: OS#3750 Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 0fe50e04..b02f4e69 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2559,6 +2559,14 @@ static int rsl_rx_rll(struct gsm_bts_trx *trx, struct msgb *msg)
return rsl_reject_unknown_lchan(msg);
}
+ if (lchan->state != LCHAN_S_ACTIVE) {
+ LOGPLCHAN(lchan, DRLL, LOGL_NOTICE, "Rx RLL %s for lchan which isn't active\n",
+ rsl_msg_name(rh->c.msg_type));
+ rsl_tx_error_report(trx, RSL_ERR_MSG_SEQ, &rh->chan_nr, &rh->link_id, msg);
+ msgb_free(msg);
+ return -1;
+ }
+
DEBUGP(DRLL, "%s Rx RLL %s Abis -> LAPDm\n", gsm_lchan_name(lchan),
rsl_msg_name(rh->c.msg_type));