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

2758 Commits

Author SHA1 Message Date
Andrew Zaborowski
7b45ad220d test-runner: Fix the has_virt flag usage
Use the same machine type regardless of has_virt: q35 with accelerators
list set to kvm:tcg, this will use KVM if available and fall back to TCG
if not available so there's no point checking has_virt.  We can't
reliably know if KVM is usable anyway: even if the CPU has the
virtualization extensions, the support might not be enabled in the QEMU
build or there may be no kernel module or we may be calling a different
qemu executable than the one supporting KVM.

Set CPU type to "host" if KVM available and "max" otherwise because
"host" is not supported without KVM.  We actually want to emulate the
host CPU as closely as possible so that host executables can run even if
optimized for the specific CPU.  "max" seems to be the new way (since
Feb only) to request "host" cpu without KVM.  It seems that the idea is
for "max" to become same as "host" if KVM is enabled so at some point we
will want to switch to using "max" in both cases.

The "level=9" flag seems to have been an error, there's no CPU with
cpuid max level of 9 and I can't see the purpose of setting the cpuid
level other than the host cpu's level.

-enable-kvm is redundant with accel=kvm:tcg in current qemu.

Again I'm not able to test this patch on a cpu that would be affected
by it but I hope this fixes some situations which are currently broken
anyway.
2017-05-16 15:56:06 -05:00
Andrew Zaborowski
a74c34024a test-runner: Check for SVM in check_virtualization
Update check_virtualization to check for the SVM on x86, KVM supports
both VMX and SVM.  Fix the clobber list of the VMX check: memory is not
clobbered while ebx and edx are (ecx is already marked as output).

I'm not able to test this patch on a cpu that would be affected by it
but I don't think test-runner has been tested on those cpus yet.
2017-05-16 15:31:09 -05:00
Andrew Zaborowski
920e79b32c autotests: Add IWD.wait utility for sleeping inside tests 2017-05-16 15:29:53 -05:00
Andrew Zaborowski
b1d0dbc3e4 linux: update nl80211.h to 4.12-rc1
Update nl80211.h to the version at include/uapi/linux/nl80211.h in
4.12-rc1 - today Linus tree HEAD.
2017-05-16 14:33:18 -05:00
Denis Kenzior
b59977262b handshake: Fix valgrind warning
==27901== Conditional jump or move depends on uninitialised value(s)
==27901==    at 0x41157A: handshake_util_find_pmkid_kde
(handshake.c:537)
==27901==    by 0x40E03A: eapol_handle_ptk_1_of_4 (eapol.c:852)
==27901==    by 0x40F3CD: eapol_key_handle (eapol.c:1417)
==27901==    by 0x40F955: eapol_rx_packet (eapol.c:1607)
==27901==    by 0x410321: __eapol_rx_packet (eapol.c:1915)
2017-05-15 15:23:03 -05:00
Tim Kourt
305af40636 client: fix display completion leak 2017-05-12 17:46:44 -05:00
Tim Kourt
89351da35f client: Add WSC list command 2017-05-12 17:46:44 -05:00
Tim Kourt
b530f4fb77 client: add completion for the cmds without entity 2017-05-12 17:46:44 -05:00
Tim Kourt
8eaeb66220 client: check for WSC-capability in arg completion 2017-05-12 17:46:44 -05:00
Tim Kourt
006e60d291 client: allow interface search by NULL property 'value' 2017-05-12 17:46:44 -05:00
Tim Kourt
14a18ce3df client: Add basic ops for wsc 2017-05-12 17:46:44 -05:00
Tim Kourt
1fed159f4a client: fix leaks 2017-05-12 14:38:03 -05:00
Denis Kenzior
b36dd5203e network: Sort out reference counting
Agent implementation inside agent.c takes a reference of the trigger
message associated with the request.  When the callback is called, the
message is passed as an argument.  The callback is responsible for
taking the message reference if necessary.  Once the callback returns,
agent releases its reference.

For error paths, our code was using dbus_pending_reply which in turn
uses dbus_message_unref.  This caused the agent to try an unref
operation on an already freed object.
2017-05-11 19:50:05 -05:00
Tim Kourt
50d04e99a7 Makefile: install iwd-dbus.conf 2017-05-04 18:03:13 -05:00
Tim Kourt
54cab3bf6c configure: introduce dbusconfdir 2017-05-04 18:03:08 -05:00
Andrew Zaborowski
fb4ba71952 main: Don't init nl80211 if we're terminating
Don't enter nl80211_appeared if we're already terminating and inside the
1 second timeout.  This fixes a potential crash in device_free() caused
by a netdev_init() and a netdev_exit() happening without netdev_shutdown
in between.  netdev_shutdown has already run if terminating is true.

src/main.c:main() Opening nl80211 interface
src/eap.c:__eap_method_enable()
src/eap-wsc.c:eap_wsc_init()
src/eap-md5.c:eap_md5_init()
src/eap-tls.c:eap_tls_init()
src/eap-ttls.c:eap_ttls_init()
src/eap-mschapv2.c:eap_mschapv2_init()
Terminate
src/main.c:nl80211_appeared() Found nl80211 interface
src/netdev.c:netdev_init() Opening route netlink socket
src/wiphy.c:protocol_features_callback() Found split wiphy dump support
src/wiphy.c:regulatory_info_callback() Regulatory alpha2 is 00
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:parse_supported_bands()
src/wiphy.c:parse_supported_frequencies()
src/wiphy.c:parse_supported_frequencies()
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad1
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad1
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad1
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad1
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad1
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad1
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad0
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad0
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad0
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad0
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad0
src/wiphy.c:wiphy_dump_callback()
src/wiphy.c:wiphy_is_managed() whitelist filtered phy: rad0
Wiphy: 2, Name: rad2
Bands: 2.4 GHz 5 GHz
Ciphers: CCMP TKIP BIP
src/netdev.c:netdev_create_from_genl() Created interface wln2[6]
src/netdev.c:netdev_initial_up_cb() Interface 6 initialized
src/device.c:device_enter_state() Old State: off, new state:
autoconnect
src/scan.c:scan_periodic_start() Starting periodic scan for
ifindex: 6
src/scan.c:scan_notify() Scan notification 33
src/netdev.c:netdev_operstate_dormant_cb() netdev: 6, success: 1
src/scan.c:scan_periodic_done()
src/scan.c:scan_periodic_done() Periodic scan triggered for
ifindex: 6
src/eap.c:__eap_method_disable()
src/eap-wsc.c:eap_wsc_exit()
src/eap-md5.c:eap_md5_exit()
src/eap-tls.c:eap_tls_exit()
src/eap-ttls.c:eap_ttls_exit()
src/eap-mschapv2.c:eap_mschapv2_exit()
src/main.c:nl80211_vanished() Lost nl80211 interface
src/wsc.c:wsc_exit()
src/scan.c:scan_exit()
src/scan.c:scan_context_free() sc: 0x5434ab0
src/netdev.c:netdev_exit() Closing route netlink socket
src/wiphy.c:wiphy_free() Freeing wiphy rad2[2]
device_list isn't empty!
src/device.c:device_free()
(crash here)
2017-05-04 10:50:33 -05:00
Andrew Zaborowski
33f8b1f53d dbus: Use the shutdown procedure instead of l_main_quit
Move the calling of the *_shutdown functions from the signal handler to
a new public function, and use that function inside the DBus disconnect
handler to make sure resources are cleanly released.
2017-05-04 10:50:29 -05:00
Andrew Zaborowski
faba9d509a eapol: After EAP skip the RSNE PMKID check in step 1/4
Skip the matching of the PMKID KDE to the PMKID list in the RSNE if
we've seen a new EAP authentication before the step 1/4 was received.
That would mean that the server had not accepted the PMKIDs we submitted
and we performed a new 8021X authentication, producing a new PMKSA which
won't be on the list in the RSNE.
2017-05-04 10:50:29 -05:00
Tim Kourt
681f9355ad client: fix typos 2017-05-02 16:43:24 -05:00
Tim Kourt
cb40e36ea1 client: introduce psk agent manager 2017-05-02 14:11:00 -05:00
Tim Kourt
8080789d77 client: add properties interface into ignorable list 2017-05-01 16:57:56 -05:00
Tim Kourt
893a0e67b2 client: add subscription for the property updates 2017-05-01 13:46:49 -05:00
Tim Kourt
03f517a1f7 client: Add WSC-capable indication for device 2017-05-01 13:44:00 -05:00
Tim Kourt
53980c98d8 client: WSC 'start-pin' command 2017-05-01 13:43:31 -05:00
Tim Kourt
e4261d164d client: WSC start-user-pin command 2017-05-01 13:43:22 -05:00
Tim Kourt
c6045ff100 client: WSC PushButton command 2017-05-01 13:43:14 -05:00
Tim Kourt
ff5e3f3b52 client: WSC cancel command 2017-05-01 13:42:37 -05:00
Tim Kourt
87b4f282db client: device dependency binder 2017-05-01 13:42:25 -05:00
Tim Kourt
b1d261a790 client: add WSC argument completers 2017-05-01 13:42:21 -05:00
Tim Kourt
ccb3afc1f1 client: define WSC commands 2017-05-01 13:41:51 -05:00
Tim Kourt
ee369bacc9 client introduce wsc interface 2017-05-01 13:40:14 -05:00
Andrew Zaborowski
f0fb1d2c89 autotests: Add a Preauthentication test
Unfortunately this doesn't currently ensure that the preauthentication
has succeeded and that later the PMKSA from the preauthentication was
used in the transition, only that the preauthentication process doesn't
break the transition.  For now this can be confirmed by looking at the
testrunner -v output to see that the line "EAP completed with eapSuccess"
appears before the following line, and not after:

