Comment for removed first byte before write to TUN
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user