driveTxPriorityQueue(): check if message header format is supported

Change-Id: I17abf95f5e23236abccc50476cd59931580f5cd3
This commit is contained in:
Vadim Yanitskiy 2019-07-15 23:56:56 +07:00 committed by Pau Espin Pedrol
parent b31232537a
commit dd571c6db1
1 changed files with 12 additions and 0 deletions

View File

@ -943,6 +943,18 @@ bool Transceiver::driveTxPriorityQueue(size_t chan)
/* Convert TDMA FN to the host endianness */
fn = osmo_load32be(&chdr->fn);
/* Make sure we support the received header format */
switch (chdr->version) {
case 0:
/* Version 1 has the same format */
case 1:
break;
default:
LOG(ERR) << "Rx TRXD message with unknown header version " << chdr->version;
return false;
}
LOG(DEBUG) << "rcvd. burst at: " << GSM::Time(fn, chdr->tn);
int RSSI = (int) buffer[5];