3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-03 01:48:49 +02:00
Commit Graph

3697 Commits

Author SHA1 Message Date
Tim Kourt
c3e79a4f2a network: Introduce a concept of known frequencies
Each known network (previously connected) will have a set
of known frequencies associated with it, e.g. a set of
frequencies from all BSSs observed. The list of known
frequencies is sorted with the most recently observed
frequency in the head.
2019-04-15 12:29:48 -05:00
Tim Kourt
8881910662 station: Start removing scan results based on age
Previously, the scan results were disregarded once the new
ones were available. To enable the scan scenarios where the
new scan results are delivered in parts, we introduce a
concept of aging BSSs and will remove them based on
retention time.
2019-04-15 12:25:30 -05:00
Marcel Holtmann
170125aa01 Release 0.17 2019-04-12 21:51:30 +02:00
Tim Kourt
e01368b848 scan: Add randomization of SN for probe requests 2019-04-11 16:57:07 -05:00
Tim Kourt
b1d77d52b9 scan: Use randomization flag only for active scans 2019-04-11 16:56:44 -05:00
Tim Kourt
91105768e0 knownnetworks: Enable setting Autoconnect property over DBus 2019-04-11 12:09:27 -05:00
Denis Kenzior
5a28504d9e manager: Simplify logic 2019-04-11 12:09:07 -05:00
Denis Kenzior
72158e66da main: Move manager initialization
The order of wiphy / netdev dumps matters.  So to preserve the old
behavior, move manager initialization up.
2019-04-11 12:09:07 -05:00
Andrew Zaborowski
65109ec46d wiphy: Drop wiphy creation logic 2019-04-11 11:20:04 -05:00
Andrew Zaborowski
530a449337 manager: Add new file for wiphy/interface management
Add manager.c, a new file where the wiphy and interface creation/removal
will be handled and interface use policies will be implemented.  Since
not all kernel-side nl80211 interfaces are tied to kernel-side netdevs,
netdev.c can't manage all of the interfaces that we will be using, so
the logic is being moved to a common place where all interfaces on a
wiphy will be managed according to the policy, device support for things
like P2P and user enabling/disabling/connecting with P2P which require
interfaces to be dynamically added and removed.
2019-04-11 11:17:52 -05:00
Andrew Zaborowski
4a969294f7 wiphy: Add wiphy_create/wiphy_destroy API
Add wiphy_create, wiphy_update_from_genl and wiphy_destroy that together
will let a new file command the wiphy creation, updates and deletion
with the same functionality the current config notification handler
implements in wiphy.c.
2019-04-11 11:15:10 -05:00
Andrew Zaborowski
fd0892baf0 wiphy: Make wiphy_parse_id_and_name public 2019-04-11 11:13:28 -05:00
Andrew Zaborowski
c06754a978 wiphy: Drop name_len from wiphy_parse_id_and_name
As mentioned in code comments the name is NUL-terminated so there's no
need to return the length path, which was ignored in some occasions
anyway.  Consistently treat it as NUL-terminated but also validate.
2019-04-11 11:11:52 -05:00
Andrew Zaborowski
8f910518c4 netdev: Make netdev_create_from_genl, netdev_destroy public
Make netdev_create_from_genl public and change signature to return the
created netdev or NULL.  Also add netdev_destroy that destroys and
unregisters the created netdevs.  Both will be used to move the
whole interface management to a new file.
2019-04-11 11:04:16 -05:00
Andrew Zaborowski
9aa2c8dae0 test: Update list-known-networks use of DBus API 2019-04-11 11:01:33 -05:00
Andrew Zaborowski
ceb605a2cc dbus: Add p2p iftypes in dbus_iftype_to_string 2019-04-11 11:01:09 -05:00
Tim Kourt
e343162531 client: Add 'set-property' cmd for known networks 2019-04-11 10:57:14 -05:00
Tim Kourt
c7855af5d5 client: Add 'Autoconnect' property for known networks 2019-04-11 10:56:55 -05:00
Tim Kourt
531bb3f0b5 knownnetworks: Load Autoconnect along with other settings
Previously, 'Autoconnect' setting was loaded only at the
connection time, this patch makes autoconnect to load along
with other settings.
2019-04-11 10:55:22 -05:00
Tim Kourt
bb33c5db8c client: Add 'Yes', 'No' property type support
This property type will be used for the argument completion among
the properties that require Yes or No value.
2019-04-11 10:54:07 -05:00
Tim Kourt
f5674a2356 client: Eliminate property_value_options struct
property_value_options is replaced with an array of strings
that represent value options for the properties
2019-04-11 10:53:17 -05:00
Tim Kourt
f1e5bc0645 client: Add 'show' cmd for known networks 2019-04-11 10:53:05 -05:00
Tim Kourt
d081f5f871 client: Switch known-networks cmd pattern to common scheme
Switch the command pattern to match the common command scheme
where the entity name (network name) follows the command family name:
From
	known-network forget <network name>
To
	known-network <network name> forget

In addition, it extracts the network match by name logic into its
own function for the further reusability. In the case of ambiguity
between the network objects with the same SSID but different security
types the logic asks to specify the security type in addition
to the network name as follows:
	known-network <network name.security> forget
