monitor: Cast bytes_read to incl_len type from PCAP packet

This commit is contained in:
Marcel Holtmann 2017-03-07 21:51:22 +01:00
parent 25a2ec7c11
commit 43efaf0163
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ bool pcap_read(struct pcap *pcap, struct timeval *tv,
return false;
}
if (bytes_read < pkt.incl_len) {
if ((uint32_t) bytes_read < pkt.incl_len) {
if (lseek(pcap->fd, pkt.incl_len - bytes_read, SEEK_CUR) < 0) {
pcap->closed = true;
return false;