mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Accept packets that use tcp segment offloading.
When checksum offloading is enabled, we now forward packets that have 0 header lengths set - and assume that they have TSO enabled. If checksum offloading is not enabled, we drop the packets. Addresses GH-1829
This commit is contained in:
parent
20d1b89caa
commit
e14b695497
5 changed files with 20 additions and 6 deletions
|
@ -115,7 +115,9 @@ bool IPBasedAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pkt
|
|||
|
||||
bool IPBasedAnalyzer::CheckHeaderTrunc(size_t min_hdr_len, size_t remaining, Packet* packet)
|
||||
{
|
||||
if ( packet->ip_hdr->PayloadLen() < min_hdr_len )
|
||||
// If segment offloading or similar is enabled, the payload len will return 0.
|
||||
// Thus, let's ignore that case.
|
||||
if ( packet->ip_hdr->PayloadLen() && packet->ip_hdr->PayloadLen() < min_hdr_len )
|
||||
{
|
||||
Weird("truncated_header", packet);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue