mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Fixed RadioTap support (still "Works for Me")
This commit is contained in:
parent
d6c89ae022
commit
1d94eadd36
1 changed files with 26 additions and 13 deletions
|
@ -256,21 +256,34 @@ void Packet::ProcessLayer2()
|
||||||
|
|
||||||
case DLT_IEEE802_11_RADIO:
|
case DLT_IEEE802_11_RADIO:
|
||||||
{
|
{
|
||||||
protocol = (data[57] << 8) + data[58];
|
//if ( ! (pdata[73] == 0 && pdata[74] == 0 && pdata[75] == 0) )
|
||||||
if ( (data[54] == 0 && data[55] == 0 && data[56] == 0) &&
|
// {
|
||||||
(protocol == 0x0800 || protocol == 0x86DD) )
|
// Weird("unknown_radiotap_packet");
|
||||||
{
|
// return;
|
||||||
// Found an IPv4 or IPv6 packet.
|
// }
|
||||||
|
|
||||||
// Skip over the RadioTap header, the IEEE QoS header,
|
// Skip over the RadioTap header, the IEEE QoS header,
|
||||||
// and logical link control header.
|
// and logical link control header.
|
||||||
data += GetLinkHeaderSize(props.link_type);
|
//printf("link header size: %d\n", GetLinkHeaderSize(link_type));
|
||||||
pkt_hdr_size = 0;
|
// skip Radio Tap header.
|
||||||
}
|
pdata += (pdata[3] << 8) + pdata[2];
|
||||||
|
// skip QoS data header
|
||||||
|
pdata += 26;
|
||||||
|
|
||||||
|
int protocol = (pdata[6] << 8) + pdata[7];
|
||||||
|
if ( protocol == 0x0800 )
|
||||||
|
l3_proto = L3_IPV4;
|
||||||
|
else if ( protocol == 0x86DD )
|
||||||
|
l3_proto = L3_IPV6;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Weird("non_ip_packet_in_ieee802_11_radio_encapsulation", ¤t_packet);
|
Weird("non_ip_packet_in_ieee802_11_radio_encapsulation");
|
||||||
goto done;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// skip logical link control header
|
||||||
|
pdata += 8;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue