From 4152e43bab87de7da1f1f3a54ca06855464ebc34 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 12 Feb 2021 15:31:15 +0000 Subject: [PATCH] fix gtpu packing when extension header is enabled --- lib/src/upper/gtpu.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/upper/gtpu.cc b/lib/src/upper/gtpu.cc index 7282809d6..3f7bfbd4a 100644 --- a/lib/src/upper/gtpu.cc +++ b/lib/src/upper/gtpu.cc @@ -45,9 +45,11 @@ bool gtpu_write_header(gtpu_header_t* header, srslte::byte_buffer_t* pdu, srslog } pdu->msg -= GTPU_EXTENDED_HEADER_LEN; pdu->N_bytes += GTPU_EXTENDED_HEADER_LEN; + header->length += GTPU_EXTENDED_HEADER_LEN - GTPU_BASE_HEADER_LEN; if (header->next_ext_hdr_type > 0) { pdu->msg -= header->ext_buffer.size(); pdu->N_bytes += header->ext_buffer.size(); + header->length += header->ext_buffer.size(); } } else { if (pdu->get_headroom() < GTPU_BASE_HEADER_LEN) {