From 8318d9c25d53d24d7b2aa7f11f7658671ccf7b3a Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 11 Oct 2021 18:17:35 +0200 Subject: [PATCH] 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 --- src/pdch.cpp | 6 ++++-- 1 file 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);