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,6 +245,9 @@ bool AF_PacketSource::ExtractNextPacket(zeek::Packet* pkt)
|
|||
|
||||
pkt->Init(props.link_type, ¤t_hdr.ts, current_hdr.caplen, current_hdr.len, data);
|
||||
|
||||
if ( packet->tp_status & TP_STATUS_VLAN_VALID )
|
||||
pkt->vlan = packet->hv1.tp_vlan_tci;
|
||||
|
||||
if ( current_hdr.len == 0 || current_hdr.caplen == 0 )
|
||||
{
|
||||
Weird("empty_af_packet_header", pkt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue