lib,rlc_am_nr: check if rx ACK is smaller than current Tx_Next_Ack

This commit is contained in:
Pedro Alvarez 2022-05-03 09:21:52 +01:00
parent 0c24e9c55f
commit 7c42b09e89
1 changed files with 8 additions and 1 deletions

View File

@ -800,8 +800,15 @@ void rlc_am_nr_tx::handle_control_pdu(uint8_t* payload, uint32_t nof_bytes)
uint32_t stop_sn = status.nacks.size() == 0
? status.ack_sn
: status.nacks[0].nack_sn; // Stop processing ACKs at the first NACK, if it exists.
if (tx_mod_base_nr(stop_sn) < tx_mod_base_nr(st.tx_next_ack)) {
RlcInfo(
"Received ACK or NACK with SN=%d smaller than TX_NEXT_ACK=%d. Ignoring status report", stop_sn, st.tx_next_ack);
info_state();
return;
}
if (tx_mod_base_nr(stop_sn) > tx_mod_base_nr(st.tx_next)) {
RlcError("Received ACK or NACK with SN=%d larger than TX_NEXT=%d. Ignoring status report", stop_sn, st.tx_next);
RlcInfo("Received ACK or NACK with SN=%d larger than TX_NEXT=%d. Ignoring status report", stop_sn, st.tx_next);
info_state();
return;
}