GH-1184: Add 'source' field to weird log denoting where the weird was reported

This commit is contained in:
Tim Wojtulewicz 2020-11-05 13:18:54 -07:00
parent eccbbb4476
commit e27008ef26
72 changed files with 964 additions and 890 deletions

View file

@ -25,7 +25,7 @@ bool EthernetAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pa
// to pull bytes out of it.
if ( 16 >= len )
{
packet->Weird("truncated_ethernet_frame");
Weird("truncated_ethernet_frame", packet);
return false;
}
@ -36,7 +36,7 @@ bool EthernetAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pa
if ( cfplen + 14 >= len )
{
packet->Weird("truncated_link_header_cfp");
Weird("truncated_link_header_cfp", packet);
return false;
}
@ -60,7 +60,7 @@ bool EthernetAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pa
{
if ( 16 >= len )
{
packet->Weird("truncated_ethernet_frame");
Weird("truncated_ethernet_frame", packet);
return false;
}
@ -86,6 +86,6 @@ bool EthernetAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pa
}
// Undefined (1500 < EtherType < 1536)
packet->Weird("undefined_ether_type");
Weird("undefined_ether_type", packet);
return false;
}