]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
6 years agoUse lchown() instead of chown() for self-created files
Jouni Malinen [Sun, 6 Jan 2019 18:28:04 +0000 (20:28 +0200)] 
Use lchown() instead of chown() for self-created files

There is no need to allow symlink dereferencing in these cases where a
file (including directories and sockets) are created by the same
process, so use the safer lchown() variant to avoid leaving potential
windows for something external to replace the file before the chown()
call. The particular locations used here should not have write
permissions enabled for processes with less privileges, so this may not
be needed, but anyway, it is better to make these more restrictive
should there be cases where directory permissions are not as expected
for a good deployment.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoAndroid: Harden wpa_ctrl_open2() against potential race conditions
Jouni Malinen [Sun, 6 Jan 2019 18:01:09 +0000 (20:01 +0200)] 
Android: Harden wpa_ctrl_open2() against potential race conditions

The Android-specific chmod and chown operations on the client socket
(for communication with wpa_supplicant) did not protect against file
replacement between the bind() and chmod()/chown() calls. If the
directory in which the client socket is created (depends a bit on the
version and platform, but /data/misc/wifi/sockets is commonly used)
allows write access to processes that are different (less privileged)
compared to the process calling wpa_ctrl_open2(), it might be possible
to delete the socket file and replace it with something else (mainly, a
symlink) before the chmod/chown operations occur. This could have
resulted in the owner or permissions of the target of that symlink being
modified.

In general, it would be safest to use a directory which has more limited
write privileges (/data/misc/wifi/sockets normally has 'wifi' group
(AID_WIFI) with write access), but if that cannot be easily changed due
to other constraints, it is better to make wpa_ctrl_open2() less likely
to enable this type of race condition between the operations.

Replace chown() with lchown() (i.e., a version that does not dereference
symlinks) and chmod() with fchmod() on the socket before the bind() call
which is also not going to dereference a symlink (whereas chmod()
would). lchown() is a standard operation, but the fchmod() on the socket
is less so (unspecified behavior in some systems). However, it seems to
work on Linux and in particular, on Android, where this code is
executed.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: More workarounds for cfg80211 regulatory state clearing (ap_open)
Jouni Malinen [Sun, 6 Jan 2019 11:21:19 +0000 (13:21 +0200)] 
tests: More workarounds for cfg80211 regulatory state clearing (ap_open)

Add even more workarounds for cfg80211 regulatory state clearing since
these DFS test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: More workarounds for cfg80211 regulatory state clearing (DFS)
Jouni Malinen [Sun, 6 Jan 2019 10:28:11 +0000 (12:28 +0200)] 
tests: More workarounds for cfg80211 regulatory state clearing (DFS)

Add even more workarounds for cfg80211 regulatory state clearing since
these DFS test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoDFS: Add supported channel bandwidth checking
Dmitry Lebed [Thu, 1 Mar 2018 11:49:29 +0000 (14:49 +0300)] 
DFS: Add supported channel bandwidth checking

While selecting a new channel as a reaction to radar event we need to
take into account supported bandwidth for each channel provided via
nl80211. Without this modification hostapd might select an unsupported
channel that would fail during AP startup.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
6 years agoACS: Add supported channel bandwidth checking
Dmitry Lebed [Thu, 1 Mar 2018 11:49:28 +0000 (14:49 +0300)] 
ACS: Add supported channel bandwidth checking

While doing automatic channel selection we need to take into account
supported bandwidth for each channel provided via nl80211. Without this
modification hostapd might select an unsupported channel which would
fail during AP startup.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
6 years agohostapd: Add supported channel bandwidth checking infrastructure
Dmitry Lebed [Thu, 1 Mar 2018 11:49:27 +0000 (14:49 +0300)] 
hostapd: Add supported channel bandwidth checking infrastructure

This adds checks to common code to verify supported bandwidth options
for each channel using nl80211-provided info. No support of additional
modes is added, just additional checks. Such checks are needed because
driver/hardware can declare more strict limitations than declared in the
IEEE 802.11 standard. Without this patch hostapd might select
unsupported channel and that will fail because Linux kernel does check
channel bandwidth limitations.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
6 years agonl80211: Add supported bandwidth parsing
Dmitry Lebed [Thu, 1 Mar 2018 11:49:26 +0000 (14:49 +0300)] 
nl80211: Add supported bandwidth parsing

Add NL80211_FREQUENCY_ATTR_NO_* channel attributes parsing. This is
needed for correct checking if channel is available in a particular
bandwidth.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
6 years agotests: ACS for 160 MHz channel
Jouni Malinen [Sat, 5 Jan 2019 23:45:26 +0000 (01:45 +0200)] 
tests: ACS for 160 MHz channel

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoACS: Add support for 160 MHz bandwidth
Dmitry Lebed [Tue, 27 Feb 2018 20:40:52 +0000 (23:40 +0300)] 
ACS: Add support for 160 MHz bandwidth

Add support for 160 MHz BW channels to automatic channel selection
algorithm. Only 36 and 100 channels are supported as 160 MHz channels.

Signed-off-by: Dmitry Lebed <lebed.dmitry@gmail.com>
6 years agotests: More workarounds for cfg80211 regulatory state clearing (WNM)
Jouni Malinen [Sat, 5 Jan 2019 20:06:03 +0000 (22:06 +0200)] 
tests: More workarounds for cfg80211 regulatory state clearing (WNM)

Add even more workarounds for cfg80211 regulatory state clearing since
these WNM test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agodbus: Fix build without CONFIG_WNM=y
Jouni Malinen [Sat, 5 Jan 2019 16:42:22 +0000 (18:42 +0200)] 
dbus: Fix build without CONFIG_WNM=y

wpa_s->bss_tm_status is within #ifdef CONFIG_WNM, so need to access it
through matching condition.

Fixes: 80d06d0ca9f3 ("dbus: Export BSS Transition Management status")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoEAP-TLS: Update Session-Id derivation with TLS v1.3
Jouni Malinen [Sat, 5 Jan 2019 16:00:26 +0000 (18:00 +0200)] 
EAP-TLS: Update Session-Id derivation with TLS v1.3

Move to the version used in draft-ietf-emu-eap-tls13-03.txt, i.e.,
include the 0x0D prefix and use a different TLS-Exporter() label string.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: OpenSSL systemwide policy and overrides
Jouni Malinen [Sat, 5 Jan 2019 15:02:04 +0000 (17:02 +0200)] 
tests: OpenSSL systemwide policy and overrides

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOpenSSL: Allow systemwide policies to be overridden
Jouni Malinen [Sat, 5 Jan 2019 15:02:33 +0000 (17:02 +0200)] 
OpenSSL: Allow systemwide policies to be overridden

Some distributions (e.g., Debian) have started introducting systemwide
OpenSSL policies to disable older protocol versions and ciphers
throughout all programs using OpenSSL. This can result in significant
number of interoperability issues with deployed EAP implementations.

Allow explicit wpa_supplicant (EAP peer) and hostapd (EAP server)
parameters to be used to request systemwide policies to be overridden if
older versions are needed to be able to interoperate with devices that
cannot be updated to support the newer protocol versions or keys. The
default behavior is not changed here, i.e., the systemwide policies will
be followed if no explicit override configuration is used. The overrides
should be used only if really needed since they can result in reduced
security.

In wpa_supplicant, tls_disable_tlsv1_?=0 value in the phase1 network
profile parameter can be used to explicitly enable TLS versions that are
disabled in the systemwide configuration. For example,
phase1="tls_disable_tlsv1_0=0 tls_disable_tlsv1_1=0" would request TLS
v1.0 and TLS v1.1 to be enabled even if the systemwide policy enforces
TLS v1.2 as the minimum version. Similarly, openssl_ciphers parameter
can be used to override systemwide policy, e.g., with
openssl_ciphers="DEFAULT@SECLEVEL=1" to drop from security level 2 to 1
in Debian to allow shorter keys to be used.

In hostapd, tls_flags parameter can be used to configure similar
options. E.g., tls_flags=[ENABLE-TLSv1.0][ENABLE-TLSv1.1]

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOSEN: Disable TLS v1.3 by default
Jouni Malinen [Sat, 5 Jan 2019 14:52:05 +0000 (16:52 +0200)] 
OSEN: Disable TLS v1.3 by default

TLS v1.3 was already disabled by default for EAP-FAST, EAP-TTLS,
EAP-PEAP, and EAP-TLS, but the unauthenticated client cases of EAP-TLS
-like functionality (e.g., the one used in OSEN) were missed. Address
those EAP types as well in the same way of disabling TLS v1.3 by default
for now to avoid functionality issues with TLS libraries that enable TLS
v1.3 by default.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOpenSSL: Fix build with OpenSSL 1.0.2
Jouni Malinen [Sat, 5 Jan 2019 09:33:40 +0000 (11:33 +0200)] 
OpenSSL: Fix build with OpenSSL 1.0.2

SSL_use_certificate_chain_file() was added in OpenSSL 1.1.0, so need to
maintain the old version using SSL_use_certificate_file() for backwards
compatibility.

Fixes: 658c39809bf8 ("OpenSSL: Load chain certificates from client_cert file")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Split mbo_supp_oper_classes into multiple test cases
Jouni Malinen [Fri, 4 Jan 2019 22:21:41 +0000 (00:21 +0200)] 
tests: Split mbo_supp_oper_classes into multiple test cases

In addition, add even more workarounds for cfg80211 regulatory state
clearing since this test case seems to be the most likely one to fail
due to country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: WPA2-PSK-FT AP over DS and separate hostapd process
Jouni Malinen [Fri, 4 Jan 2019 18:35:47 +0000 (20:35 +0200)] 
tests: WPA2-PSK-FT AP over DS and separate hostapd process

This is a regression test case for FT-over-DS that got broken on
mac80211-based drivers when the extra key reinstallation checks were
added.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoFT: Allow STA entry to be removed/re-added with FT-over-the-DS
Jouni Malinen [Fri, 4 Jan 2019 20:58:56 +0000 (22:58 +0200)] 
FT: Allow STA entry to be removed/re-added with FT-over-the-DS

FT-over-the-DS has a special case where the STA entry (and as such, the
TK) has not yet been configured to the driver depending on which driver
interface is used. For that case, allow add-STA operation to be used
(instead of set-STA). This is needed to allow mac80211-based drivers to
accept the STA parameter configuration. Since this is after a new
FT-over-DS exchange, a new TK has been derived after the last STA entry
was added to the driver, so key reinstallation is not a concern for this
case.

Fixes: 0e3bd7ac684a ("hostapd: Avoid key reinstallation in FT handshake")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoFT: Do not try to use FT-over-air if reassociation cannot be used
Jouni Malinen [Fri, 4 Jan 2019 18:28:56 +0000 (20:28 +0200)] 
FT: Do not try to use FT-over-air if reassociation cannot be used

There is no point in going through FT authentication if the next step
would have to use association exchange which will be rejected by the AP
for FT, so only allow FT-over-air if previous BSSID is set, i.e., if
reassociation can be used.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Split ap_ft_oom into separate test cases
Jouni Malinen [Fri, 4 Jan 2019 21:19:30 +0000 (23:19 +0200)] 
tests: Split ap_ft_oom into separate test cases

ap_ft_oom seemed to depend on undesired wpa_supplicant behavior of
trying to do FT protocol even without being ready for reassociation.
This is going to be fixed in wpa_supplicant which would make this test
case fail, so split it into separate test cases for each failure item to
be able to avoid incorrect test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Verify that roaming attempts do not get rejected
Jouni Malinen [Fri, 4 Jan 2019 18:27:40 +0000 (20:27 +0200)] 
tests: Verify that roaming attempts do not get rejected

The previous roam() and roam_over_ds() checks would have ignored failing
association rejection if a consecutive attempt to connect succeeds
within the initial time limit. This can miss incorrect behavior, so
check explicitly for association rejection.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: P2PS stale group removal
Jouni Malinen [Fri, 4 Jan 2019 10:01:32 +0000 (12:01 +0200)] 
tests: P2PS stale group removal

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoP2PS: Notify D-Bus about removal of a stale/empty persistent group
Jouni Malinen [Fri, 4 Jan 2019 11:18:26 +0000 (13:18 +0200)] 
P2PS: Notify D-Bus about removal of a stale/empty persistent group

During P2PS PD Request processing wpa_supplicant removes stale and empty
persistent groups, but it did not notify D-Bus to unregister object. Fix
this by adding the missing notifications.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoP2PS: Notify D-Bus about removal of a stale persistent group
Amit Khatri [Thu, 3 Jan 2019 15:47:26 +0000 (21:17 +0530)] 
P2PS: Notify D-Bus about removal of a stale persistent group

During P2PS PD Request processing wpa_supplicant removes stale
persistent groups, but it did not notify D-Bus to unregister object.
This can result in leaving behind objects pointing to freed memory and
memory leaks. Sometime it can cause a crash in wpa_config_get_all()
function and DBUS_ERROR_OBJECT_PATH_IN_USE errors.

Fix this by adding the missed notification to D-Bus code to unregister
the object.

Signed-off-by: Amit Khatri <amit7861234@gmail.com>
6 years agotests: Fix P2P-GROUP-STARTED event parsing for persistent groups
Jouni Malinen [Fri, 4 Jan 2019 09:44:48 +0000 (11:44 +0200)] 
tests: Fix P2P-GROUP-STARTED event parsing for persistent groups

Do not set the 'ip_addr' value from the "[PERSISTENT]" flag.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agomesh: Consider mesh interface on DFS event handler
Peter Oh [Mon, 27 Aug 2018 21:28:44 +0000 (14:28 -0700)] 
mesh: Consider mesh interface on DFS event handler

Once mesh starts supporting DFS channels, it has to handle DFS related
events from drivers, hence add mesh interface to the check list.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agomesh: Reflect country setting to mesh configuration for DFS
Peter Oh [Mon, 27 Aug 2018 21:28:39 +0000 (14:28 -0700)] 
mesh: Reflect country setting to mesh configuration for DFS

wpa_supplicant configuration has country parameter that is supposed to
be used in AP mode to indicate supporting IEEE 802.11h and 802.11d.
Reflect this configuration to Mesh also since Mesh is required to
support 802.11h and 802.11d to use DFS channels.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agomesh: Apply channel attributes before setup interface
Peter Oh [Mon, 27 Aug 2018 21:28:40 +0000 (14:28 -0700)] 
mesh: Apply channel attributes before setup interface

This helps mesh interface initialization with correct channel
parameters.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agomesh: Set interface type to mesh before setting interface
Peter Oh [Mon, 27 Aug 2018 21:28:42 +0000 (14:28 -0700)] 
mesh: Set interface type to mesh before setting interface

Correct interface type is required to start DFS CAC that can be
triggered during interface setup.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agomesh: Set mesh VHT center frequency
Peter Oh [Mon, 27 Aug 2018 21:28:43 +0000 (14:28 -0700)] 
mesh: Set mesh VHT center frequency

VHT center frequency value is required to compose the correct channel
info.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agomesh: Relocate RSN initialization
Peter Oh [Mon, 27 Aug 2018 21:28:37 +0000 (14:28 -0700)] 
mesh: Relocate RSN initialization

RSN initialization should work together with mesh join when it's used.
Since mesh join could be called at a different stage if DFS channel is
used, relocate the RSN initialization call to mesh join. It is still the
same call flow of mesh join before this if non-DFS channels are used,
hence no significant side effect will occur.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agomesh: Factor out mesh join function
Peter Oh [Mon, 27 Aug 2018 21:28:34 +0000 (14:28 -0700)] 
mesh: Factor out mesh join function

Mesh join function consists of two parts which are preparing
configurations and sending join event to the driver. Since physical mesh
join event could happen either right after mesh configuration is done or
after CAC is done in case of DFS channel is used, factor out the
function into two parts to reduce redundant calls.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agotests: Update mesh_oom to match implementation change
Peter Oh [Mon, 27 Aug 2018 21:28:36 +0000 (14:28 -0700)] 
tests: Update mesh_oom to match implementation change

The number of direct allocation within wpa_supplicant_mesh_init()
has been reduced due to RSN init function is factored out.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agomesh: Factor out RSN initialization
Peter Oh [Mon, 27 Aug 2018 21:28:35 +0000 (14:28 -0700)] 
mesh: Factor out RSN initialization

RSN initialization can be used in different phases if mesh
initialization and mesh join don't happen in sequence such as DFS CAC is
done in between, hence factor it out to help convering the case. This
can also get rid of unnecessary indentation by handling the
mconf->security != MESH_CONF_SEC_NONE functionality in a helper
function.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agowpa_cli: Add command for setting PSK_PASSPHRASE
Hagai Moshe [Thu, 12 Jul 2018 15:35:51 +0000 (18:35 +0300)] 
wpa_cli: Add command for setting PSK_PASSPHRASE

Setting mem_only_psk=1 in the wpa_supplicant configuration prevents the
passphrase from being stored in the configuration file. wpa_supplicant
will request the PSK passphrase over the control interface in such case
and this new wpa_cli command can be used to set the psk_passphrase.

usage:
psk_passphrase <network id> <psk_passphrase>

Signed-off-by: Hagai Moshe <hagai.moshe@tandemg.com>
Signed-off-by: Simon Dinkin <simon.dinkin@tandemg.com>
6 years agodbus: Expose authentication status to D-Bus
Alex Khouderchah [Thu, 5 Jul 2018 23:29:09 +0000 (16:29 -0700)] 
dbus: Expose authentication status to D-Bus

wpa_supplicant currently logs CTRL-EVENT-AUTH-FAILED errors when
authentication fails, but doesn't expose any property to the D-Bus
interface related to this.

This change adds the "AuthStatusCode" property to the interface, which
contains the IEEE 802.11 status code of the last authentication.

Signed-off-by: Alex Khouderchah <akhouderchah@chromium.org>
6 years agodbus: Export BSS Transition Management status
Matthew Wang [Fri, 4 May 2018 18:16:18 +0000 (11:16 -0700)] 
dbus: Export BSS Transition Management status

Add new Interface properties "BSSTMStatus", which carries the status of
the most recent BSS Transition Management request. This property will be
logged in UMA to measure 802.11v success.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
6 years agodbus: Export roam time, roam complete, and session length
Matthew Wang [Wed, 20 Jun 2018 23:42:45 +0000 (16:42 -0700)] 
dbus: Export roam time, roam complete, and session length

Add new Interface properties "RoamTime", "RoamComplete", and
"SessionLength". "RoamTime" carries the roam time of the most recent
roam in milliseconds. "RoamComplete" carries True or False corresponding
to the success status of the most recent roam. "SessionLength" carries
the number of milliseconds corresponding to how long the connection to
the last AP was before a roam or disconnect happened.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
6 years agotests: AP VLAN with WPA2-Enterprise and local file setting VLAN IDs
Jouni Malinen [Wed, 2 Jan 2019 21:50:35 +0000 (23:50 +0200)] 
tests: AP VLAN with WPA2-Enterprise and local file setting VLAN IDs

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoAllow remote RADIUS authentication with local VLAN management
Nils Nieuwejaar [Wed, 30 May 2018 21:09:01 +0000 (14:09 -0700)] 
Allow remote RADIUS authentication with local VLAN management

The documentation in the hostapd.conf file says that the dynamic_vlan
variable is used to control whether VLAN assignments are accepted from a
RADIUS server. The implication seems to be that a static VLAN assignment
will come from the accept_mac_file if dynamic_vlan is set to 0, and a
dynamic assignment will come from the RADIUS server if dynamic_vlan is
set to 1. Instead, I'm seeing that the static settings from the
accept_mac_file are ignored if dynamic_vlan is set to 0, but used if
dynamic_vlan is set to 1. If dynamic_vlan is set to 1 and the RADIUS
server does not provide a VLAN, then the accept_mac_file assignment is
overridden and the STA is assigned to the default non-VLANed interface.

If my understanding of the expected behavior is correct, then I believe
the problem is in ap_sta_set_vlan(). That routine checks the
dynamic_vlan setting, but has no way of determining whether the incoming
vlan_desc is static (i.e., from accept_mac_file) or dynamic (i.e., from
a RADIUS server).

I've attached a patch that gets hostapd working as I believe it's meant
to, and updates the documentation to make the implicit behavior
explicit.

The functional changes are:

- hostapd_allowed_address() will always extract the vlan_id from the
  accept_macs file. It will not update the vlan_id from the RADIUS cache
  if dynamic_vlan is DISABLED.

- hostapd_acl_recv_radius() will not update the cached vlan_id if
  dynamic_vlan is DISABLED.

- ieee802_1x_receive_auth() will not update the vlan_id if dynamic_vlan
  is DISABLED.

More cosmetic:

Most of the delta is just moving code out of ieee802_1x_receive_auth()
into a new ieee802_1x_update_vlan() routine. While I initially did this
because the new DISABLED check introduced excessive indentation, it has
the added advantage of eliminating the vlan_description allocation and
os_memset() call for all DYNAMIC_VLAN_DISABLED configs.

I've done a couple rounds of review offline with Michael Braun (who has
done much of the work in this part of the code) and incorporated his
feedback.

If dynamic_vlan=0 (disabled), vlan assignments will be managed using the
local accept_mac_file ACL file, even if a RADIUS server is being used
for user authentication. This allows us to manage users and devices
independently.

Signed-off-by: Nils Nieuwejaar <nils.nieuwejaar@gmail.com>
6 years agoUse a helper function for checking Extended Capabilities field
Jouni Malinen [Wed, 2 Jan 2019 15:56:41 +0000 (17:56 +0200)] 
Use a helper function for checking Extended Capabilities field

The new ieee802_11_ext_capab() and wpa_bss_ext_capab() functions can be
used to check whether a specific extended capability bit is set instead
of having to implement bit parsing separately for each need.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: [UTF-8] flag in scan results
Jouni Malinen [Wed, 2 Jan 2019 15:38:27 +0000 (17:38 +0200)] 
tests: [UTF-8] flag in scan results

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoAdd [FST] and [UTF-8] flags to BSS command output
Jouni Malinen [Wed, 2 Jan 2019 15:34:53 +0000 (17:34 +0200)] 
Add [FST] and [UTF-8] flags to BSS command output

These flags were used in SCAN_RESULTS command output, but not BSS. Make
these consistent by adding the flags to BSS as well.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoShow [UTF-8] flag if the SSID is reported as UTF-8
Jouke Witteveen [Mon, 25 Jun 2018 20:24:15 +0000 (22:24 +0200)] 
Show [UTF-8] flag if the SSID is reported as UTF-8

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
6 years agocrypto internal: Make MD4 PADDING array const
Mikael Kanstrup [Tue, 19 Jun 2018 11:52:29 +0000 (13:52 +0200)] 
crypto internal: Make MD4 PADDING array const

The PADDING array used when adding padding bits in MD4 never change
so can be made const. Making it const puts the array in .rodata
section and can save a few bytes of RAM for systems running without
virtual memory.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sony.com>
6 years agoRRM: Update own neighbor report on channel switch
Markus Theil [Mon, 20 Aug 2018 12:20:44 +0000 (14:20 +0200)] 
RRM: Update own neighbor report on channel switch

After performing a successful channel switch, the AP should update its
own neighbor report element, so do this from src/ap/drv_callbacks.c
after a successful switch.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
6 years agoRRM: Move neighbor report functions
Markus Theil [Mon, 20 Aug 2018 12:20:44 +0000 (14:20 +0200)] 
RRM: Move neighbor report functions

Move functions corresponding to neighbor report elements to
src/ap/neighbor_db.[c,h] in preparation to using them after channel
switch from src/ap/drv_callbacks.c.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
6 years agohostapd: Fix a typo in function name
Jouni Malinen [Wed, 2 Jan 2019 14:40:34 +0000 (16:40 +0200)] 
hostapd: Fix a typo in function name

This was supposed to use "hostapd_" prefix.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agocrypto: Reduce the size of sha512_compress() stack frame
Ilan Peer [Wed, 22 Aug 2018 16:49:08 +0000 (19:49 +0300)] 
crypto: Reduce the size of sha512_compress() stack frame

The function sha512_compress() has a local variable that consumes 640
bytes. This is very heavy for embedded devices that have limited stack
resources. Handle this by replacing the static allocation with a dynamic
one.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
6 years agohostapd_cli: Add option to send beacon report request
Avraham Stern [Wed, 22 Aug 2018 13:46:21 +0000 (16:46 +0300)] 
hostapd_cli: Add option to send beacon report request

This new 'req_beacon' command is useful for testing.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agotests: Beacon report last frame indication
Avraham Stern [Wed, 22 Aug 2018 13:46:20 +0000 (16:46 +0300)] 
tests: Beacon report last frame indication

Verify that the beacon report contains the last beacon report
indication subelement when requested in the beacon request.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agoRRM: Support for Last Beacon Report Indication subelement
Avraham Stern [Wed, 22 Aug 2018 13:46:19 +0000 (16:46 +0300)] 
RRM: Support for Last Beacon Report Indication subelement

IEEE P802.11-REVmd/D2.0, 9.4.2.20.7 (Beacon request) and 9.4.2.21.7
(Beacon report) add the Last Beacon Report Indication subelement to
Beacon Request and Beacon Report elements.

Add the Last Beacon Report Indication subelement to all Beacon Report
elements if the Beacon Request indicated that this subelement is
requested.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agotests: Beacon report frame body fragmentation
Avraham Stern [Wed, 22 Aug 2018 13:46:18 +0000 (16:46 +0300)] 
tests: Beacon report frame body fragmentation

Verify that when the frame body subelement causes the
measurement report element to exceed the maximum element size,
the beacon report is fragmented and the frame body fragment ID
subelement is added with the correct fragment number.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agotests: Update rrm_beacon_req_table_rsne to expect full RSNE
Jouni Malinen [Wed, 2 Jan 2019 14:25:31 +0000 (16:25 +0200)] 
tests: Update rrm_beacon_req_table_rsne to expect full RSNE

Now that wpa_supplicant is sending out full RSNE instead of the
fragmented one, update this test case to match.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoRRM: Add support for beacon report fragmentation
Avraham Stern [Wed, 22 Aug 2018 13:46:17 +0000 (16:46 +0300)] 
RRM: Add support for beacon report fragmentation

When the frame body subelement would cause the measurement report
element to exceed the maximum element size, the frame body subelement
used to be truncated. In addition, some elements were always truncated
in order to keep the reported frame body short (e.g. RSN IE).

Alternatively, IEEE P802.11-REVmd/D2.0, 9.4.2.21.7 extension to Beacon
reporting can be used: The frame body subelement is fragmented across
multiple beacon report elements, and the reported frame body fragment ID
subelement is added.

Use beacon report fragmentation instead of truncating the frame body
as this method gives the AP a more complete information about the
reported APs.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agotests: D-Bus P2P peer information - VSIE
Jouni Malinen [Wed, 2 Jan 2019 11:00:33 +0000 (13:00 +0200)] 
tests: D-Bus P2P peer information - VSIE

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agodbus: Add vendor specific information element in peer properties
Nishant Chaprana [Fri, 16 Feb 2018 12:02:39 +0000 (17:32 +0530)] 
dbus: Add vendor specific information element in peer properties

Make vendor specific information elements (VSIE) available in peer
properties, so that VSIE of a specific peer can be retrieved using
peer's object path.

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agotests: Fix p2p_ext_discovery_go to write to logger, not stdout
Jouni Malinen [Wed, 2 Jan 2019 10:39:00 +0000 (12:39 +0200)] 
tests: Fix p2p_ext_discovery_go to write to logger, not stdout

The error case debug print should go to logger.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Data connectivity after REAUTHENTICATE
Jouni Malinen [Wed, 2 Jan 2019 10:28:16 +0000 (12:28 +0200)] 
tests: Data connectivity after REAUTHENTICATE

Verify that not updating GTK (i.e., only update PTK) in the driver does
not break connectivity. This case is different after the check for
"already in-use GTK" and rejection of GTK reinstallation.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoeloop: Fix kqueue event deletion filter
Jouni Malinen [Wed, 2 Jan 2019 10:11:52 +0000 (12:11 +0200)] 
eloop: Fix kqueue event deletion filter

