diff --git a/lib/src/rlc/rlc_am_nr.cc b/lib/src/rlc/rlc_am_nr.cc index b8eb57479..4d14c7a30 100644 --- a/lib/src/rlc/rlc_am_nr.cc +++ b/lib/src/rlc/rlc_am_nr.cc @@ -838,10 +838,14 @@ void rlc_am_nr_tx::handle_control_pdu(uint8_t* payload, uint32_t nof_bytes) nack.nack_sn = range_sn; if (range_sn == status.nacks[nack_idx].nack_sn) { // First SN + nack.has_so = true; nack.so_start = status.nacks[nack_idx].so_start; + nack.so_end = so_end_of_sdu; } else if (range_sn == (status.nacks[nack_idx].nack_sn + status.nacks[nack_idx].nack_range - 1)) { // Last SN - nack.so_end = status.nacks[nack_idx].so_end; + nack.has_so = true; + nack.so_start = 0; + nack.so_end = status.nacks[nack_idx].so_end; } handle_nack(nack, retx_sn_set); } diff --git a/lib/test/rlc/rlc_am_nr_test.cc b/lib/test/rlc/rlc_am_nr_test.cc index 9eccf3350..dbb8edac7 100644 --- a/lib/test/rlc/rlc_am_nr_test.cc +++ b/lib/test/rlc/rlc_am_nr_test.cc @@ -2544,8 +2544,9 @@ int rx_nack_range_test(rlc_am_nr_sn_size_t sn_size) nack.nack_sn = 1; nack.has_nack_range = true; nack.nack_range = 3; + nack.has_so = true; nack.so_start = 2; - nack.so_end = 1; + nack.so_end = 0; status.push_nack(nack); byte_buffer_t status_pdu; rlc_am_nr_write_status_pdu(status, sn_size, &status_pdu);