aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_dl.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-02-26 14:59:52 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-02-26 16:22:34 +0100
commit297edf754f74066d3885d429a67c2f989ced9bf0 (patch)
tree104e96ec437840af9f7f61c3898f9d86b30f88e5 /src/tbf_dl.cpp
parent08fe76a89334ddc4ee906bd30a00d908745b2b7b (diff)
tbf: Don't use 'old' DL TBFs after reuse_tbf
Currently two DL TBF objects with the same TLLI exist after reuse_tbf which make the result of tbf_by_tlli undefined. This leads to several DL TBFs belonging to the same TLLI. This commit extends tbf_by_tlli to check the m_tlli_valid flag for DL, too. That flag is set to 0 in reuse_tbf to mark the 'old' DL TBF as invalid after its LLC data has been copied to the new one. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf_dl.cpp')
-rw-r--r--src/tbf_dl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 8de3b2b6..89ca9c2a 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -689,6 +689,9 @@ void gprs_rlcmac_dl_tbf::reuse_tbf(const uint8_t *data, const uint16_t len)
m_wait_confirm = 0;
m_window.reset();
+ /* mark TLLI as invalid */
+ m_tlli_valid = 0;
+
/* keep to flags */
state_flags &= GPRS_RLCMAC_FLAG_TO_MASK;
state_flags &= ~(1 << GPRS_RLCMAC_FLAG_CCCH);