EV_SET() for EV_ADD used a specific filter type, but that same filter
type was not provided to the matching EV_DELETE case. This resulted in
the kernel rejecting the deletion with "Invalid argument". Fix this by
setting the same filter type for both operations.

Fixes: f9982b321222 ("Implement kqueue(2) support via CONFIG_ELOOP_KQUEUE")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoeloop: Fix fd_table allocation for epoll and kqueue
Jouni Malinen [Wed, 2 Jan 2019 09:57:00 +0000 (11:57 +0200)] 
eloop: Fix fd_table allocation for epoll and kqueue

The previous implementation did not work if the first registered socket
had fd > 16 or if the fd was more than double the largest value used in
previous registrations. Those cases could result in too small a memory
allocation being used and writes/reads beyond the end of that buffer.

This fix is applicable to CONFIG_ELOOP_EPOLL=y and CONFIG_ELOOP_KQUEUE=y
builds.

Fixes: f0356ec85c46 ("eloop: Add epoll option for better performance")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agocrypto: Add option to use getrandom()
Lubomir Rintel [Mon, 18 Sep 2017 12:58:07 +0000 (14:58 +0200)] 
crypto: Add option to use getrandom()

According to random(4) manual, /dev/random is essentially deprecated on
Linux for quite some time:

"The /dev/random interface is considered a legacy interface, and
/dev/urandom is preferred and sufficient in all use cases, with the
exception of applications which require randomness during early boot
time; for these applications, getrandom(2) must be used instead, because
it will block until the entropy pool is initialized."

An attempt to use it would cause unnecessary blocking on machines
without a good hwrng even when it shouldn't be needed. Since Linux 3.17,
a getrandom(2) call is available that will block only until the
randomness pool has been seeded.

It is probably not a good default yet as it requires a fairly recent
kernel and glibc (3.17 and 2.25 respectively).

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
6 years agowpa_ctrl: Make wpa_cli ping/pong work more reliably
Ben Greear [Mon, 4 Dec 2017 17:18:26 +0000 (09:18 -0800)] 
wpa_ctrl: Make wpa_cli ping/pong work more reliably

In 2013 or so, IFNAME=foo was prepended to at least the Unix socket
communication from wpa_supplicant to wpa_cli. This broke the (fragile)
logic that made ping/pong work more often when wpa_supplicant is busy
sending logging info to wpa_cli.

Adding check for IFNAME=foo makes this work better.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agoOpenSSL: Load chain certificates from client_cert file
Isaac Boukris [Sun, 21 Jan 2018 01:36:44 +0000 (01:36 +0000)] 
OpenSSL: Load chain certificates from client_cert file

This helps the server to build the chain to trusted CA when PEM encoding
of client_cert is used with multiple listed certificates. This was
already done for the server certificate configuration, but the client
certificate was limited to using only the first certificate in the file.

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
6 years agovlan: Use new bridge ioctl()
Sergey Matyukevich [Tue, 21 Nov 2017 20:14:45 +0000 (23:14 +0300)] 
vlan: Use new bridge ioctl()

Legacy ioctl() through SIOCDEVPRIVATE are deprecated. Follow the
approach taken by bridge-utils and make use of new bridge ioctl's
whenever possible.

For example, using legacy ioctl() breaks dynamic VLAN mode on 32-bit
Linux systems running 64-bit kernels.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
6 years agoUpdate copyright notices for the new year 2019
Jouni Malinen [Tue, 1 Jan 2019 21:38:56 +0000 (23:38 +0200)] 
Update copyright notices for the new year 2019

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Use different country in p2p_go_move_reg_change
Jouni Malinen [Tue, 1 Jan 2019 21:30:16 +0000 (23:30 +0200)] 
tests: Use different country in p2p_go_move_reg_change

Use of country=00 (world roaming) seemed to not work anymore with the
current cfg80211 regulatory implementation since the existing channel is
left enabled when moving to country=00. Use a specific country code that
does enforce the selected channel from being used anymore to make this
test case pass again.

