mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
monitor: Skip packet from PCAP file if it is truncated
This commit is contained in:
parent
b00bea15ab
commit
581f00171d
@ -170,8 +170,10 @@ static int process_pcap(struct pcap *pcap)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len < real_len)
|
if (len < real_len) {
|
||||||
printf("Packet truncated from %u\n", real_len);
|
printf("Packet truncated from %u\n", real_len);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
pkt_type = L_GET_UNALIGNED((const uint16_t *) buf);
|
pkt_type = L_GET_UNALIGNED((const uint16_t *) buf);
|
||||||
pkt_type = L_BE16_TO_CPU(pkt_type);
|
pkt_type = L_BE16_TO_CPU(pkt_type);
|
||||||
|
Loading…
Reference in New Issue
Block a user