Improve packet analysis data flow.

This commit is contained in:
Jan Grashoefer 2020-08-31 20:28:06 +02:00 committed by Tim Wojtulewicz
parent 90eb97876f
commit 38337d799b
43 changed files with 141 additions and 176 deletions

View file

@ -10,13 +10,12 @@ VLANAnalyzer::VLANAnalyzer()
{
}
zeek::packet_analysis::AnalyzerResult VLANAnalyzer::AnalyzePacket(size_t len,
const uint8_t* data, Packet* packet)
bool VLANAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* packet)
{
if ( 4 >= len )
{
packet->Weird("truncated_VLAN_header");
return AnalyzerResult::Failed;
return false;
}
auto& vlan_ref = packet->vlan != 0 ? packet->inner_vlan : packet->vlan;