diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-10-11 18:17:35 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-10-11 18:22:01 +0200 |
commit | 8318d9c25d53d24d7b2aa7f11f7658671ccf7b3a (patch) | |
tree | 41bc115879055807fb96201feb6c634c53ab51fe | |
parent | 0dbf6f2a54aa4128fd9f52700d1b8e48592ca03e (diff) |
pdch: Validate poll reason matches in rcv_control_(egprs)_dl_ack_nack()
If we didn't expect this kind of UL messages according to pdch ULC, then
we shouldn't allow going forward and releasing the ULC entry: let it
time out instead so that TBF runs whatever appopiate action is needed in
this case, be it retransamission, releasing itself, etc.
Change-Id: I8ab3f5e4f2f802944269453db13a80c9ede67714
-rw-r--r-- | src/pdch.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pdch.cpp b/src/pdch.cpp index cfec71ec..807ce459 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -463,7 +463,8 @@ void gprs_rlcmac_pdch::rcv_control_dl_ack_nack(Packet_Downlink_Ack_Nack_t *ack_n tfi = ack_nack->DOWNLINK_TFI; poll = pdch_ulc_get_node(ulc, fn); - if (!poll || poll->type != PDCH_ULC_NODE_TBF_POLL) { + if (!poll || poll->type != PDCH_ULC_NODE_TBF_POLL || + poll->tbf_poll.reason != PDCH_ULC_POLL_DL_ACK) { LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "PACKET DOWNLINK ACK with " "unknown FN=%u TFI=%d (TRX %d TS %d)\n", fn, tfi, trx_no(), ts_no); @@ -532,7 +533,8 @@ void gprs_rlcmac_pdch::rcv_control_egprs_dl_ack_nack(EGPRS_PD_AckNack_t *ack_nac tfi = ack_nack->DOWNLINK_TFI; poll = pdch_ulc_get_node(ulc, fn); - if (!poll || poll->type != PDCH_ULC_NODE_TBF_POLL) { + if (!poll || poll->type != PDCH_ULC_NODE_TBF_POLL || + poll->tbf_poll.reason != PDCH_ULC_POLL_DL_ACK) { LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "EGPRS PACKET DOWNLINK ACK with " "unknown FN=%u TFI=%d (TRX %d TS %d)\n", fn, tfi, trx_no(), ts_no); |