From 2d0c00bd3d8f52690aeb86001cb4a268fed59463 Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Thu, 14 Nov 2013 15:28:23 -0500 Subject: Transceiver52M: Check time slot validity of incoming bursts In errant cases, GSM core may send bursts with invalid slot values, which is allowed by the GSM::Time object. If we find a burst like this coming into the transceiver, then drop it immediately. Signed-off-by: Thomas Tsou --- Transceiver52M/Transceiver.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index eae4e06..33d22ad 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -176,6 +176,11 @@ void Transceiver::addRadioVector(size_t chan, BitVector &bits, return; } + if (wTime.TN() > 7) { + LOG(ALERT) << "Received burst with invalid slot " << wTime.TN(); + return; + } + burst = modulateBurst(bits, 8 + (wTime.TN() % 4 == 0), mSPSTx); scaleVector(*burst, txFullScale * pow(10, -RSSI / 10)); -- cgit v1.2.3