From 8cfd26ed1e7a8d6d151c8f43d85b5d2d39451dcd Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 4 Apr 2018 17:11:55 +0200 Subject: [PATCH] temporary fix for issue where a RLC SDU boundary is not detected properly during reassembly --- lib/src/upper/rlc_am.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/upper/rlc_am.cc b/lib/src/upper/rlc_am.cc index ea50fb7f6..3295f37d2 100644 --- a/lib/src/upper/rlc_am.cc +++ b/lib/src/upper/rlc_am.cc @@ -668,6 +668,13 @@ int rlc_am::build_segment(uint8_t *payload, uint32_t nof_bytes, rlc_amd_retx_t r lower += old_header.li[i]; } + // Make sure LI is not deleted in case the SDU boundary is crossed + // FIXME: fix if N_li > 1 + if (new_header.N_li == 1 && retx.so_start + new_header.li[0] < retx.so_end && retx.so_end <= retx.so_start + pdu_space) { + // This segment crosses a SDU boundary + new_header.N_li++; + } + // Update retx_queue if(tx_window[retx.sn].buf->N_bytes == retx.so_end) { retx_queue.pop_front();