mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Add ability for packet sources to flag a packet's l2 or l3 checksum as valid.
This lets packet source plugins implement handling of hardware checksum offloading, if available. Setting the flags will skip the internal checksumming for either layer 2 and/or layer 3.
This commit is contained in:
parent
da5fca7163
commit
c6f7665953
6 changed files with 19 additions and 5 deletions
|
@ -251,7 +251,7 @@ void NetSessions::DoNextPacket(double t, const Packet* pkt, const IP_Hdr* ip_hdr
|
|||
if ( packet_filter && packet_filter->Match(ip_hdr, len, caplen) )
|
||||
return;
|
||||
|
||||
if ( ! ignore_checksums && ip4 &&
|
||||
if ( ! pkt->l2_checksummed && ! ignore_checksums && ip4 &&
|
||||
ones_complement_checksum((void*) ip4, ip_hdr_len, 0) != 0xffff )
|
||||
{
|
||||
Weird("bad_IP_checksum", pkt, encapsulation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue