Commit Graph

1261 Commits

Author SHA1 Message Date
Martin Mathieson d17c018013 tools/check_typed_item_calls: check FT_BOOLEAN mask length 2022-12-15 13:28:05 +00:00
Alexis La Goutte 8504578ec2 ieee80211: fix typo for encoding 2022-12-14 15:58:38 +00:00
Alexis La Goutte 30df11941b ieee80211: fix trailing whitespace 2022-12-14 15:58:38 +00:00
Alexis La Goutte 1856d1368a ieee80211: Add Location Civic (Measurement Report) 2022-12-14 15:58:38 +00:00
Alexis La Goutte 4b9aef8371 ieee80211: Add Location Civic (Measurement Request) 2022-12-14 15:58:38 +00:00
Alexis La Goutte 7191006bc4 ieee80211: Add Usage Rules/Policy Subelement
for LCI Report
2022-12-14 15:58:38 +00:00
Alexis La Goutte ce58638fe4 ieee80211: Add Measurement Request LCI Report dissection 2022-12-14 15:58:38 +00:00
Alexis La Goutte 0a5fcb4680 ieee80211: Update Measurement Request/Report value_string
From 802.11-2020.pdf
2022-12-14 15:58:38 +00:00
Alexis La Goutte b54c882df5 ieee80211: Add Measurement Request LCI Request dissection 2022-12-14 15:58:38 +00:00
Chien Wong 82a0a5215d ieee80211: Fix SAE Confirm dissecting
IEEE 802.11-2020, Section 12.4.7.6 says that an SAE Confirm message,
with a status code not equal to SUCCESS, shall indicate that a peer
rejects a previously sent SAE Confirm message. In this case, the Confirm
message may not carry a Send-Confirm field or a Confirm field, as
hostapd does. So we simply ignore possible fields following Status code.

Signed-off-by: Chien Wong <m@xv97.com>
2022-12-09 06:37:51 +00:00
João Valverde 729ea56b46 wmem: Remove wmem_strbuf_new_label()
Only dissectors are using this function and there is no use case,
as far as I know, that requires its use. Any limitation of length
is imposed transparently by the UI backend.

This function is problematic because it is not Unicode aware and
will truncate a string on an arbitrary byte boundary for multibyte
strings.

Replace its use with a normal strbuf without a length limite and
remove the function because it is not useful and the ITEM_LABEL_LENGTH
parameter does not belong in wmem anyway.
2022-11-30 15:55:54 +00:00
João Valverde 27ea011dd3 802.11: Remove artificial string truncation
The wmem_strbuf_new_label() creates a new buffer with a length limit
in octets. With multibyte strings this is likely to generate invalid
UTF-8 errors.

Remove the artificial limit on the value size. The
function proto_tree_add_string() sets the value, and truncating
that to an arbitrary limit is not really correct.

The display label will be truncated to a preset length by the UI.
This mechanism uses ws_label_strcpy() and is designed to avoid
the invalid truncation.

While here use wmem_strbuf_get_str() instead of wmem_strbuf_finalize().

Accepted best practice is to let the scope free the memory.
Removing the finalize call avoids an unnecessary realloc.

Fixes #18653.
2022-11-25 18:06:57 +00:00
Richard Sharpe b8a50617d7 ieee80211: Fix an CLang warning about dead code in my recent MR. 2022-11-23 07:10:27 +00:00
Richard Sharpe 43fb308437 Zieee80211: Provide compressed feedback matrices for VHT as well as HE.
!18574
2022-11-21 03:37:07 +00:00
Richard Sharpe ee4703094f ieee80211: Beamforming fixes 2022-11-21 03:37:07 +00:00
Chuck Craft b032a40fd9 IEEE 802.11: random addresses in conversations and endpoints
https://ask.wireshark.org/question/29235/
MAC addresses shown in WLAN statistics do not appear in the capture!

Initialize the address types then check if set when tapping.
2022-11-10 12:22:31 +00:00
Alexis La Goutte 7f2006e744 ieee80211: Use FT_STRING for HS 2.0 OSU NAI
Fix 18610
2022-11-09 11:41:21 +00:00
Martin Mathieson 3ac86775dc Fix some spelling errors 2022-11-02 20:54:24 +00:00
Emmanuel Grumbach 9339b357ea ieee80211: add a dissector for the protected EHT EML OP MODE notif
This an action frame to update the EMLSR / EMLMR mode.
This adds partial support for this frame.
It is fairly hairy to parse it because of its variable format, so for
now, just parse the EMLSR part and leave the EMLMR part for later.
2022-11-02 14:24:18 +00:00
Alexis La Goutte 2f75f65b7f ieee80211: remove duplicate entry
packet-ieee80211.c:33184 hf_ieee80211_addr_ta called consecutively at line 33184 - previous at 33183
2022-10-31 23:20:42 +00:00
Alexis La Goutte a9d32c9316 ieee80211: fix item type is FT_UINTY but call has len X
packet-ieee80211.c:10060 proto_tree_add_item called for hf_ieee80211_hs20_icons_avail_len  -  item type is FT_UINT8 but call has len 2
packet-ieee80211.c:11869 proto_tree_add_item called for hf_ieee80211_ff_key_data_length  -  item type is FT_UINT8 but call has len 2
packet-ieee80211.c:21328 proto_tree_add_item called for hf_ieee80211_s1g_short_beacon_interval  -  item type is FT_UINT8 but call has len 2
packet-ieee80211.c:32379 proto_tree_add_item called for hf_ieee80211_pentapartial_timestamp  -  item type is FT_UINT8 but call has len 5
packet-ieee80211.c:32932 proto_tree_add_item called for hf_ieee80211_pv1_cnt_bat_bitmap  -  item type is FT_UINT16 but call has len 4
2022-10-31 23:20:42 +00:00
Alexis La Goutte a06288d78c ieee80211: fix mask has odd number of digits
packet-ieee80211.c filter= wlan.he_ndp.sta_info.ru_start  - mask has odd number of digits 0x3F800 expected max for FT_UINT32 is 8
packet-ieee80211.c filter= wlan.he_ndp.sta_info.ru_end  - mask has odd number of digits 0x1FC0000 expected max for FT_UINT32 is 8
2022-10-31 23:20:42 +00:00
Alexis La Goutte e0c4172681 ieee80211: fix filter "wlan.fixed.publicact" appears consecutively
/packet-ieee80211.c: - filter "wlan.fixed.publicact" appears consecutively - labels are "Public Action"" and "Protected Public Action""
2022-10-31 23:20:42 +00:00
Gerald Combs 708da48526 IEEE 802.11: Fix a length check.
Fix a length check issue introduced in 85a9e05c52.
2022-10-25 09:06:33 -07:00
Gerald Combs 85a9e05c52 IEEE 802.11: Fix DSCP string handling
Replace looped snprintfs with wmem_strbuf_append_printfs.
2022-10-24 18:53:09 +00:00
Gerald Combs 39910654d3 IEEE 802.11: Fix SCIDX string handling
Appending to a string using snprintf inside a loop can be problematic
because you have to ensure that your start offset stays within the
bounds of your buffer and that your size (which is unsigned) doesn't
overflow. Switch to a wmem_strbuf.

Fixes #18527
2022-10-24 11:23:34 -07:00
Alexis La Goutte 6d60a07ea1 ieee802.11: Update doc link and revision 2022-10-21 08:15:30 +00:00
Richard Sharpe 00d1f4da87 ieee80211: Use greek leters in Beamforming matrices.
!18504
2022-10-20 18:33:05 +00:00
Richard Sharpe 45add8812d ieee80211: Improve the handling of Beamforming matrices.
Reduce the number of chars used so we can fit in the 240-byte limit.

Fixes #18504
2022-10-18 23:20:26 +00:00
Richard Sharpe b02fc55253 ieee80211: Correct the number of bits for phi & psi in beamforming matrices
I noticed while implementing the equivalent for 802.11be that the number
of bits for phi and psi angles was reversed. Also, fixed the spelling of
AvgSNR.
2022-10-14 17:44:33 +00:00
Alexis La Goutte ec767dcf2d ieee80211: Use gint(8) for Beamforming Report AVG SNR
Fix #18436
2022-10-11 18:35:10 +00:00
Jérôme Pouiller a1e2f3b3f5 ieee80211: Fix EAPOL dissector for Wi-SUN
In section 6.5.2.3 ("PTK and GTK Installation Flow"), the Wi-SUN
specification says that the second message in 4 way handshake must have
these properties:

  Descriptor Type = 2
  Key Information:
      1. Key Descriptor Version = 2
      2. Key Type = 1 (Pairwise)
      3. Install = 0
      4. Key Ack = 0
      5. Key MIC = 1
      6. Secure = 0
      7. Error = 0
      8. Request = 0
      9. Encrypted Key Data = 0
      10. SMK Message = 0
      11. Reserved = 0
  Key Length = 0
  Key Replay Counter = see [IEEE802.11] section 11.6.2.
  Key Nonce = SUP generated SNonce
  EAPOL-Key IV = 0
  Key RSC = 0
  Key MIC = MIC(KCK, EAPOL) computed over the body of this EAPOL-Key frame
  with the Key MIC field first initialized to 0.
  Key Data Length = 0
  Key Data = none

Thus, until now, the message 2/4 of 4 way handshake was identified as
message 4/4.
2022-09-30 18:37:13 +00:00
msweant 312efbd483 IEEE 802.11: Add Operating Class Indication Lookup
packet-ieee80211.c has the IEEE 802.11w-2009 class
indication lookup table included already but it's only
used to resolve the WFA HS2.0 OCI attribute when it
could also be used to resolve beacon/probe response tag
59.  Adding that resolution and renaming the RVAL struct
from hs20_oper_class_rvals to simply oper_class_rvals.

Closes #18389
2022-09-30 05:48:45 +00:00
Adrian Granados da978b8093 ieee80211: Fix Ruckus, Mist, and Aerohite vendor-specific dissectors
Makes sure "Unknown" is added to tree for unknown vendor-specific types.
2022-09-29 06:39:22 +00:00
Adrian Granados 1889b1f455 ieee80211: Add dissector for Alcatel-Lucent vendor specific IE
Dissector only supports type 1: AP Name.
2022-09-29 06:38:22 +00:00
Jaap Keuter b092fa05da Replace the last of PROTO_ITEM_ macro calls with function calls 2022-09-29 05:59:12 +00:00
Guy Harris 8195bdd340 Rename a bunch of things with "conversation".
A conversation in Wireshark might have two endpoints or might have no
endpoints; few if any have one endpoint.  Distinguish between
conversations and endpoints.
2022-08-25 20:02:20 -07:00
Guy Harris 2aeaf71fa5 Change names to reflect that it's an endpoint table.
More {host, hostlist} -> endpoint.
2022-08-23 22:15:45 -07:00
Guy Harris 4b53f31d2d Fix comments to reflect reality.
It's an endpoint table, not a table of hosts.
2022-08-23 19:07:25 -07:00
Guy Harris d9e662bc54 Rename some functions and types for endpoint tables.
The "conversation table" mechanism supports two types of tables, one for
the "Conversations" menu item under "Statistics" and one for the
"Endpoints" menu item under "Statistics".  The first of them shows
statistics for conversations at various layers of the networking stack;
the second of them shows statistics for endpoints at various layers of
the networking stack.

The latter is *not* a table of hosts; an endpoint might be a host,
identified by an address at some network level (MAC, IP, etc.), or it
might be a port on a host, identified by an address/port pair.

Some data types, function names, etc. use "host" or "hostlist" or other
terms that imply that an endpoint is a host; change them to speak of
endpoints rather than hosts, using names similar to the corresponding
functions for conversations.

Provide wrapper functions and typedefs for backwards source and binary
compatibility; mark them as deprecated in favor of the new names.

Clean up some comment errors found in the process.
2022-08-23 09:55:14 +00:00
Chien Wong 5c216de8cc ieee80211: Improve A-MSDU dissecting
Fix subframe length issue.
Add padding.

Signed-off-by: Chien Wong <m@xv97.com>
2022-08-20 16:43:32 +00:00
Chien Wong 3b7c611be1 ieee80211: Add Transition Disable KDE dissecting
Signed-off-by: Chien Wong <m@xv97.com>
2022-08-20 06:14:29 +00:00
Adrian Granados 9a560060ad ieee80211: Add dissector for Arista (Mojo) vendor specific IE
Dissector only supports type 6: AP Name.
2022-08-16 14:08:15 +00:00
Dieter Dobbelaere 321465db07 Corrected description of `wlan.fc.type_subtype`. 2022-08-16 12:19:48 +00:00
Martin Mathieson 1337db5a18 check_typed_item_calls.py: check for consecutive calls to same item 2022-08-12 16:20:35 +00:00
Roi Berkovich 4702e3bfad WLAN: fix IEEE802.11 dissection bug
When parsing wlan header above capwap, first two bytes are swapped (fcf
and flag). the offset was handled incorrectly, causing wireshark to
display incorrect fcf data in the tree summery and completely wrong
flags information (in the case of swap, the flags point to the same
byte as the fcf)
2022-07-22 05:49:01 +00:00
Adrian Granados 3c29458a46 ieee80211: Update VHT channel width interpretation as in IEEE Std 802.11-2020 2022-07-12 16:42:23 +00:00
Adrian Granados a664d29978 ieee80211: Update reason codes as in IEEE Std 802.11-2020 and 802.11ax-2021 2022-06-15 07:06:35 +00:00
Roland Knall 0640b711ea tap: Mark filtered packets instead of dropping them
Allows packets to be filtered but marked and not removed from the
tap listing. Additionally a total is calculated for all rx/tx frames
and bytes
2022-06-10 09:17:52 +02:00
Roland Knall 2cf938cfa8 tap: Adding flags for tap_packet
This allows flags to be passed by the registering listener
to the collection of information
2022-06-10 05:46:15 +00:00