2019-04-11 10:53:03 -05:00
Tim Kourt
4fa5a9869b client: Add arg completion for the known networks
Enables tab-completion for the network names in known networks
command family. In addition, tab-completion is added for the
entity commands.
2019-04-11 10:51:13 -05:00
James Prestwood
43c1bdfd62 sae: check if server point/scalar is valid
Reported-By: Mathy Vanhoef <Mathy.Vanhoef@nyu.edu>
2019-04-11 10:19:54 -05:00
James Prestwood
9192f506d3 eap-pwd: check if server point/scalar is valid
Reported-By: Mathy Vanhoef <Mathy.Vanhoef@nyu.edu>
2019-04-11 10:19:38 -05:00
James Prestwood
f9d92d6cdd eap: add eap_get_identity 2019-04-10 16:57:07 -05:00
James Prestwood
81fc6a687e handshake: add flag for FILS support
The handshake_state only holds a single AKM value. FILS depends on the AP
supporting EAP as well as FILS. The first time IWD connects, it will do a
full EAP auth. Subsequent connections (assuming FILS is supported) will use
FILS. But if the AP does not support FILS there is no reason to cache the
ERP keys.

This adds the supp_fils to the handshake_state. Now, station.c can set this
flag while building the handshake. This flag can later be checked when
caching the ERP keys.
2019-04-10 16:57:05 -05:00
James Prestwood
e963e64f9b eap: export session ID as key materials
ERP/FILS requires the session ID which is derived internally to an
EAP method.
2019-04-10 16:55:29 -05:00
James Prestwood
5df84a6933 erpcache: implementation for ERP key cache
This allows IWD to cache ERP keys after a full EAP run. Caching
allows IWD to quickly connect to the network later on using ERP or
FILS.

The cache will contain the EAP Identity, Session ID, EMSK, SSID and
optionally the ERP domain. For the time being, the cache entry
lifetimes are hard coded to 24 hours. Eventually the cache should
be written to disk to allow ERP/FILS to work after a reboot or
IWD restart.
2019-04-10 13:58:13 -05:00
Tim Kourt
b30b84373d client: Fix property completion mem leak 2019-04-09 00:05:07 -05:00
Tim Kourt
bb4f4c8159 client: Remove DBus disconnect message 2019-04-09 00:04:47 -05:00
Tim Kourt
6e8ad37ff3 client: Use proper output func 2019-04-09 00:04:47 -05:00
Tim Kourt
3d0f1dae12 client: Remove 'quit' message 2019-04-09 00:04:47 -05:00
Denis Kenzior
9f5d2e4475 .gitignore: Update for renamed unit test 2019-04-09 00:03:08 -05:00
James Prestwood
27f7a523b4 unit: add tests for util_get_{domain,username}
test-ssid-to-utf8 was hijacked and renamed to test-util, and
two tests were added for the new utility functions.
2019-04-08 16:30:41 -05:00
James Prestwood
1e337259ce mschaputil: use util_get_username 2019-04-08 16:28:56 -05:00
Denis Kenzior
86ce4a8b09 util: Add qualifying comments 2019-04-08 16:28:37 -05:00
James Prestwood
abcc9f1647 util: add APIs to get username/domain from identity
mschaputil already had similar functionality, but ERP will need this
as well. These two functions will also handle identities with either
'@' or '\' to separate the user and domain.
2019-04-08 16:26:25 -05:00
Denis Kenzior
44ebf10bb9 eap: Make sure identity is not NULL 2019-04-08 16:25:31 -05:00
Denis Kenzior
716e3f0cda eap: Add eap_free_common
Many operations performed during an error in load_settings were the same
as the ones performed when freeing the eap object.  Add eap_free_common
to unify these.
2019-04-08 16:24:18 -05:00
James Prestwood
875c6f27e7 eap: enforce max identity lengths
EAP identites are recommended to follow RFC 4282 (The Network Access
Identifier). This RFC recommends a maximum NAI length of 253 octets.
It also mentions that RADIUS is only able to support NAIs of 253
octets.

Because of this, IWD should not allow EAP identities larger than 253
bytes. This change adds a check in eap_load_settings to verify the
identity does not exceed this limit.
2019-04-08 16:18:47 -05:00
Tim Kourt
4ea6523b19 doc: Change interface naming after migration 2019-04-08 14:46:48 -05:00
Tim Kourt
3f41b8a1cc doc: Document 'Autoconnect' property for known networks 2019-04-08 14:46:48 -05:00
James Prestwood
e9618d97a8 crypto: add kdf_sha384
FILS requires the SHA384 KDF variant.
2019-04-05 17:58:03 -05: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
a71adcc243 netdev: skip associate event when not in OWE/FT
The associate event is only important for OWE and FT. If neither of
these conditions (or FT initial association) are happening we do
not need to continue further processing the associate event.
2019-04-05 17:35:31 -05:00
James Prestwood
c416db0708 common: fix missing PSK_SHA256 AKM
This AKM was lost while moving all the AKM checks into a the macros
2019-04-05 17:32:01 -05:00
Denis Kenzior
9c6589a6ad unit: Update to the new validate_mgmt_ies behavior 2019-04-05 16:31:30 -05:00
Denis Kenzior
8f9ed66bdd mpdu: Rework validate_mgmt_ies
802.11 mandates that IEs inside management frames are presented in a
given order.  However, in the real world, many APs seem to ignore the
rules and send their IEs in seemingly arbitrary order, especially when
it comes to VENDOR tags.  Change this function to no longer be strict in
enforcing the order.

Also, drop checking of rules specific to Probe Responses.  These will
have to be handled separately (most likely by the AP module) since
802.11-2016, Section 11.1.4.3.5 essentially allows just about anything.
2019-04-05 16:31:26 -05:00