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

232 Commits

Author SHA1 Message Date
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
140c626a4b monitor: Remove duplicate monitor_interface structure
The global structure was intended to be used, not the one local to the
main function.
2019-07-23 09:22:01 -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
Peter Seiderer
330a930b01 monitor: add missing sys/stat.h include
Fixes:

    CC       monitor/pcap.o
  monitor/pcap.c: In function ‘pcap_create’:
  monitor/pcap.c:121:6: error: ‘S_IRUSR’ undeclared (first use in this function)
        S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
        ^
  monitor/pcap.c:121:6: note: each undeclared identifier is reported only once for each function it appears in
  monitor/pcap.c:121:16: error: ‘S_IWUSR’ undeclared (first use in this function)
        S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
                  ^
  monitor/pcap.c:121:26: error: ‘S_IRGRP’ undeclared (first use in this function)
        S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
                            ^
  monitor/pcap.c:121:36: error: ‘S_IROTH’ undeclared (first use in this function)
        S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
                                      ^
2018-11-10 17:49:04 +01:00
Marcel Holtmann
5d9278913f monitor: Fix includes for using with -std=c99 compiler option 2018-11-01 22:19:11 +01:00
Marcel Holtmann
72a64fa7fb build: Adjust to the latest ELL signal API changes 2018-11-01 22:09:19 +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
Marcel Holtmann
0689877858 monitor: Use l_main_run_with_signal instead of open coding it 2018-11-01 20:02:53 +01:00
Denis Kenzior
ec365e52eb monitor: Fix valgrind warning
==24195== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==24195==    at 0x4F3DBEF: sendto (in /lib64/libc-2.26.so)
==24195==    by 0x13A453: can_write_data (netlink.c:119)
==24195==    by 0x13866B: io_callback (io.c:149)
==24195==    by 0x137365: l_main_iterate (main.c:389)
==24195==    by 0x1374A3: l_main_run (main.c:436)
==24195==    by 0x113524: main (main.c:832)
==24195==  Address 0x5205f99 is 57 bytes inside a block of size 88 alloc'd
==24195==    at 0x4C2D0AF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24195==    by 0x133931: l_malloc (util.c:62)
==24195==    by 0x13AEF3: l_netlink_send (netlink.c:411)
==24195==    by 0x112351: rtm_interface_send_message (main.c:276)
==24195==    by 0x1126F3: iwmon_interface_lookup (main.c:405)
==24195==    by 0x11351F: main (main.c:830)
==24195==  Uninitialised value was created by a heap allocation
==24195==    at 0x4C2D0AF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24195==    by 0x133931: l_malloc (util.c:62)
==24195==    by 0x11217B: rtm_interface_send_message (main.c:234)
==24195==    by 0x1126F3: iwmon_interface_lookup (main.c:405)
==24195==    by 0x11351F: main (main.c:830)
2018-10-30 17:52:24 -05:00
Denis Kenzior
76c8fd9a2f monitor: Fix invalid use of l_free
==23290== Invalid read of size 4
==23290==    at 0x12D334: timeout_destroy (timeout.c:61)
==23290==    by 0x12CDD1: l_main_exit (main.c:466)
==23290==    by 0x111F3B: main (main.c:835)
==23290==  Address 0x5211d80 is 0 bytes inside a block of size 32 free'd
==23290==    at 0x4C2E1BB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23290==    by 0x111F36: main (main.c:833)
==23290==  Block was alloc'd at
==23290==    at 0x4C2CF8F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23290==    by 0x12A74D: l_malloc (util.c:62)
==23290==    by 0x12D40F: timeout_create_with_nanoseconds (timeout.c:135)
==23290==    by 0x112A31: signal_handler (main.c:661)
==23290==    by 0x12D03A: signal_callback (signal.c:82)
==23290==    by 0x12CC6D: l_main_iterate (main.c:387)
==23290==    by 0x12CD3B: l_main_run (main.c:434)
==23290==    by 0x1121F2: main (main.c:821)
==23290==
==23290== Invalid read of size 8
==23290==    at 0x12D33B: timeout_destroy (timeout.c:64)
==23290==    by 0x12CDD1: l_main_exit (main.c:466)
==23290==    by 0x111F3B: main (main.c:835)
==23290==  Address 0x5211d90 is 16 bytes inside a block of size 32 free'd
==23290==    at 0x4C2E1BB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23290==    by 0x111F36: main (main.c:833)
==23290==  Block was alloc'd at
==23290==    at 0x4C2CF8F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23290==    by 0x12A74D: l_malloc (util.c:62)
==23290==    by 0x12D40F: timeout_create_with_nanoseconds (timeout.c:135)
==23290==    by 0x112A31: signal_handler (main.c:661)
==23290==    by 0x12D03A: signal_callback (signal.c:82)
==23290==    by 0x12CC6D: l_main_iterate (main.c:387)
==23290==    by 0x12CD3B: l_main_run (main.c:434)
==23290==    by 0x1121F2: main (main.c:821)
==23290==
==23290== Invalid write of size 4
==23290==    at 0x12D33F: timeout_destroy (timeout.c:62)
==23290==    by 0x12CDD1: l_main_exit (main.c:466)
==23290==    by 0x111F3B: main (main.c:835)
==23290==  Address 0x5211d80 is 0 bytes inside a block of size 32 free'd
==23290==    at 0x4C2E1BB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23290==    by 0x111F36: main (main.c:833)
==23290==  Block was alloc'd at
==23290==    at 0x4C2CF8F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23290==    by 0x12A74D: l_malloc (util.c:62)
==23290==    by 0x12D40F: timeout_create_with_nanoseconds (timeout.c:135)
==23290==    by 0x112A31: signal_handler (main.c:661)
==23290==    by 0x12D03A: signal_callback (signal.c:82)
==23290==    by 0x12CC6D: l_main_iterate (main.c:387)
==23290==    by 0x12CD3B: l_main_run (main.c:434)
==23290==    by 0x1121F2: main (main.c:821)
2018-10-30 15:47:57 -05: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