Commit b003f374 authored by Melissa Elkadi's avatar Melissa Elkadi

Comment for removed first byte before write to TUN

parent d72d646c
...@@ -454,10 +454,11 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -454,10 +454,11 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
if (IS_SOFTMODEM_NOS1 || UE_NAS_USE_TUN) { if (IS_SOFTMODEM_NOS1 || UE_NAS_USE_TUN) {
LOG_D(PDCP, "IP packet received, to be sent to TUN interface"); LOG_D(PDCP, "IP packet received, to be sent to TUN interface");
/* We are removing the instance ID from the buffer. TUN interfaces /* In 5G there is a new layer called SDAP which adds one byte
care about the actual data we are sending. If we do not remove to the PDU data. TUN interfaces care about the actual data
the instance ID from the buffer, it will start with 00, and the we are sending. If we do not remove the instance ID from
write will fail with errno = 22 (EINVAL) */ the buffer, it will start with 00, and the write will fail
with errno = 22 (EINVAL) */
char *data_buffer = buf + 1; char *data_buffer = buf + 1;
int size_to_write = size - 1; int size_to_write = size - 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment