3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-16 17:09:24 +01:00
Commit Graph

210 Commits

Author SHA1 Message Date
Denis Kenzior
7397903234 monitor: Fix unused variable warning 2019-10-17 12:36:44 -05:00
Denis Kenzior
e4dc23a523 monitor: Use print_ie in auth frame dumper
Do not assume that the challenge IE is present or the only IE in the
authentication frame
2019-10-17 12:04:08 -05:00
Denis Kenzior
0b8de3d5df monitor: Fix p2p channel list dumper
This dumper probably intended to update pos after invoking strncpy.
However, strncpy returns the number of bytes that *would* have been
copied and so the logic gets a bit complex to get completely right.

Instead, switch to using l_string since this is inside the monitor and
not particularly performance critical.
2019-10-17 11:49:11 -05:00
James Prestwood
2fd667af94 monitor: print QoS Map
The actual data in the map is very low level, but this at least shows
us that the IE was included.
2019-09-13 17:05:31 -05:00
James Prestwood
6902bb9dae monitor: print association response events 2019-09-09 15:41:15 -05:00
Denis Kenzior
e01a036a41 monitor: decode additional Extended Capability bits 2019-08-23 08:54:17 -05:00
Denis Kenzior
571d66fe42 monitor: Dump PAE frames from CONTROL_PORT_FRAME events 2019-08-15 15:06:59 -05:00
Denis Kenzior
e6102141f5 monitor: Dump Supported Operating Classes IE 2019-08-04 09:56:42 -05:00
Denis Kenzior
60078478cf monitor: Dump RTM_NEWROUTE/DELROUTE/GETROUTE 2019-07-23 11:35:27 -05:00
Denis Kenzior
c439a2614c monitor: Dump IFLA_LINKINFO 2019-07-23 09:31:05 -05:00
Denis Kenzior
45dfd26689 monitor: Supported nested rtnl attributes 2019-07-23 09:30:42 -05:00
Denis Kenzior
c47fee2e78 monitor: Print string length of rtnl attributes 2019-07-23 09:22:57 -05:00
Denis Kenzior
45ce4bc8eb monitor: Fix printing of nlmsgerr netlink messages 2019-07-23 08:21:51 -05:00
Denis Kenzior
e0eb824fe3 monitor: nlmsg attributes are unsigned 2019-07-23 07:41:53 -05:00
Denis Kenzior
d63f73adf9 monitor: Generalize flag printing 2019-07-23 07:24:20 -05:00
James Prestwood
2b12759595 monitor: basic ANQP printing
Simply prints the ANQP ID (human readable) and the length. Once
the ANQP dependency on netdev is removed the full ANQP parser
can be used, but for now its done manually. Once this is done it
will be much easier to print the actual ANQP ID data.
2019-07-15 14:53:47 -05:00
Denis Kenzior
7f0b169e71 monitor: Use nl80211cmd_to_string 2019-07-15 14:06:26 -05:00
James Prestwood
b483a78464 monitor: update nlmon.c to use exposed vendor OUIs 2019-07-15 12:42:34 -05:00
Andrew Zaborowski
2a5c2cec46 monitor: Print "None" for empty p2p flags 2019-07-15 11:30:44 -05:00
Denis Kenzior
c60b0ed3cf monitor: Dump additional attributes 2019-07-10 17:01:19 -05:00
Andrew Zaborowski
884cbd4cbb monitor: Drop an include causing build error
After 56f3e54a1d546bfd59db673525929a34173ec796 wscutil.h is included
indirectly through p2putil.h.
2019-07-08 22:03:18 -05:00
Andrew Zaborowski
7d7c79fbf0 monitor: Parse and print P2P IE payloads 2019-07-08 14:44:29 -05:00
Andrew Zaborowski
90dc88bfa0 monitor: Show P2P Public action frame types 2019-07-08 14:42:47 -05:00
Andrew Zaborowski
2862a89d4f monitor: Show P2P action frame types 2019-07-08 14:42:04 -05:00
Andrew Zaborowski
6081438564 monitor: Show IP Allocation KDEs from EAPoL-Key 2/4, 3/4 frames 2019-07-08 14:41:01 -05:00
Andrew Zaborowski
6618ad1fee monitor: Show Radio Management action frame types 2019-07-08 14:40:40 -05:00
Andrew Zaborowski
91a156b4b1 monitor: Show Public Action frame types 2019-07-08 14:40:05 -05:00
Andrew Zaborowski
8eb1fbecce monitor: Show Action frame types 2019-07-08 14:39:50 -05:00
Andrew Zaborowski
6c8b4d13f0 monitor: Parse and show EAPoL-Key KDE types
For now only show the KDE type, not the contents
2019-07-08 14:38:54 -05:00
Denis Kenzior
cd67e66f8e monitor: Fix ARRAY output
Commit 3ff9f59ba1 ("monitor: Print MAC_ADDRS array") introduced a
small bug where some arguments were erroneously printed as an address.
2019-06-22 12:38:35 -05:00
Denis Kenzior
3ff9f59ba1 monitor: Print MAC_ADDRS array 2019-06-21 12:22:08 -05:00
James Prestwood
e0c9b68467 monitor: parse/print HS2.0/WFA IEs
This is just a few of the WiFi Alliance IEs used for Hotspot 2.0
2019-06-05 16:53:11 -05:00
James Prestwood
b9d97c9d87 monitor: change naming of Microsoft OUI
Inside print_ie_vendor, the Microsoft OUI is checked for a WPA IE. The
variable name for the OUI was wfa_oui, but this OUI is not actually the
WiFi-Alliance (sometimes refered to as 'wfa') but rather the Microsoft
OUI.
2019-06-05 16:53:11 -05:00
Marcel Holtmann
1ca82f4e49 monitor: Fix length parameter of strncpy for kernel names 2019-04-30 16:59:28 +02:00
James Prestwood
a4af9dc9f5 monitor: support printing FILS IEs/Attributes
Added handling for several FILS IEs and NL attributes specific to
FILS. Also changed "SAE Data" to "Auth Data" since its now used for
both SAE and FILS.
2019-04-05 17:57:31 -05:00
James Prestwood
3b801526f0 monitor: allow monitor to support other MIC lengths
Unfortunately there is no way to determine the MIC length just from the
eapol frame. 802.11 defined AKMs define the MIC length, but non 802.11
AKMs (e.g. OWE) can define their own MIC length. For this reason it seem
infeasable to track these special AKM's data flow to determine the MIC
length.

To work around this we can just try different MIC lengths (since there
are only 3 after all). This allows us to get key data length and see if
the total packet size equals the frame length + key data length. If the
sizes don't match we can try the next MIC length.
2019-01-17 15:20:28 -06:00
James Prestwood
374b367ba4 eapol: allow 16, 24 and 32 byte MIC lengths
The MIC length was hard coded to 16 bytes everywhere, and since several
AKMs require larger MIC's (24/32) this needed to change. The main issue
was that the MIC was hard coded to 16 bytes inside eapol_key. Instead
of doing this, the MIC, key_data_length, and key_data elements were all
bundled into key_data[0]. In order to retrieve the MIC, key_data_len,
or key_data several macros were introduced which account for the MIC
length provided.

A consequence of this is that all the verify functions inside eapol now
require the MIC length as a parameter because without it they cannot
determine the byte offset of key_data or key_data_length.

The MIC length for a given handshake is set inside the SM when starting
EAPoL. This length is determined by the AKM for the handshake.
2019-01-17 15:20:28 -06:00
Marcel Holtmann
5e31b194e2 monitor: List all enum values in switch statement 2018-12-07 09:04:36 +01:00
James Prestwood
22f4f2bc38 monitor: print OWE related info
Added support to print IE_TYPE_OWE_DH_PARAM element as well as added
the AKM suite string/type for OWE.
2018-11-16 16:20:59 -06:00
James Prestwood
35bce47022 monitor: allow printing extension IE's
print_ie was using a uint8_t for tag, which overflowed if the IE was an
extension type.
2018-11-16 16:20:59 -06:00
James Prestwood
c3785df735 monitor: fix indent on AKM types 2018-11-16 16:20:59 -06:00
Marcel Holtmann
5d9278913f monitor: Fix includes for using with -std=c99 compiler option 2018-11-01 22:19:11 +01:00
Marcel Holtmann
a9c2d71874 monitor: Use l_get_be16 and l_put_be16 instead of open coding it 2018-11-01 21:28:55 +01:00
Andreas Henriksson
d4064ea1b6 monitor: Fix spelling errors spotted by lintian
The debian package checking tool lintian spotted a bunch
of spelling errors in the built binaries.
2018-08-06 12:28:57 -05:00
John Zimmermann
37173350e2 monitor: move inclusion of linux headers after libc ones
to fix compilation against MUSL libc.
The struct ethhdr does exists in netinet/if_ether.h and linux/if_ether.h
so including the linux headers after the libc headers lets libc_compat.h
work as intended.
2018-05-17 17:34:08 -05:00
James Prestwood
5c5bfbb423 monitor: added scan/wiphy flags
Specifying --noscan will filter out any scan related packets
Specifying --nowiphy will filter out any "new wiphy" packets
2018-05-15 19:42:46 -05:00
Andrew Zaborowski
b55e080b21 nlmon: Update Auth Algorithm switch statement 2017-09-22 12:18:10 -05:00
Marcel Holtmann
af22a75fbb monitor: Include OUI value for AVM 2017-09-06 03:50:30 -07:00
Marcel Holtmann
fa98cee942 monitor: Fix minor typo 2017-09-06 03:15:46 -07:00
Andrew Zaborowski
76dd86d816 monitor: Use new mpdu.h structs
This may also fix displaying authentication and deauthentication frames.
2017-08-31 15:12:49 -05:00