diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-04-03 09:58:15 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-04-05 10:33:10 +0200 |
commit | 85f51a1ae136f46cb2de5819415c2259d70d5994 (patch) | |
tree | a0b4871445acf931de087eff8b5ebebb24bf29cb | |
parent | 6f7c2342f9cc8f8fa31e84d99dff0f2964676730 (diff) | |
download | ouroboros-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>
-rw-r--r-- | src/ipcpd/eth/eth.c | 2 |
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); |