From 85f51a1ae136f46cb2de5819415c2259d70d5994 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Tue, 3 Apr 2018 09:58:15 +0200 Subject: ipcpd: Fix truncate of small packets The truncate was setting the length to the frame length, instead of the actual payload length to be delivered to the N+1. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/eth/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c index 5eb4e7cb..25ecdffb 100644 --- a/src/ipcpd/eth/eth.c +++ b/src/ipcpd/eth/eth.c @@ -832,7 +832,6 @@ static void * eth_ipcp_sdu_reader(void * o) ipcp_sdb_release(sdb); continue; } - shm_du_buff_truncate(sdb, frame_len); #endif #if defined(HAVE_BPF) && !defined(HAVE_NETMAP) @@ -929,6 +928,7 @@ static void * eth_ipcp_sdu_reader(void * o) #ifndef HAVE_NETMAP shm_du_buff_head_release(sdb, ETH_HEADER_TOT_SIZE); + shm_du_buff_truncate(sdb, length); ipcp_flow_write(fd, sdb); #else flow_write(fd, &e_frame->payload, length); -- cgit v1.2.3