summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-04-03 09:58:15 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-04-05 10:33:10 +0200
commit85f51a1ae136f46cb2de5819415c2259d70d5994 (patch)
treea0b4871445acf931de087eff8b5ebebb24bf29cb /src
parent6f7c2342f9cc8f8fa31e84d99dff0f2964676730 (diff)
downloadouroboros-85f51a1ae136f46cb2de5819415c2259d70d5994.tar.gz
ouroboros-85f51a1ae136f46cb2de5819415c2259d70d5994.zip
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 <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/eth/eth.c2
1 files changed, 1 insertions, 1 deletions
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);