mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58: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
|
@ -96,6 +96,10 @@ void TCPAnalyzer::DeliverPacket(Connection* c, double t, bool is_orig, int remai
|
|||
{
|
||||
const u_char* data = pkt->ip_hdr->Payload();
|
||||
int len = pkt->ip_hdr->PayloadLen();
|
||||
// If the header length is zero, tcp checksum offloading is probably enabled
|
||||
// In this case, let's fix up the length.
|
||||
if ( pkt->ip_hdr->TotalLen() == 0 )
|
||||
len = remaining;
|
||||
auto* adapter = static_cast<TCPSessionAdapter*>(c->GetSessionAdapter());
|
||||
|
||||
const struct tcphdr* tp = ExtractTCP_Header(data, len, remaining, adapter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue