Commit Graph

3913 Commits

Author SHA1 Message Date
James Prestwood 090ac03100 ie: expose vendor OUIs
In the same fashion as the WSC WFA OUI, ie.[ch] will now expose the
other vendor OUIs to avoid duplication across multiple files in IWD
as well as used in iwmon.
2019-07-15 12:42:22 -05:00
Andrew Zaborowski 213d75b9bb scan: Process P2P IEs from scan results 2019-07-15 12:40:44 -05:00
Andrew Zaborowski cf684fdfa1 scan: Add option to use the NO_CCK scan flag
P2P probe requests are to be sent at min 6.0 Mb/s using OFDM,
specifically the 802.11b rates are prohibited (section 2.4.1 in Wi-Fi
P2p Technical Spec v1.7), some of which use CCK modulation.  This is
already the default for 5G but for 2.4G the drivers generally do this
if we set the NL80211_ATTR_TX_NO_CCK_RATE flags with
NL80211_CMD_TRIGGER_SCAN.
2019-07-15 11:36:34 -05:00
Andrew Zaborowski 2a5c2cec46 monitor: Print "None" for empty p2p flags 2019-07-15 11:30:44 -05:00
James Prestwood ce9e61d727 auto-t: hotspot dir not hidden 2019-07-15 11:14:01 -05:00
James Prestwood 85131f4827 hotspot: make hotspot dir not hidden 2019-07-15 11:13:55 -05:00
James Prestwood c5eba1cc27 auto-t: add test for Hotspot with roaming consortium 2019-07-15 11:11:29 -05:00
James Prestwood 8bcb8e870e ie: fix incorrect length check for hotspot indication
The length check was incorrectly assuming that PPS MO ID or
ANQP Domain ID would be present in the IE. Both these are optional
and without then the minimum length is 5 bytes, not 7.
2019-07-12 18:51:57 -05:00
James Prestwood 993d9cbf6b station: check hs20_capable first before ANQP
If a BSS is not a hotspot 2.0 BSS then there is no reason to bother
checking configuration files.
2019-07-12 18:51:36 -05:00
James Prestwood b406a57ca4 station: anqp: add more debug logging 2019-07-12 16:41:56 -05:00
James Prestwood 7286a12240 station: build roaming consortium IE for netdev_connect
Per the hotspot 2.0 spec, if a matching roaming consortium OI is
found it should be added to the (Re)Association request. vendor_ies
can now be provided to netdev_connect, which get appended to the IE
attribute.
2019-07-12 16:13:50 -05:00
James Prestwood f57ba70235 netdev: Allow to send extra vendor IEs when connecting 2019-07-12 16:13:01 -05:00
James Prestwood 79a9fdf123 hotspot: add API to get a matching roaming consortium
This API will attempt to find a matching roaming consortium OI
if present in the config file. A single matching OI is returned
or NULL if one was not found.
2019-07-12 14:13:25 -05:00
James Prestwood 27d670f432 hotspot: allow roaming consortium OI matching
Hotspot 2.0 network providers allow 'roaming' between a users home
network and other providers networks, assuming they are part of the
same roaming consortium. The roaming consortium is advertised as an
IE in beacon/probe frames.

In terms of the hotspot config files this is similar to HESSID, where
if the AP advertises the roaming consortium IE, and the config file
matches we do not need to do ANQP in order to connect.
2019-07-12 14:10:57 -05:00
James Prestwood aeae6abcbb network: add roaming consortium IE to network object
This is duplicated when the first scan_bss is added to a network
object that contains the IE. Any future BSS's added will not re-add
the IE. Its assumed that all BSS's under a network will contain the
same roaming consortium OIs.
2019-07-12 14:05:36 -05:00
James Prestwood 9dcb6946c5 scan: parse roaming consortium IE 2019-07-12 14:03:36 -05:00
James Prestwood ac933ad966 ie: add parsing/building for roaming consortium
Parses up to 3 (the max) roaming consortium OIs out of the roaming
consortium IE. If more OIs are available via ANQP the 'num_anqp_out'
value will be set to indicate how many more OIs are available.

Builds according to the hotspot 2.0 spec using the vendor specific
IE.
2019-07-12 14:02:18 -05:00
Denis Kenzior 5db07af7be AUTHORS: Mention Eduardo's contributions 2019-07-12 09:37:20 -05:00
Eduardo Abinader 094a9ecdfa main: print version arg 2019-07-12 09:36:34 -05:00
Denis Kenzior 0b5113acde TODO: Mark 4addr task as done 2019-07-10 22:20:13 -05:00
Denis Kenzior b62691e8a9 gitignore: Add test-p2p 2019-07-10 17:02:16 -05:00
Denis Kenzior de131b54b8 netdev: Use RRM & send RM Enabled Capabilities IE
If supported by the wiphy and if the target AP supports Radio Management
capability, then send the relevant IE and set the USE_RRM flag on
nl80211
2019-07-10 17:01:31 -05:00
Denis Kenzior fcb2d123bc netdev: Send extended capabilities IE on connect 2019-07-10 17:01:31 -05:00
Denis Kenzior 37610cf868 wiphy: Parse driver extended capabilities 2019-07-10 17:01:31 -05:00
Denis Kenzior c60b0ed3cf monitor: Dump additional attributes 2019-07-10 17:01:19 -05:00
Denis Kenzior eb86da3b4b wiphy: Add wiphy_rrm_capable 2019-07-10 16:46:29 -05:00
Denis Kenzior 7b48da5df2 ie: Update Capability field defines 2019-07-10 16:46:05 -05:00
Andrew Zaborowski 38099f75d6 unit: Add p2putil tests 2019-07-08 22:16:16 -05:00
Andrew Zaborowski 14a1e322b4 p2putil: Builders for P2P action frames 2019-07-08 22:08:36 -05:00
Andrew Zaborowski cd3c0ad155 p2putil: Builders for management frames P2P payloads 2019-07-08 22:08:15 -05:00
Andrew Zaborowski 67f91605eb p2putil: Parsers for P2P action frames
Add parsers for P2P-related Action frames and Public Action frames.
2019-07-08 22:04:12 -05:00
Andrew Zaborowski 81d17b3d43 p2putil: Parsers for management frames P2P payloads 2019-07-08 22:03:53 -05:00
Andrew Zaborowski 1f637cb054 p2putil: Add P2P frame type structures and utilities
Declare structures to hold the parsed contents of the P2P IEs and WSC
IEs in P2P-related frames and add functions to free memory used by
those structures.
2019-07-08 22:03:20 -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 42c7ab0bae p2putil: Add P2P attribute parsers
Define structs and types for most P2P attributes and p2p_parse_attrs
similar to wsc_parse_attrs -- a generic parser for attributes in a P2P
IE payload.  This parser may write into the provided buffer even on
error but it's private to p2putil.c.  The local callers will take care
of keeping the user-provided buffers untouched on error.
2019-07-08 21:39:59 -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
Andrew Zaborowski 614fc0261f p2putil: Add P2P-related declarations and iterator
Add enums defining the values from the spec that we're going to be using
and add an iterator for P2P payload attributes similar to wsc_attr_iter.
2019-07-08 13:58:35 -05:00
Andrew Zaborowski 79dd14cb24 wscutil: Add wsc_build_p2p_attrs
Add a utility for building the simplified WSC IEs used in P2P action
frames and public action frames.  Only three types of WSC attributes are
mandatory in those frames (but different subsets are needed by different
frame types) so add a single utility for building those IEs.  We may
need to add some more optional attributes to those IEs later.
2019-07-08 13:46:53 -05:00
Andrew Zaborowski cc913a6ff6 wscutil: Make wsc_parse_attrs public for P2P 2019-07-08 13:45:54 -05:00
Andrew Zaborowski f8a51fe4c1 wscutil: Make the primary device type parser public
The P2P IE parsers can take advantage of this function
2019-07-08 13:43:24 -05:00
Andrew Zaborowski 5a40c49c44 mpdu: Validate action frame minimum length
Action frames must at least have the Category byte
2019-07-08 13:42:22 -05:00
Andrew Zaborowski 3bd265e02f ie: Add ie_tlv_encapsulate_p2p_payload 2019-07-08 13:41:18 -05:00
Andrew Zaborowski 5cb07ff116 ie: Add ie_tlv_extract_p2p_payload 2019-07-08 13:37:47 -05:00