aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-10-07 15:33:31 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-12-18 10:02:44 +0100
commitaafcd703f341c7dc8a56ff45ba1823470dd5ff00 (patch)
treebc8a0e929f389e41aa1c88b44ef6cac50d85a9ce
parentb83e2a7d5cae302fb33ad56fa6dbad7906165909 (diff)
Fix: Be sure to check if the PACKET DOWNLINK ACK belongs to the polled MS
-rw-r--r--src/gprs_rlcmac_data.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp
index 776c416..c52af14 100644
--- a/src/gprs_rlcmac_data.cpp
+++ b/src/gprs_rlcmac_data.cpp
@@ -365,14 +365,20 @@ int gprs_rlcmac_rcv_control_block(bitvec *rlc_block, uint8_t trx, uint8_t ts,
tbf = tbf_by_poll_fn(fn, trx, ts);
if (!tbf) {
LOGP(DRLCMAC, LOGL_NOTICE, "PACKET DOWNLINK ACK with "
- "unknown FN=%u TBF=%d (TRX %d TS %d)\n",
+ "unknown FN=%u TFI=%d (TRX %d TS %d)\n",
fn, tfi, trx, ts);
break;
}
+ if (tbf->tfi != tfi) {
+ LOGP(DRLCMAC, LOGL_NOTICE, "PACKET DOWNLINK ACK with "
+ "wrong TFI=%d, ignoring!\n", tfi);
+ break;
+ }
tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_DL_ACK);
if ((tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ACK))) {
tbf->state_flags &= ~(1 << GPRS_RLCMAC_FLAG_TO_DL_ACK);
- LOGP(DRLCMAC, LOGL_NOTICE, "Recovered downlink ack\n");
+ LOGP(DRLCMAC, LOGL_NOTICE, "Recovered downlink ack "
+ "for DL TBF=%d\n", tbf->tfi);
}
/* reset N3105 */
tbf->n3105 = 0;