mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
af_packet: Hacked VLAN support.
This commit is contained in:
parent
b38894a329
commit
1fe008945e
1 changed files with 8 additions and 5 deletions
|
@ -245,11 +245,14 @@ bool AF_PacketSource::ExtractNextPacket(zeek::Packet* pkt)
|
||||||
|
|
||||||
pkt->Init(props.link_type, ¤t_hdr.ts, current_hdr.caplen, current_hdr.len, data);
|
pkt->Init(props.link_type, ¤t_hdr.ts, current_hdr.caplen, current_hdr.len, data);
|
||||||
|
|
||||||
if ( current_hdr.len == 0 || current_hdr.caplen == 0 )
|
if ( packet->tp_status & TP_STATUS_VLAN_VALID )
|
||||||
{
|
pkt->vlan = packet->hv1.tp_vlan_tci;
|
||||||
Weird("empty_af_packet_header", pkt);
|
|
||||||
return false;
|
if ( current_hdr.len == 0 || current_hdr.caplen == 0 )
|
||||||
}
|
{
|
||||||
|
Weird("empty_af_packet_header", pkt);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
stats.received++;
|
stats.received++;
|
||||||
stats.bytes_received += current_hdr.len;
|
stats.bytes_received += current_hdr.len;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue