Commit Graph

1240 Commits

Author SHA1 Message Date
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
Martin Mathieson 7fbfea9d68 IEEE80211: Fix a couple of filters 2022-04-30 21:56:21 +00:00
Alexis La Goutte 19dc602fe3 802.11: fix TWT Setup dissection
Duplicate Dialog Token field

Fix #18050
2022-04-24 20:48:04 +00:00
Alexis La Goutte 26be00e320 ieee80211: Fix clang analyzer warning (Dead.Store)
also indent
2022-04-20 07:25:17 +00:00
Richard Sharpe 8889d8c78b ieee80211: Implement more KDEs from ieee802.11-2016 and on.
I have picked up more KDEs from ieee802.11-2016 and Draft P802.11REVmd_D5.0
and Draft P802.11be_D1.4.
2022-04-17 23:59:26 +00:00
Richard Sharpe 34f8420d1e ieee80211: Correct the dissection of the 802.11ax Capabilities device class.
The numbers were reversed.

Closes #18030
2022-04-06 18:31:50 -07:00
Richard Sharpe 454552c149 ieee80211: Conform to ieee802.11-2016 for the Capability Info field.
The format and meaning of the bits in the Capability information field
has been different than what was implemented since at least 802.11-2016.

Defined in 9.4.1.4 Capability Information field.
2022-04-05 13:24:58 +00:00
Richard Sharpe f0e4a9960c ieee80211: Handle the case where a Vendor Specific response is not DPP! 2022-03-27 07:22:52 +00:00
Richard Sharpe 7680335a5b ieee80211: Handle fragmented DPP Configuration in GAS Comebacks.
These were not being handled properly.
2022-03-26 11:42:01 -07:00
Joerg Mayer ad48c4050d IEEE 802.11: Additional countrycode environment values 2022-03-09 07:30:42 +01:00
John Thacker dd7fff4bce ieee80211: Handle UTF-8 SSIDs and unspecified charsets
IEEE 802.11 SSID fields are officially unspecified encoding but
probably UTF-8 (and likely ASCII, with which UTF-8 is backwards
compatible), unless the Extended Capabilities bit indicating that
it's *definitely* UTF-8 is set.

Get the SSID bytes as a raw byte string without any encoding
validation for sending to Dot11Decrypt, and add it to the tree
as a FT_BYTES with BASE_SHOW_UTF_8_PRINTABLE, which does the
right thing most of the time, and more often than now. In practice
this does most of #16208.

To really finish the job, the Extended Capabilities bit needs to
be checked, but not only does that bit come in a later tagged element
than the SSID, it's not necessarily sent, and for Responses we'd have
to track if the bit was set in a corresponding Request in the same
conversation. However, it's not clear that any drivers actually do
set the bit. (In all the captures I've seen with UTF-8 or even non
ASCII/non UTF-8 SSIDs, the bit was unset.)
2022-02-26 12:28:59 +00:00
Alexis La Goutte 3a620f6f87 ieee802211: Add Model and Serial Fortinet Specific Vendor 2022-02-17 14:56:52 +00:00
João Valverde 8efad466c4 Tools: Fix fix-encoding-args.pl ASCII string validation
Do not require a useless ENC_NA parameter for string encodings.
FT_STRING and FT_STRINGZ types don't have any ndianness.

Follow-up to 6ec429622c.
2022-02-15 11:38:16 +00:00
Alexis La Goutte 84569f3ab8 ieee80211: add support of Fortinet Vendor Specific
Only support type 10 (SYSTEM ?) with subtype 1 (AP-NAME)

See https://www.nickjvturner.com/ap-name-broadcast-support for pcap
2022-02-09 18:23:26 +00:00
Dario Lombardo ac164db3ac ieee80211: initialize local buffers.
Fix valgrind errors for jumps on non-initialized memory.

Fix: #17894.
2022-01-26 13:05:25 +00:00
Alexis La Goutte af40152a0d ieee80211: fix typo (verision => version) 2022-01-25 10:35:19 +00:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
João Valverde 22ee2764a7 Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
2021-12-19 20:25:11 +00:00
John Thacker 2df6ab0906 ieee80211: BASE_HEX and BASE_CUSTOM are mutually exclusive 2021-12-12 17:09:34 -05:00
John Thacker 9a054d7837 IEEE80211: Remove ENC_NA from string encoding
With the recent commit changing the pre commit check, need
this to make a different change.
2021-12-12 21:41:35 +00:00
John Thacker 91bf99405a ieee80211: Pass association_sanity_check to dissect_mgt_action
Once again pass the association_sanity_check_t for MGT_ACTION
frames the way it was before commit fb2a0b4a71
introduced a new function. Fixes #17767.
2021-12-07 20:23:55 -05:00
Martin Mathieson e11cdf2f46 Fix some spelling errors 2021-11-29 17:46:16 +00:00