diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-03-31 12:48:26 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-04-05 10:30:26 +0200 |
commit | 642e3469d7265431a21f433f8c8d10d1f30cbe6c (patch) | |
tree | 62480c910c20c2d281665c16a3641370dbc6b5ee /src/ipcpd/eth/eth.c | |
parent | d81f3a84e2d64a2f1f531a86a8c9481087775e8f (diff) | |
download | ouroboros-642e3469d7265431a21f433f8c8d10d1f30cbe6c.tar.gz ouroboros-642e3469d7265431a21f433f8c8d10d1f30cbe6c.zip |
ipcpd: Fix frame buffer in eth ipcps
The packets were being sent and read into a buffer that had the
payload length instead of the frame length.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/ipcpd/eth/eth.c')
-rw-r--r-- | src/ipcpd/eth/eth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c index 90143d2f..b43caae1 100644 --- a/src/ipcpd/eth/eth.c +++ b/src/ipcpd/eth/eth.c @@ -351,7 +351,7 @@ static int eth_ipcp_send_frame(const uint8_t * dst_addr, #ifdef BUILD_ETH_LLC uint8_t cf = 0x03; #endif - uint8_t frame[ETH_MAX_SDU_SIZE]; + uint8_t frame[ETH_FRAME_SIZE]; struct eth_frame * e_frame; assert(payload); @@ -795,7 +795,7 @@ static void * eth_ipcp_sdu_reader(void * o) frame_len = read(eth_data.bpf, buf, BPF_BLEN); #elif defined(HAVE_RAW_SOCKETS) frame_len = recv(eth_data.s_fd, buf, - ETH_MAX_SDU_SIZE, 0); + ETH_FRAME_SIZE, 0); #endif if (frame_len <= 0) continue; |