aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-06-23 14:37:59 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-06-29 14:42:27 +0200
commit061fbca2a9e6e374ff25a22799e500298d841934 (patch)
treefad346aae419a50bb6e90bc36277b8751f90b459
parent28ccf7a284b0cf12f9abd8282efb01cd706bd4a6 (diff)
tbf_ul: Avoid processing rx UL blocks for UL TBFs in RELEASING state
-rw-r--r--src/tbf_ul.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 9a139ba1..5ae0d495 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -258,6 +258,19 @@ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
"V(R)=%d)\n", rlc->tfi, this->m_window.v_q(),
this->m_window.v_r());
+ if (tbf_state(this) == TBF_ST_RELEASING) {
+ /* This may happen if MAX_N3101 is hit previously, moving the UL
+ * TBF to RELEASING state. Since we have an fn-advance where DL
+ * blocks are scheduled in advance, we may have requested USF for
+ * this UL TBF before triggering and hence we are now receiving a
+ * UL block from it. If this is the case, simply ignore the block.
+ */
+ LOGPTBFUL(this, LOGL_INFO,
+ "UL DATA TFI=%d received (V(Q)=%d .. V(R)=%d) while in RELEASING state, discarding\n",
+ rlc->tfi, this->m_window.v_q(), this->m_window.v_r());
+ return 0;
+ }
+
/* process RSSI */
gprs_rlcmac_rssi(this, rssi);