The change in cfg80211 behavior is from the kernel commit 113f3aaa81bd
("cfg80211: Prevent regulatory restore during STA disconnect in
concurrent interfaces").

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: dot1xAuthSessionUserName
Jouni Malinen [Tue, 1 Jan 2019 19:29:25 +0000 (21:29 +0200)] 
tests: dot1xAuthSessionUserName

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoUse internal EAP server identity as dot1xAuthSessionUserName
Jouni Malinen [Tue, 1 Jan 2019 19:27:54 +0000 (21:27 +0200)] 
Use internal EAP server identity as dot1xAuthSessionUserName

If the internal EAP server is used instead of an external RADIUS server,
sm->identity does not get set. Use the identity from the internal EAP
server in such case to get the dot1xAuthSessionUserName value in STA MIB
information.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agobrowser: Replace deprecated gtk_window_set_wmclass()
Jouni Malinen [Tue, 1 Jan 2019 18:36:42 +0000 (20:36 +0200)] 
browser: Replace deprecated gtk_window_set_wmclass()

Use gtk_window_set_role() instead of the deprecated
gtk_window_set_wmclass().

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoHTTP (curl): Replace deprecated ASN1_STRING_data()
Jouni Malinen [Tue, 1 Jan 2019 18:29:34 +0000 (20:29 +0200)] 
HTTP (curl): Replace deprecated ASN1_STRING_data()

Use ASN1_STRING_get0_data() instead of the older ASN1_STRING_data() that
got deprecated in OpenSSL 1.1.0.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoHTTP (curl): Fix build with newer OpenSSL versions
Ben Greear [Tue, 12 Sep 2017 17:43:36 +0000 (10:43 -0700)] 
HTTP (curl): Fix build with newer OpenSSL versions

The SSL_METHOD patching hack to get proper OCSP validation for Hotspot
2.0 OSU needs cannot be used with OpenSSL 1.1.0 and newer since the
SSL_METHOD structure is not exposed anymore. Fall back to using the
incomplete CURLOPT_SSL_VERIFYSTATUS design to fix the build.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agoHTTP (curl): Use DEFINE_STACK_OF() with newer OpenSSL versions
Ben Greear [Tue, 12 Sep 2017 17:43:36 +0000 (10:43 -0700)] 
HTTP (curl): Use DEFINE_STACK_OF() with newer OpenSSL versions

SKM_sk_num() is not available anymore, so use DEFINE_STACK_OF() to get
the appropriate accessor functions.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agoHTTP (curl): Use SSL_get_SSL_CTX() helper
Ben Greear [Tue, 12 Sep 2017 17:43:36 +0000 (10:43 -0700)] 
HTTP (curl): Use SSL_get_SSL_CTX() helper

The direct ssl->ctx access are not allowed anymore in newer OpenSSL
versions, so use the SSL_get_SSL_CTX() helper for this.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agoHS 2.0: Fix EST compilation with OpenSSL 1.1.0 and newer
Ben Greear [Tue, 12 Sep 2017 17:43:36 +0000 (10:43 -0700)] 
HS 2.0: Fix EST compilation with OpenSSL 1.1.0 and newer

SKM_sk_value() is not available anymore, so use DEFINE_STACK_OF() to get
the appropriate accessor functions.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agohostap: Silence compiler warnings about IFNAMSIZ buffers
Jouni Malinen [Tue, 1 Jan 2019 17:38:58 +0000 (19:38 +0200)] 
hostap: Silence compiler warnings about IFNAMSIZ buffers

Report interface name truncation and reject such cases in Host AP driver
initialization of the AP interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOCE: RSSI-based rejection to consider Authentication frames (AP)
Jouni Malinen [Tue, 1 Jan 2019 16:17:02 +0000 (18:17 +0200)] 
OCE: RSSI-based rejection to consider Authentication frames (AP)

Try to make RSSI-based rejection of associating stations a bit less
likely to trigger false rejections by considering RSSI from the last
received Authentication frame. Association is rejected only if both the
Authentication and (Re)Association Request frames are below the RSSI
threshold.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Add RSSI based association rejection tests
Beni Lev [Mon, 21 Aug 2017 16:43:55 +0000 (19:43 +0300)] 
tests: Add RSSI based association rejection tests

Signed-off-by: Beni Lev <beni.lev@intel.com>
6 years agotests: Add a command for setting TX power/RSSI
Beni Lev [Mon, 21 Aug 2017 16:43:54 +0000 (19:43 +0300)] 
tests: Add a command for setting TX power/RSSI

With this command, RSSI signal can be controlled. Due to restrictions in
kernel, only values in the range of [-30, -50] can be used. The command
is implemented by changing the TX power.

Signed-off-by: Beni Lev <beni.lev@intel.com>
6 years agoOCE: Add RSSI based association rejection support (AP)
Beni Lev [Mon, 21 Aug 2017 16:43:53 +0000 (19:43 +0300)] 
OCE: Add RSSI based association rejection support (AP)

An AP might reject a STA association request due to low RSSI. In such
case, the AP informs the STA the desired RSSI improvement and a retry
timeout. The STA might retry to associate even if the RSSI hasn't
improved if the retry timeout expired.

Signed-off-by: Beni Lev <beni.lev@intel.com>
6 years agoOCE: Add RSSI based association rejection support (STA)
Beni Lev [Mon, 21 Aug 2017 16:43:52 +0000 (19:43 +0300)] 
OCE: Add RSSI based association rejection support (STA)

An AP might refuse to connect a STA if it has a low RSSI. In such case,
the AP informs the STA with the desired RSSI delta and a retry timeout.
Any subsequent association attempt with that AP (BSS) should be avoided,
unless the RSSI level improved by the desired delta or the timeout has
expired.

Defined in Wi-Fi Alliance Optimized Connectivity Experience technical
specification v1.0, section 3.14 (RSSI-based association rejection
information).

Signed-off-by: Beni Lev <beni.lev@intel.com>
6 years agotests: P2P cancel join-group using p2pdev and no separate group interface
Jouni Malinen [Tue, 1 Jan 2019 14:58:11 +0000 (16:58 +0200)] 
tests: P2P cancel join-group using p2pdev and no separate group interface

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoP2P: Set global->p2p_group_formation in wpas_p2p_join_start() for p2pdev
Aloni, Adiel [Mon, 21 Aug 2017 16:36:22 +0000 (19:36 +0300)] 
P2P: Set global->p2p_group_formation in wpas_p2p_join_start() for p2pdev

When a dedicated P2P device interface is used, the
global->p2p_group_formation was not set in wpas_p2p_join_start() if no
separate group interface is used. This would cause that in case of a
failure in group formation, the cleaning of p2p_in_provisioning is done
on the wrong interface. Furthermore, P2P_CANCEL command could not be
used to stop such a group-join operation. Fix this by setting the
global->p2p_group_formation correctly in case that the group interface
is reusing wpa_s->parent.

Signed-off-by: Adiel Aloni <adiel.aloni@intel.com>
6 years agotests: Clear regdom state in go_neg_forced_freq_diff_than_bss_freq
Jouni Malinen [Tue, 1 Jan 2019 14:35:42 +0000 (16:35 +0200)] 
tests: Clear regdom state in go_neg_forced_freq_diff_than_bss_freq

Be more careful with cleaning up the regdom state in cfg80211.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Make dpp_pkex_no_responder handle enabled 5 GHz channels
Jouni Malinen [Tue, 1 Jan 2019 14:17:13 +0000 (16:17 +0200)] 
tests: Make dpp_pkex_no_responder handle enabled 5 GHz channels

It was possible for the 5 GHz PKEX channels to be enabled, e.g., when
running "ap_ht40_csa2 dpp_pkex_no_responder" test sequence, and that
resulted in a failure in dpp_pkex_no_responder due to the unexpectedly
long wait needed for the DPP-FAIL event. Increase the wait time to allow
for 5 GHz PKEX channels to be probed.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoUpdate wpa_supplicant channel list on FLUSH
Jouni Malinen [Tue, 1 Jan 2019 13:58:46 +0000 (15:58 +0200)] 
Update wpa_supplicant channel list on FLUSH

Try to make sure the driver channel list state is synchronized with
wpa_supplicant whenever explicitly clearing state (e.g., between hwsim
test cases).

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agonl80211: Debug print channel list
Jouni Malinen [Tue, 1 Jan 2019 13:51:10 +0000 (15:51 +0200)] 
nl80211: Debug print channel list

This makes it a bit easier to figure out how channel list update from
the kernel is taken into use.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Check per-wiphy specific country code between test cases
Jouni Malinen [Mon, 31 Dec 2018 15:05:03 +0000 (17:05 +0200)] 
tests: Check per-wiphy specific country code between test cases

This allows more accurate logging of failures related to the cfg80211
country=98 (intersection) case. This version is trying to give some more
time to allow the country code to clear, but that does not seem to be
sufficient with the current cfg80211 implementation for country=98 (but
might be for other cases).

The additional check for country=98 at the beginning of each test case
is an attempt to force cfg80211 to restore world roaming state with a
new association and disconnection at the station side detected after the
AP side has already stopped. This is needed after the Linux kernel
commit 113f3aaa81bd ("cfg80211: Prevent regulatory restore during STA
disconnect in concurrent interfaces").

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Wait a bit after 'iw reg set 00' at the end of test cases
Jouni Malinen [Tue, 1 Jan 2019 09:45:50 +0000 (11:45 +0200)] 
tests: Wait a bit after 'iw reg set 00' at the end of test cases

This is needed to avoid leaving unexpected cfg80211 regulatory country
code in place at the point when a test case terminates.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Clear regdom changes more robustly in FST test cases
Jouni Malinen [Tue, 1 Jan 2019 09:35:22 +0000 (11:35 +0200)] 
tests: Clear regdom changes more robustly in FST test cases

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Clear regulatory setting in ap_ht_op_class_* more robustly
Jouni Malinen [Mon, 31 Dec 2018 15:14:01 +0000 (17:14 +0200)] 
tests: Clear regulatory setting in ap_ht_op_class_* more robustly

Avoid exiting the test case with regulatory domain set to something else
than 00 (world roaming).

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agonl82011: Make wiphy-specific country (alpha2) available in STATUS-DRIVER
Jouni Malinen [Mon, 31 Dec 2018 14:41:24 +0000 (16:41 +0200)] 
nl82011: Make wiphy-specific country (alpha2) available in STATUS-DRIVER

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agonl80211: Debug print details from the beacon hint events
Jouni Malinen [Mon, 31 Dec 2018 14:29:16 +0000 (16:29 +0200)] 
nl80211: Debug print details from the beacon hint events

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agohostapd: Add configuration option check_crl_strict
Sam Voss [Mon, 7 Aug 2017 16:26:33 +0000 (11:26 -0500)] 
hostapd: Add configuration option check_crl_strict

Add the ability to ignore time-based CRL errors from OpenSSL by
specifying a new configuration parameter, check_crl_strict=0.

This causes the following:

- This setting does nothing when CRL checking is not enabled.

- When CRL is enabled, "strict mode" will cause CRL time errors to not
  be ignored and will continue behaving as it currently does.

- When CRL is enabled, disabling strict mode will cause CRL time
  errors to be ignored and will allow connections.

By default, check_crl_strict is set to 1, or strict mode, to keep
current functionality.

Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
6 years agowpa_cli: Allow reconnect to global interface
Ben Greear [Thu, 8 Jun 2017 17:58:54 +0000 (10:58 -0700)] 
wpa_cli: Allow reconnect to global interface

Old code would just re-connect to a particular interface, even if user
had started wpa_cli with the '-g' option. Refactor global control
interface connection routine to allow it to be used in
wpa_cli_reconnect().

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agotests: Build tests for wpa_supplicant and hostapd
Jouni Malinen [Mon, 31 Dec 2018 08:50:22 +0000 (10:50 +0200)] 
tests: Build tests for wpa_supplicant and hostapd

Allow multiple build configurations to be tested automatically.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoAdd internal HMAC-SHA512 implementation to fix NEED_SHA512 builds
Jouni Malinen [Mon, 31 Dec 2018 09:51:45 +0000 (11:51 +0200)] 
Add internal HMAC-SHA512 implementation to fix NEED_SHA512 builds

Build configurations with CONFIG_TLS=internal and NEED_SHA512 failed due
to missing sha512.c file. Add that file even though this is not really
used in the currently available configuration combinations since DPP and
OWE are the only users of it and the internal crypto implementation
supports neither.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agowpa_supplicant: Fix build with !CONFIG_AP and CONFIG_CTRL_IFACE_DBUS_NEW
Michal Privoznik [Sun, 30 Dec 2018 18:36:22 +0000 (19:36 +0100)] 
wpa_supplicant: Fix build with !CONFIG_AP and CONFIG_CTRL_IFACE_DBUS_NEW

If the CONFIG_CTRL_IFACE_DBUS_NEW is enabled but CONFIG_AP is
disabled the build fails. This is because dbus getters try to
access ap_iface member of wpa_supplicant struct which is defined
if and only if CONFIG_AP is enabled.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>