tcpdump/tests/ieee802.11_exthdr.out
Denis Ovsienko b766ec9d3b fix bug #303 (DLT_IEEE802_11_RADIO ext. bitmaps)
This bug was discovered and pinned down by Wim Torfs.

The code in question handles DLT_IEEE802_11_RADIO datalink type, which
consists of a variable-sized header, a variable number of fields and the
actual 802.11 frame. The integers contained in the fields are aligned,
properly extracting them is exactly the purpose of the existing "cpack"
module. The issue with the current code is that it sets alignment base
for cpack at the end of the variable-sized header, in other words,
64-bit integers would be properly extracted only so long as the header
is 64-bit long, which only happens when the total number of bitmaps in
it is odd (the minimum number of bitmaps is one). Once this condition
isn't met, as is with two bitmaps, decoding becomes incorrect. The
reporter's point that the alignment base must be the beginning of the
variable-sized header is accurate.

This commit adds a new cpack_advance() function to fast-forward the
"c_next" pointer of a cpack_state context by an arbitrary number of
octets. The ieee802_11_radio_print() function now uses it to skip the
header and all its bitmaps, and the alignment base is now the header
start.
2013-04-28 18:26:53 +04:00

27 lines
3.4 KiB
Plaintext

10016360us tsft 1.0 Mb/s 2412 MHz 11b -22dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
10018922us tsft 1.0 Mb/s 2412 MHz 11b -19dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a
10017245us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
10085301us tsft 1.0 Mb/s 2412 MHz 11b -19dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
10087718us tsft 1.0 Mb/s 2412 MHz 11b -18dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a
10086042us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
10284358us tsft 1.0 Mb/s 2412 MHz 11b -61dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
10288217us tsft 1.0 Mb/s 2412 MHz 11b -46dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a
10286542us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
10351366us tsft 1.0 Mb/s 2412 MHz 11b -70dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
10353769us tsft 1.0 Mb/s 2412 MHz 11b -57dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a
10352092us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
10418368us tsft 1.0 Mb/s 2412 MHz 11b -67dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
10420929us tsft 1.0 Mb/s 2412 MHz 11b -73dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a
10419253us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
10485371us tsft 1.0 Mb/s 2412 MHz 11b -72dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
10489278us tsft 1.0 Mb/s 2412 MHz 11b -74dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a
10487602us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
13338508us tsft 1.0 Mb/s 2412 MHz 11b -14dB signal -86dB noise antenna 1 [bit 31] 314us Authentication (Open System)-1: Successful
13340215us tsft 1.0 Mb/s 2412 MHz 11b -17dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a
13339435us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Authentication (Open System)-2:
13341999us tsft 1.0 Mb/s 2412 MHz 11b -18dB signal -86dB noise antenna 1 [bit 31] 314us Assoc Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
13346458us tsft 1.0 Mb/s 2412 MHz 11b -18dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a
13344925us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Assoc Response AID(1) :: Successful
13355433us tsft 2412 MHz 11g -22dB signal -86dB noise antenna 1 19.5 Mb/s MCS 2 20 MHz lon GI [bit 31] 48us
13454791us tsft 2412 MHz 11g -21dB signal -86dB noise antenna 1 52.0 Mb/s MCS 11 20 MHz lon GI [bit 31] Pwr Mgmt 44us