src/device.c:device_enter_state() Old State: connected, new state: roaming
2017-05-01 11:24:17 -05:00
Andrew Zaborowski
a620a02d35 device: In roam, preauthenticate to target BSS if supported
If FT is not possible and we're using 8021x try to preauthenticate to
target BSS before reassociation to it.
2017-05-01 11:24:04 -05:00
Andrew Zaborowski
08e863cb7e netdev: Add netdev_preauthenticate
Add preauthentication logic.  The callback receives the new PMK only.
2017-05-01 11:19:06 -05:00
Andrew Zaborowski
b910784e83 eapol: Add preauth_sm class, drop eapol_sm.preauth
Remove the preauthentication support code from the normal eapol_sm
methods and add a separate simplified class that only handles EAP
packets.
2017-05-01 11:13:32 -05:00
Tim Kourt
b2ea962a67 client: remove unused function 2017-04-28 15:02:15 -05:00
Tim Kourt
6a06623b0d client: exclude unicode characters 2017-04-28 13:27:05 -05:00
Tim Kourt
cd3d9a26c1 client: add null check for adapter proxy 2017-04-28 13:27:05 -05:00
Tim Kourt
44e9e604f6 client: change str representation of bool fields 2017-04-28 13:27:05 -05:00
Tim Kourt
d5c7fea13d client: Implement 'list, show' adapter commands 2017-04-27 15:14:22 -05:00
Tim Kourt
81172d0932 client: Define commands for adapter interface 2017-04-27 15:14:05 -05:00
Tim Kourt
636bdaeb5d client: Add basic ops. for adapter interface 2017-04-27 15:13:53 -05:00
Tim Kourt
0a68431ef9 client: Add adapter argument completers 2017-04-27 15:13:28 -05:00
Tim Kourt
6d210d5aa4 client: Add properties for adapter interface 2017-04-27 15:12:27 -05:00
Tim Kourt
60c4025cdf client: Introduce adapter interface 2017-04-27 15:11:59 -05:00
Tim Kourt
bc17967c91 client: network connection check 2017-04-27 15:11:35 -05:00
Tim Kourt
c6b05c722b client: add network basic ops 2017-04-27 15:11:17 -05:00
Tim Kourt
c2fcba8040 client: add network properties 2017-04-27 15:10:35 -05:00
Tim Kourt
425cb23f98 client: Ops check on destroy 2017-04-26 18:51:45 -05:00
Tim Kourt
8f7066ec36 client: Remove deprecated properties proxy 2017-04-26 18:51:32 -05:00