aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap.c')
-rw-r--r--tap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tap.c b/tap.c
index 9e6ece9..29fcd51 100644
--- a/tap.c
+++ b/tap.c
@@ -658,7 +658,7 @@ redo:
/* Complete the partial read above before discarding a malformed
* frame, otherwise the stream will be inconsistent.
*/
- if (len < (ssize_t)sizeof(*eh) || len > ETH_MAX_MTU)
+ if (len < (ssize_t)sizeof(*eh) || len > (ssize_t)ETH_MAX_MTU)
goto next;
pcap(p, len);
@@ -718,7 +718,7 @@ restart:
while ((len = read(c->fd_tap, pkt_buf + n, TAP_BUF_BYTES - n)) > 0) {
struct ethhdr *eh = (struct ethhdr *)(pkt_buf + n);
- if (len < (ssize_t)sizeof(*eh) || len > ETH_MAX_MTU) {
+ if (len < (ssize_t)sizeof(*eh) || len > (ssize_t)ETH_MAX_MTU) {
n += len;
continue;
}