avoid gtpu extension header pdcp number magic number

master
Francisco 4 years ago committed by Francisco Paisana
parent 56ec2c286e
commit a55c4cdca5

@ -132,7 +132,7 @@ bool gtpu_read_header(srslte::byte_buffer_t* pdu, gtpu_header_t* header, srslte:
header->next_ext_hdr_type = *ptr;
ptr++;
if ((header->flags & GTPU_FLAGS_EXTENDED_HDR) && (header->next_ext_hdr_type == 0b11000000)) {
if ((header->flags & GTPU_FLAGS_EXTENDED_HDR) && (header->next_ext_hdr_type == GTPU_EXT_HEADER_PDCP_PDU_NUMBER)) {
header->ext_buffer.resize(4);
for (size_t i = 0; i < 4; ++i) {
header->ext_buffer[i] = *ptr;

@ -128,7 +128,7 @@ void gtpu::send_pdu_to_tunnel(uint16_t rnti,
if (pdcp_sn >= 0) {
header.flags |= GTPU_FLAGS_EXTENDED_HDR;
header.next_ext_hdr_type = 0b11000000;
header.next_ext_hdr_type = GTPU_EXT_HEADER_PDCP_PDU_NUMBER;
header.ext_buffer.resize(4u);
header.ext_buffer[0] = 0x01u;
header.ext_buffer[1] = (pdcp_sn >> 8u) & 0xffu;

Loading…
Cancel
Save