From 1ffd8d48cefdef12e450df757b0d6b7b496be946 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 22 Nov 2018 11:42:47 +0100 Subject: [PATCH] log warning when receiving unexpected RLC AM segment --- lib/src/upper/rlc_am.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/upper/rlc_am.cc b/lib/src/upper/rlc_am.cc index bd0acbeff..71aed4c3a 100644 --- a/lib/src/upper/rlc_am.cc +++ b/lib/src/upper/rlc_am.cc @@ -1759,7 +1759,9 @@ bool rlc_am::rlc_am_rx::add_segment_and_check(rlc_amd_rx_pdu_segments_t *pdu, rl rlc_amd_rx_pdu_t &back = pdu->segments.back(); n = back.header.so + back.buf->N_bytes; } + if(segment->header.so != n) { + log->warning("Received PDU with SO=%d, expected %d. Discarding PDU.\n", segment->header.so, n); pool->deallocate(segment->buf); return false; } else {