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

5869 Commits

Author SHA1 Message Date
Andrew Zaborowski
002fc2d632 station: Check if busy in station_get_diagnostics 2021-06-18 09:58:42 -05:00
Denis Kenzior
653821c521 AUTHORS: Mention Joseph's contributions 2021-06-14 09:09:17 -05:00
Joseph Benden
7436cef012 eapol: Use constant-time comparison
This closes the possibility of a timing attack against PMKIDs.
2021-06-14 09:07:53 -05:00
Andrew Zaborowski
2a37dba4bf autotest: Improve cleanup in testP2P
Make sure some of the processes and files created are also cleaned up on
failure so that the next chance has a chance to succeed anyway.
2021-06-14 09:02:34 -05:00
Marcel Holtmann
6d47354e63 Release 1.15 2021-06-12 14:32:08 +02:00
Marcel Holtmann
37896485b6 build: Require at least version 0.41 when building with external ELL 2021-06-11 20:18:25 +02:00
Denis Kenzior
a5f3aed1ef README: Mention channel move to oftc 2021-06-09 14:28:12 -05:00
Denis Kenzior
049cb701d0 doc: No reply expected/wanted from Cancel/Release 2021-06-09 10:35:35 -05:00
Denis Kenzior
eb84e29c81 agent: Send Release/Cancel with no_reply flag set
These method calls did not process or expect a reply.
2021-06-09 10:34:22 -05:00
Denis Kenzior
051a911840 doc: Fix SignalLevelAgent API signatures
The Changed() method did not actually return anything, and in fact the
no_reply flag for that message was set.

Similarly, the Release method does not expect a reply.
2021-06-09 10:32:32 -05:00
Andrew Zaborowski
d9c324a511 netconfig: Make gateway optional for client
Don't require a gateway address from the settings file or from the DHCP
server when doing netconfig.  Failing when the gateway address was
missing was breaking P2P but also small local networks.
2021-06-08 10:25:49 -05:00
Denis Kenzior
7f4dd181b2 ip-pool: Take out un-needed cast 2021-06-07 17:30:25 -05:00
Denis Kenzior
3dcf1fd9d8 ip-pool: Sanity check addr_str_list 2021-06-07 17:22:43 -05:00
Andrew Zaborowski
c295fba546 ip-pool: Validate prefix lengths in used addresses
Be paranoid and check that the prefix length in addresses from
used_addr4_list are not zero (they shouldn't be) and that address family
is AF_INET (it should be), mainly to quiet coverity warnings:

While there also fix one line's indentation.
2021-06-07 17:03:23 -05:00
Andrew Zaborowski
b1c8a57047 ip-pool: Make host address valid even if prefix_len != 24
At the end of ip_pool_select_addr4() we'd check if the selected address
is equal to the subnet address and increment it by 1 to produce a valid
host address for the AP.  That check was always correct only with 24-bit
prefix, extend it to actually use the prefix-dependent mask instead of
0xff.  Fixes a testAP failure triggered 50% of the times because the
netmask is 28 bit long there.
2021-06-07 17:02:09 -05:00
Denis Kenzior
de83176b04 auto-t: Drop RSSI even lower
The VHT AP reports NSS:8, so it is still highly preferred even in very
low signal situations.
2021-06-04 15:33:55 -05:00
Denis Kenzior
6f99368935 ip-pool: Use inet_ntop instead of inet_ntoa 2021-06-04 14:11:25 -05:00
Denis Kenzior
e7529fc7de unit: Use inet_ntop instead of inet_ntoa 2021-06-04 14:00:27 -05:00
Denis Kenzior
094537efc6 netconfig: Use inet_ntop instead of inet_ntoa 2021-06-04 13:53:31 -05:00
Denis Kenzior
772aa687d7 ip-pool: Do not use inet_aton 2021-06-04 12:31:53 -05:00
Denis Kenzior
75a9199bc4 ap: Do not use inet_aton 2021-06-04 12:31:36 -05:00
Andrew Zaborowski
f9907cdaac doc: Document autotests' wpa_supplicant dependency 2021-06-04 11:56:55 -05:00
Andrew Zaborowski
e583bc470f autotests: Add P2P GO role test scenarios
autotests/testP2P/client_test.py is renamed to connection_test.py to
reflect that it now tests both roles.
2021-06-04 11:56:48 -05:00
Andrew Zaborowski
0be475af3c autotests: Add missing space in wpas P2P_CONNECT commands 2021-06-04 11:56:40 -05:00
Andrew Zaborowski
c54ba7158c autotests: Initialise P2PPeer objects with correct namespace 2021-06-04 11:56:32 -05:00
Andrew Zaborowski
617e99a423 p2p: Set Linkmode/operstate on GO connection 2021-06-04 11:56:23 -05:00
Andrew Zaborowski
04bfe55c36 p2p: As GO delay connect success until client gets IP
Don't signal the connected state until the client has obtained a DHCP
lease and we can set the ConnectedIP property.  From now on that
property is always set when there's a connection.
2021-06-04 11:56:02 -05:00
Andrew Zaborowski
f7c6fe0ed6 p2p: Also set a DHCP timeout in Group Owner role
Move the loading of the [P2P].DHCPTimeout setting to initialization and
set the timeout both in P2P Client and P2P GO roles.
2021-06-04 11:55:29 -05:00
Andrew Zaborowski
0e865a7028 ap: Forward DHCP events to AP event handler 2021-06-04 11:55:06 -05:00
Andrew Zaborowski
42afc31cbe p2p: Fix parsing of Association Req P2P IEs
p2p_parse_association_req() already extracts the P2P IE payload from the
IE sequence, there's no need to call ie_tlv_extract_p2p_payload before
it.  Pass the IE sequence directly to p2p_parse_association_req().
2021-06-04 11:54:48 -05:00
Andrew Zaborowski
1399b5688b p2p: Fix a leak of ie_tlv_extract_p2p_payload() result 2021-06-04 11:54:40 -05:00
Andrew Zaborowski
69d9a07e34 p2putil: Ensure non-negative index in p2p_get_random_string 2021-06-04 11:53:31 -05:00
Andrew Zaborowski
d96f542951 wscutil: Fix a return statement
Fixes: 8d58f5b679 ('wscutil: Move DeviceType parsing from p2p & eap-wsc to a function')
2021-06-04 11:53:25 -05:00
Andrew Zaborowski
ec9260fa0c ap: Fix leaking of ap->wsc_pbc_timeout 2021-06-04 11:53:20 -05:00
Andrew Zaborowski
aa9a914975 ap: Warn about APRanges having been deprecated 2021-06-04 11:53:14 -05:00
Andrew Zaborowski
e9a33524a2 ap: Drop unneeded broadcast address calculation
It's already done in l_rtnl_address_new().
2021-06-04 11:53:04 -05:00
Denis Kenzior
45c7aa0d18 netconfig: Check l_rtnl_address_get_address return 2021-06-04 10:26:18 -05:00
Denis Kenzior
03b48b5621 station: Pretty-print the estimated BSS data rate 2021-06-04 10:14:04 -05:00
Denis Kenzior
647f1e9b91 ie: Remove old data rate estimation utilities 2021-06-04 10:14:04 -05:00
Denis Kenzior
297cde85bc unit: Remove test case
This has been superceded by tests in unit/test-band.c
2021-06-04 10:14:04 -05:00
Denis Kenzior
43692cb377 wiphy: Use new data rate estimation utilities 2021-06-04 10:14:04 -05:00
Denis Kenzior
6111706911 unit: Add unit test for non-HT data rate estimate 2021-06-04 10:14:04 -05:00
Denis Kenzior
2d480f12e1 band: Add utility for estimating non-ht data rate 2021-06-04 10:14:04 -05:00
Denis Kenzior
3450bca695 unit: Add unit test for HT RX data rate estimation 2021-06-04 10:14:04 -05:00
Denis Kenzior
575f603f89 band: Add HT RX rate estimation
Similarly to commit
27d302a0 ("band: Add a utility to estimate VHT rx data rate"), this
commit adds an RX data rate estimation utility for HT connections.
2021-06-04 10:14:04 -05:00
Denis Kenzior
2686baae69 unit: Add unit test for VHT RX data rate estimation 2021-06-04 10:14:04 -05:00
Denis Kenzior
a17745661e band: Add a utility to estimate VHT rx data rate
This function is meant to supercede a similar function in ie.c.  The
current approach results in very optimistic data rate estimates since it
only takes into account the VHT/HT Capabilities IEs.  It does not take
into account any local hardware limitations (such as no VHT/HT support),
limited RX MCS sets & number of spatial streams.  It also does not take
into account that the AP might not be actually operating on higher
bandwidth channels.

This function is meant to address that by matching peer TX MCS sets with
the local hardware RX MCS set capability.  It also takes into account
channel bandwidth capabilities of the local hardware, as well as whether
the AP is actually operating on a wider channel.
2021-06-04 10:14:04 -05:00
Denis Kenzior
842a70a307 band: Move ht/vht data rate calculation out of ie.c 2021-06-04 10:14:04 -05:00
Denis Kenzior
e41bee377d band: Add band.[ch]
Move the band definition out of wiphy.c and into band.[ch].  This is
done to make certain utilities that depend on band information capable
of being tested from unit tests.

The band concept will most likely grow over time.  For now, the only
user will be wiphy.c and unit tests, so the structures are kept public.
2021-06-04 10:14:04 -05:00
Denis Kenzior
46f6fb1bd1 netconfig: Cancel pending address set command
It is possible that the address set command succeeds just after a
netconfig object has been destroyed.

==6485== Invalid read of size 8
==6485==    at 0x458A6D: netconfig_ipv4_routes_install (netconfig.c:629)
==6485==    by 0x458D1C: netconfig_ipv4_ifaddr_add_cmd_cb (netconfig.c:689)
==6485==    by 0x4A5E7B: process_message (netlink.c:181)
==6485==    by 0x4A626A: can_read_data (netlink.c:289)
==6485==    by 0x4A3E19: io_callback (io.c:120)
==6485==    by 0x4A27B5: l_main_iterate (main.c:478)
==6485==    by 0x4A28F6: l_main_run (main.c:525)
==6485==    by 0x4A2C0E: l_main_run_with_signal (main.c:647)
==6485==    by 0x404D27: main (main.c:542)
==6485==  Address 0x4a47290 is 32 bytes inside a block of size 104 free'd
==6485==    at 0x48399CB: free (vg_replace_malloc.c:538)
==6485==    by 0x49998B: l_free (util.c:136)
==6485==    by 0x457699: netconfig_free (netconfig.c:130)
==6485==    by 0x45A038: netconfig_destroy (netconfig.c:1163)
==6485==    by 0x41FD16: station_free (station.c:3613)
==6485==    by 0x42020E: station_destroy_interface (station.c:3710)
==6485==    by 0x4B990E: interface_instance_free (dbus-service.c:510)
==6485==    by 0x4BC193: _dbus_object_tree_remove_interface (dbus-service.c:1694)
==6485==    by 0x4BA22A: _dbus_object_tree_object_destroy (dbus-service.c:795)
==6485==    by 0x4B078D: l_dbus_unregister_object (dbus.c:1537)
==6485==    by 0x417ACB: device_netdev_notify (device.c:361)
==6485==    by 0x4062B6: netdev_free (netdev.c:808)
==6485==  Block was alloc'd at
==6485==    at 0x483879F: malloc (vg_replace_malloc.c:307)
==6485==    by 0x499857: l_malloc (util.c:62)
==6485==    by 0x459DC0: netconfig_new (netconfig.c:1115)
==6485==    by 0x41FC29: station_create (station.c:3592)
==6485==    by 0x4207B3: station_netdev_watch (station.c:3864)
==6485==    by 0x411A17: netdev_initial_up_cb (netdev.c:5588)
==6485==    by 0x4A5E7B: process_message (netlink.c:181)
==6485==    by 0x4A626A: can_read_data (netlink.c:289)
==6485==    by 0x4A3E19: io_callback (io.c:120)
==6485==    by 0x4A27B5: l_main_iterate (main.c:478)
==6485==    by 0x4A28F6: l_main_run (main.c:525)
==6485==    by 0x4A2C0E: l_main_run_with_signal (main.c:647)
==6485==
2021-06-04 10:14:04 -05:00