aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp <pmaier@sysmocom.de>2016-12-09 18:35:14 +0100
committerPhilipp <pmaier@sysmocom.de>2016-12-09 18:35:14 +0100
commit220998d8b87c3e74dc97b758ef5e9f5f676a5bf5 (patch)
tree4cab3eb590e6cdc8de7c30299346a7cf08756ee2
parent10a1ec62294b681b93c3817e84709a25db41b12a (diff)
abis_rsl: add check for field tag in IMM.ass sent msg
The parsing of IMM.ass sent does not check the tag, this commit introduces a check to make at least sure that we are reading out the right field
-rw-r--r--openbsc/src/libbsc/abis_rsl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 62bb48c6c..221efd38e 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1992,9 +1992,13 @@ static int abis_rsl_rx_cchan(struct msgb *msg)
"type 0x%02x\n", rslh->c.msg_type);
break;
case 0x10: /* Ericsson specific: Immediate Assign Sent */
+ /* FIXME: Replace the messy message parsing below
+ * with proper TV parser */
LOGP(DRSL, LOGL_INFO, "IMM.ass sent\n");
if(msg->len < 8)
LOGP(DRSL, LOGL_ERROR, "short IMM.ass sent message!\n");
+ else if(msg->data[4] != 0xf1)
+ LOGP(DRSL, LOGL_ERROR, "unsupported IMM.ass message format! (please fix)\n");
else {
tlli = msg->data[8];
tlli |= msg->data[7] << 8;