aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-11-10 16:11:17 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-11-10 16:11:19 +0100
commitace3b1bdc1d5fcd9edd3c8556249467afb971029 (patch)
treebcf96da24c0c9a4b6c643837c2932e383054231c
parent54a126f6d4c8d113077d7ac0ad47449a04878902 (diff)
pdch: Drop previous UL TBF from MS who sent PktResReq through SBA
If the MS has a pending UL TBF but we just received a PktResReq on an allocated SBA from it (same TLLI, hence same MS), then it means it allocated the SBA through RACH req and hence it was on CCCH. That means it was not active on any PDCH, hence for sure the previous UL TBF can be dropped. Related: OS#5293 Change-Id: I1f20dba56f46ea15cbb9b03bdc5b79d923491a3c
-rw-r--r--src/pdch.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pdch.cpp b/src/pdch.cpp
index 4d82ab16..c48b078e 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -680,6 +680,16 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
"MS requests UL TBF throguh SBA\n", fn);
ms_set_ta(ms, sba->ta);
sba_free(sba);
+ /* If MS identified by TLLI sent us a PktResReq through SBA, it means it came
+ * from CCCH, so it's for sure not using previous UL
+ * TBF; drop it if it still exits on our end: */
+ if ((ul_tbf = ms_ul_tbf(ms))) {
+ /* Get rid of previous finished UL TBF before providing a new one */
+ LOGPTBFUL(ul_tbf, LOGL_NOTICE,
+ "Got PACKET RESOURCE REQ while TBF not finished, killing pending UL TBF\n");
+ tbf_free(ul_tbf);
+ ul_tbf = NULL;
+ }
/* MS seized the PDCH answering on the SBA: */
bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_UL_TBF_CONTENTION_RESOLUTION_SUCCESS);
break;