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
This commit is contained in:
Harald Welte 2018-09-09 15:42:31 +02:00
parent cfc052743b
commit dcde6145bf
1 changed files with 6 additions and 2 deletions

View File

@ -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) {