diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-09-09 15:42:31 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-09-09 15:40:58 +0000 |
commit | dcde6145bf4766b9e4e0884060f3ccc04142426a (patch) | |
tree | 69648f1c32f060368e28eae5ad0277206578ad1b | |
parent | cfc052743ba937fb47817af0eb5bc387447db2f8 (diff) |
CBCH: Fix rejecting SMS-CB related RSL messages
Normally, the "Common Channel" related RSL messages should actually
contain such a common channel. However, since cell broadcast is
implemented inside what's essentially a downlink SDCCH, we should add
some explicit exceptions.
Before this patch, any RSL SMS BC CMD would have been discarded and
an RSL Error Indiciation returned.
Change-Id: I2f7f1dd43505cc27cd33489d8b0e8c981cd93880
Closes: OS#3533
-rw-r--r-- | src/common/rsl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c index ff2d9977..c6c00ea2 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2725,8 +2725,12 @@ static int rsl_rx_cchan(struct gsm_bts_trx *trx, struct msgb *msg) } msg->l3h = (unsigned char *)cch + sizeof(*cch); - if (chan_nr_is_dchan(cch->chan_nr)) - return rsl_reject_unknown_lchan(msg); + /* normally we don't permit dedicated channels here ... */ + if (chan_nr_is_dchan(cch->chan_nr)) { + /* ... however, CBCH is on a SDCCH, so we must permit it */ + if (cch->c.msg_type != RSL_MT_SMS_BC_CMD && cch->c.msg_type != RSL_MT_SMS_BC_REQ) + return rsl_reject_unknown_lchan(msg); + } msg->lchan = lchan_lookup(trx, cch->chan_nr, "RSL rx CCHAN: "); if (!msg->lchan) { |