mech_eap.git
10 years agoHS 2.0R2: Add support for Policy/RequiredProtoPortTuple
Jouni Malinen [Thu, 8 Aug 2013 17:31:41 +0000 (20:31 +0300)]
HS 2.0R2: Add support for Policy/RequiredProtoPortTuple

The new credential parameter req_conn_capab can be used to specify
restrictions on roaming networks providing connectivity for a set of
protocols/ports.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add support for Policy/MaximumBSSLoadValue
Jouni Malinen [Tue, 6 Aug 2013 13:14:25 +0000 (16:14 +0300)]
HS 2.0R2: Add support for Policy/MaximumBSSLoadValue

The new credential parameter max_bss_load can be used to specify
restrictions on BSS Load in the home network.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add support for Policy/MinBackhaulThreshold
Jouni Malinen [Mon, 5 Aug 2013 22:06:44 +0000 (01:06 +0300)]
HS 2.0R2: Add support for Policy/MinBackhaulThreshold

The new credential parameters min_{dl,ul}_bandwidth_{home,roaming} can
be used to specify restrictions on available backhaul bandwidth.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add tracking of provisioning SP
Jouni Malinen [Fri, 2 Aug 2013 16:09:11 +0000 (19:09 +0300)]
HS 2.0R2: Add tracking of provisioning SP

The new provisioning_sp cred field can now be used to track which SP
provisioned the credential. This makes it easier to find the matching
PPS MO from the management tree (./Wi-Fi/<provisioning_sp>).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add WFA server-only EAP-TLS peer method
Jouni Malinen [Tue, 23 Jul 2013 18:21:36 +0000 (21:21 +0300)]
HS 2.0R2: Add WFA server-only EAP-TLS peer method

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add OSEN client implementation
Jouni Malinen [Tue, 23 Jul 2013 18:24:05 +0000 (21:24 +0300)]
HS 2.0R2: Add OSEN client implementation

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add common OSEN definitions
Jouni Malinen [Tue, 23 Jul 2013 18:23:25 +0000 (21:23 +0300)]
HS 2.0R2: Add common OSEN definitions

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add GAS operation duration statistics into debug
Jouni Malinen [Sat, 15 Jun 2013 03:41:51 +0000 (20:41 -0700)]
HS 2.0R2: Add GAS operation duration statistics into debug

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add routine for fetching OSU provider information
Jouni Malinen [Fri, 25 Jan 2013 22:10:41 +0000 (00:10 +0200)]
HS 2.0R2: Add routine for fetching OSU provider information

The new wpa_cli fetch_osu command can be used to fetch information about
all OSU providers and write that to a text file with the icons in
separate files. cancel_osu_fetch command can be used to stop ongoing OSU
provider list fetch.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add OSU Providers list ANQP element
Jouni Malinen [Tue, 8 Jan 2013 21:51:16 +0000 (23:51 +0200)]
HS 2.0R2: Add OSU Providers list ANQP element

wpa_supplicant can now request OSU Providers list with "hs20_anqp_get
<BSSID> 8".

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add Icon Request and Icon binary File ANQP elements
Jouni Malinen [Thu, 20 Dec 2012 19:15:05 +0000 (21:15 +0200)]
HS 2.0R2: Add Icon Request and Icon binary File ANQP elements

wpa_supplicant can request OSU icon data with "hs20_icon_request <BSSID>
<icon filename>". This transmits an Icon Request ANQP element and
processes the response in Icon Binary File ANQP elements.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add STA support for Deauthentication Request notification
Jouni Malinen [Fri, 26 Jul 2013 19:12:37 +0000 (22:12 +0300)]
HS 2.0R2: Add STA support for Deauthentication Request notification

If requested, disable the network based on the HS 2.0 deauthentication
request.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Add WNM-Notification Request for Subscription Remediation
Jouni Malinen [Fri, 2 Nov 2012 11:05:57 +0000 (13:05 +0200)]
HS 2.0R2: Add WNM-Notification Request for Subscription Remediation

Subscription remediation notification WNM-Notification Request is now
shown in the following way in wpa_supplicant control interface:
<3>HS20-SUBSCRIPTION-REMEDIATION http://example.com/foo/

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoHS 2.0R2: Update Indication element to Release 2
Jouni Malinen [Fri, 2 Nov 2012 10:08:11 +0000 (12:08 +0200)]
HS 2.0R2: Update Indication element to Release 2

The HS 2.0 Indication element from wpa_supplicant now includes the
release number field and wpa_supplicant shows the release number of the
AP in STATUS command (hs20=1 replaced with hs20=<release>).

The new update_identifier field in the cred block can now be used to
configure the PPS MO ID so that wpa_supplicant adds it to the Indication
element in Association Request frames.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoInterworking: Allow roaming partner configuration
Jouni Malinen [Thu, 6 Dec 2012 06:48:18 +0000 (22:48 -0800)]
Interworking: Allow roaming partner configuration

The new roaming_partner parameter within a cred block can be used to
configure priorities for roaming partners.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agonl80211: Add driver capability for GTK_NOT_USED
Jouni Malinen [Mon, 27 Jan 2014 17:11:15 +0000 (19:11 +0200)]
nl80211: Add driver capability for GTK_NOT_USED

Many drivers support operation without GTK configured, but most (if any)
today do not advertise this. Handle this by skipping GTK cipher suite
configuration if the driver did not advertise support in order to work
around cfg80211 validation steps.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agoDo not clear global pmf setting on FLUSH
Jouni Malinen [Mon, 27 Jan 2014 16:30:40 +0000 (18:30 +0200)]
Do not clear global pmf setting on FLUSH

This parameter was actually used in some testing cases in a way that did
not really work well with the FLUSH command ending up disabling PMF.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

10 years agotests: Clear pmf parameter on reset()
Jouni Malinen [Tue, 25 Feb 2014 23:23:43 +0000 (01:23 +0200)]
tests: Clear pmf parameter on reset()

This is in preparation of removing pmf parameter reset on the FLUSH
command.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoOnly try fast reconnect if network is not disabled
Jouni Malinen [Tue, 18 Feb 2014 10:07:06 +0000 (12:07 +0200)]
Only try fast reconnect if network is not disabled

Previously, it would have been possible for the network to be marked
disabled and that marking to be ignored if a recoverable disconnection
reason event were processed. Avoid this by verifying network status
before trying to reconenct back to the same BSS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify domain_suffix_match in a cred block
Jouni Malinen [Tue, 25 Feb 2014 21:40:29 +0000 (23:40 +0200)]
tests: Verify domain_suffix_match in a cred block

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify Interworking network selection with no auth params
Jouni Malinen [Tue, 25 Feb 2014 21:16:54 +0000 (23:16 +0200)]
tests: Verify Interworking network selection with no auth params

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify Interworking network selection reconnection
Jouni Malinen [Tue, 25 Feb 2014 20:41:03 +0000 (22:41 +0200)]
tests: Verify Interworking network selection reconnection

This verifies that 'INTERWORKING_SELECT auto' is able to roam to a
higher priority network when executed while connected to a lower
priority network.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoInterworking: Prefer last added network during network selection
Jouni Malinen [Tue, 25 Feb 2014 20:37:57 +0000 (22:37 +0200)]
Interworking: Prefer last added network during network selection

Previously, any network block could be used to select the BSS to connect
to when processing scan results after Interworking network selection.
This can result in somewhat unexpected network selection in cases where
credential preferences indicated that a specific network was selected,
but another network ended up getting used for the connection. While the
older networks continue to be valid, add special processing for this
initial post-interworking-connect case to get more consistent network
selection to match with the Interworking network selection result.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Add module tests for blacklist to complete coverage
Jouni Malinen [Tue, 25 Feb 2014 18:04:16 +0000 (20:04 +0200)]
tests: Add module tests for blacklist to complete coverage

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Remove unnecessary ifdef CONFIG_NO_CONFIG_WRITE
Jouni Malinen [Tue, 25 Feb 2014 17:29:05 +0000 (19:29 +0200)]
P2P: Remove unnecessary ifdef CONFIG_NO_CONFIG_WRITE

wpa_config_write() is defined as a dummy function even if actual
operation to write the configuration file are commented out from the
build. This cleans up the code a bit and removed a compiler warning on
set-only variable.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoFix documentation for wpa_supplicant_global_ctrl_iface_process()
Purushottam Kushwaha [Tue, 25 Feb 2014 13:55:53 +0000 (15:55 +0200)]
Fix documentation for wpa_supplicant_global_ctrl_iface_process()

This fixes a copy-paste error in the function name in
wpa_supplicant_global_ctrl_iface_process() documentation.

Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
10 years agohwsim tests: Add support for the chanctx flag when creating radios
Luciano Coelho [Mon, 10 Feb 2014 15:06:19 +0000 (17:06 +0200)]
hwsim tests: Add support for the chanctx flag when creating radios

Add a new option to set the use_chanctx flag when creating a radio.
While at it, refactor the arguments parsing code to use argparse.

Signed-hostap: Luciano Coelho <luciano.coelho@intel.com>

10 years agoDFS: Fix coding style (missing whitespace)
Jouni Malinen [Tue, 25 Feb 2014 14:47:22 +0000 (16:47 +0200)]
DFS: Fix coding style (missing whitespace)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoDFS: Add VHT160 available channels
Janusz Dziedzic [Sat, 15 Feb 2014 18:37:22 +0000 (19:37 +0100)]
DFS: Add VHT160 available channels

Add VHT160 available channels we can choose from when having detected a
radar event.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
10 years agohostapd: DFS allow mixed channels
Janusz Dziedzic [Sat, 15 Feb 2014 18:37:21 +0000 (19:37 +0100)]
hostapd: DFS allow mixed channels

Allow mixed DFS and non-DFS channels, e.g., VHT160 on channels 36-64.
This is useful for testing VHT160 with mac80211_hwsim.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
10 years agowpa_supplicant: Add support for IPv6 with UDP ctrl_iface
Janusz Dziedzic [Mon, 24 Feb 2014 12:22:16 +0000 (13:22 +0100)]
wpa_supplicant: Add support for IPv6 with UDP ctrl_iface

Add IPv6 support when using udp/udp-remote control interface using the
following new build configuration options:

CONFIG_CTRL_IFACE=udp6
CONFIG_CTRL_IFACE=udp6-remote

This is useful for testing, while we don't need to assign IPv4 address
(static or using DHCP) and can just use auto configured IPv6 addresses
(link local, which is based on the MAC address). Also add scope id
support for link local case.

For example,
./wpa_cli
./wpa_cli -i ::1,9877
./wpa_cli -i fe80::203:7fff:fe05:69%wlan0,9877

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
10 years agohostapd: Deauthenticate clients forbidden by maclist changes
Emanuel Taube [Tue, 18 Feb 2014 10:36:35 +0000 (11:36 +0100)]
hostapd: Deauthenticate clients forbidden by maclist changes

After adding or removing a MAC address from a list, the
corresponding station was not deauthenticated as expected.

Signed-off-by: Emanuel Taube <emanuel.taube@gmail.com>
10 years agohostapd: Make it possible to remove addresses from maclists
Emanuel Taube [Tue, 25 Feb 2014 09:59:44 +0000 (10:59 +0100)]
hostapd: Make it possible to remove addresses from maclists

It is already possible to add MAC addresses at runtime. This patch
allows also to remove some of them by using the prefix "-" in the
address file.

Signed-off-by: Emanuel Taube <emanuel.taube@gmail.com>
10 years agoAdd os_remove_in_array()
Emanuel Taube [Tue, 25 Feb 2014 09:59:44 +0000 (10:59 +0100)]
Add os_remove_in_array()

This can be used to remove members from an array.

Signed-off-by: Emanuel Taube <emanuel.taube@gmail.com>
10 years agoForce OFDM/HT/VHT to be disabled on channel 14
Jouni Malinen [Tue, 25 Feb 2014 11:52:26 +0000 (13:52 +0200)]
Force OFDM/HT/VHT to be disabled on channel 14

The regulatory rules in Japan do not allow OFDM to be used on channel
14. While this was to some extend assumed to be enforced by drivers
(many of which apparently don't), it is safer to make hostapd enforce
this by disabling any OFDM-related functionality. This tries to avoid
backwards compatibility issues by downgrading the mode rather than
rejecting the invalid configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agonl80211: Show regulatory rule flags in debug output
Jouni Malinen [Tue, 25 Feb 2014 11:34:20 +0000 (13:34 +0200)]
nl80211: Show regulatory rule flags in debug output

These can be useful in understanding why some channels are disabled.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agohostapd: Configure spectrum management capability
Chaitanya T K [Fri, 21 Feb 2014 13:42:18 +0000 (14:42 +0100)]
hostapd: Configure spectrum management capability

Add configuration of Spectrum Management subfield in the Capability
Information of Beacon, Probe Response, and Association Response frames.
Spectrum Management bit is set when directly requested by new
configuration option spectrum_mgmt_required=1 or when AP is running on
DFS channels. In the future, also TPC shall require this bit to be set.

Signed-hostap: Srinivasan <srinivasanb@posedge.com>
Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com>
Signed-hostap: Marek Puzyniak <marek.puzyniak@tieto.com>

10 years agohostapd: Add Power Constraint element
Srinivasan B [Fri, 21 Feb 2014 13:42:17 +0000 (14:42 +0100)]
hostapd: Add Power Constraint element

Add Power Constraint information element to Beacon and Probe Response
frames when hostapd is configured on 5 GHz band and Country information
element is also added. According to IEEE Std 802.11-2012 a STA shall
determine a local maximum transmit power for the current channel based
on information derived from Country and Power Constraint elements.

In order to add Power Constraint element ieee80211d option need to be
enabled and new local_pwr_constraint config option need to be set to
unsigned value in units of decibels. For now this value is statically
configured but the future goal is to implement dynamic TPC algorithm
to control local power constraint.

Signed-hostap: Srinivasan <srinivasanb@posedge.com>
Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com>
Signed-hostap: Marek Puzyniak <marek.puzyniak@tieto.com>

10 years agoFix spelling s/algorith/algorithm/
Stefan Lippers-Hollmann [Thu, 20 Feb 2014 21:19:12 +0000 (21:19 +0000)]
Fix spelling s/algorith/algorithm/

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
10 years agotests: Enable CCMP fragmentation check
Jouni Malinen [Mon, 24 Feb 2014 15:15:16 +0000 (17:15 +0200)]
tests: Enable CCMP fragmentation check

This was triggering failures due to a mac80211 bug that has now been
fixed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoDo not start another connect work while one is pending
Jouni Malinen [Mon, 24 Feb 2014 13:22:35 +0000 (15:22 +0200)]
Do not start another connect work while one is pending

It was possible for the connect or sme-connect radio work to get
re-scheduled while an earlier request was still pending, e.g.,
select_network is issued at the moment a scan radio work is in progress
and the old scan results are recent enough for starting the connection.
This could result in unexpected attempt to re-associate immediately
after completing the first connection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: WPS UPnP operations
Jouni Malinen [Sat, 22 Feb 2014 12:06:58 +0000 (14:06 +0200)]
tests: WPS UPnP operations

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WPS UPnP SSDP testing
Jouni Malinen [Sat, 22 Feb 2014 09:52:59 +0000 (11:52 +0200)]
tests: WPS UPnP SSDP testing

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Stop WPS ER on station reset
Jouni Malinen [Mon, 24 Feb 2014 11:55:42 +0000 (13:55 +0200)]
tests: Stop WPS ER on station reset

This seems to be needed in some cases to avoid issues in test cases that
assume there are no other ERs running.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoWPS: Fix UNSUBSCRIBE error returns if NT or CALLBACK header is used
Jouni Malinen [Sat, 22 Feb 2014 16:57:41 +0000 (18:57 +0200)]
WPS: Fix UNSUBSCRIBE error returns if NT or CALLBACK header is used

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoWPS: Fix UNSUBSCRIBE to return 412 if no SID match found
Jouni Malinen [Sat, 22 Feb 2014 16:51:37 +0000 (18:51 +0200)]
WPS: Fix UNSUBSCRIBE to return 412 if no SID match found

UPnP-arch-DeviceArchitecture describe ErrorCode 412 to be used for the
case where no un-epxired subscription matches. This used to return 200
which is not strictly speaking correct even though it is unlikely to
cause any problems.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoWPS: Remove unnecessary filename NULL check
Jouni Malinen [Sat, 22 Feb 2014 11:43:08 +0000 (13:43 +0200)]
WPS: Remove unnecessary filename NULL check

The caller of the GET parser is checking this already and the GET case
was the only one that ended up doing the duplicated validation step.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Remove forgotten tcpdump references
Jouni Malinen [Sat, 22 Feb 2014 08:47:49 +0000 (10:47 +0200)]
tests: Remove forgotten tcpdump references

tcpdump has not been used in the test scripts for a while, so no need
to stop it from stop.sh.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Fix the file comment to describe what this script does
Jouni Malinen [Fri, 21 Feb 2014 18:25:25 +0000 (20:25 +0200)]
tests: Fix the file comment to describe what this script does

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Change the python interpreter directive
Roger Zanoni [Fri, 21 Feb 2014 18:23:56 +0000 (20:23 +0200)]
tests: Change the python interpreter directive

This makes the script check the environment for the current python
interpreter in use instead of assuming that the python executable points
to a python 2 interpreter.

Signed-off-by: Roger Zanoni <roger.zanoni@openbossa.org>
10 years agotests: Remove unnecessary interpreter line from most python files
Jouni Malinen [Fri, 21 Feb 2014 18:21:53 +0000 (20:21 +0200)]
tests: Remove unnecessary interpreter line from most python files

Only run-tests.py is actually executed, so there is no need to specify
the interpreter in all the helper files and test script files.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoP2P: Fix missing eloop_cancel_timeout in invitation trigger
Rahul Jain [Thu, 20 Feb 2014 11:04:09 +0000 (16:34 +0530)]
P2P: Fix missing eloop_cancel_timeout in invitation trigger

When a Probe Request frame from an invitation peer is received, a timer
is schedule to start invitation. However, this could have been scheduled
multiple times (once per Probe Request frame) which is undesirable since
only a single invitation should be initiated.

Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
10 years agotests: Add module tests for WPS attribute parsing
Jouni Malinen [Thu, 20 Feb 2014 23:15:16 +0000 (01:15 +0200)]
tests: Add module tests for WPS attribute parsing

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Add a module test integration to hwsim tests
Jouni Malinen [Thu, 20 Feb 2014 22:14:30 +0000 (00:14 +0200)]
tests: Add a module test integration to hwsim tests

CONFIG_MODULE_TESTS=y build option can now be used to build in module
tests into hostapd and wpa_supplicant binaries. These test cases will be
used to get better testing coverage for various details that are
difficult to test otherwise through the control interface control. A
single control interface command is used to executed these tests within
the hwsim test framework. This commit adds just the new mechanism, but no
module tests are yet integrated into this mechanism.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoWPS: Fix parsing of 0-length WFA vendor extension subelement
Jouni Malinen [Fri, 21 Feb 2014 11:05:37 +0000 (13:05 +0200)]
WPS: Fix parsing of 0-length WFA vendor extension subelement

The previous parser would have skipped a WFA vendor extension attribute
that includes only a single zero-length subelement. No such subelement
has been defined so far, so this does not really affect any
functionality, but better make the parser address this correctly should
such an element ever be added.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Add even more debug prints for Probe Request in non-Listen state
Jouni Malinen [Thu, 20 Feb 2014 14:59:29 +0000 (16:59 +0200)]
P2P: Add even more debug prints for Probe Request in non-Listen state

It looks like discovery_dev_id test case can still fail and based on the
previously added debug prints, this is happening since the P2P module
believes it is not in Listen state even when a P2P_LISTEN was issued.
p2p_listen_cb() did not get called on remain-on-channel event for some
reason, so lets add more debug to find out why this can happen.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAvoid undefined references with CONFIG_WPA_TRACE_BFD=y
Roger Zanoni [Wed, 19 Feb 2014 19:46:11 +0000 (15:46 -0400)]
Avoid undefined references with CONFIG_WPA_TRACE_BFD=y

libdl, libiberty, and libzlib are dependencies for libbfd.

Signed-off-by: Roger Zanoni <roger.zanoni@openbossa.org>
10 years agowpa_debug: Remove 2048 byte message length limit
Anders Kaseorg [Sun, 16 Feb 2014 00:08:32 +0000 (19:08 -0500)]
wpa_debug: Remove 2048 byte message length limit

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
10 years agotests: Increase P2P SD test coverage
Jouni Malinen [Thu, 20 Feb 2014 14:17:48 +0000 (16:17 +0200)]
tests: Increase P2P SD test coverage

Verify cases both with multiple peers (one of which not advertising any
services) and with multiple SD queries.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Address few issues seen with P2P SD
Jithu Jance [Thu, 20 Feb 2014 11:43:25 +0000 (17:13 +0530)]
P2P: Address few issues seen with P2P SD

Suppose we have multiple peers and we have peers advertising SD
capability, but no services registered for advertising. In this case,
even if there are multiple broadcast queries set, we might end up
sending only the lastly added broadcast query to the same device (since
SD_INFO won't get set for the first broadcast query). Add support for
multiple wildcard queries to be tracked to enable this type of use
case.

Some times it is seen that before advancing to next device in the list,
the scan results come and update SD_SCHEDULE flag. This will result in
sending the already sent query to the same device without giving chance
to other devices. This issue again is seen with peer devices advertising
SD capability without any services registered.

Signed-off-by: Jithu Jance <jithu@broadcom.com>
10 years agoTLS: Add tls_disable_tlsv1_1 and tls_disable_tlsv1_2 phase1 params
Dmitry Shmidt [Wed, 19 Feb 2014 21:21:58 +0000 (13:21 -0800)]
TLS: Add tls_disable_tlsv1_1 and tls_disable_tlsv1_2 phase1 params

These can be used to disable TLSv1.1 and TLSv1.2 as a workaround for AAA
servers that have issues interoperating with newer TLS versions.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agotests: Verify NAS identification attributes in Disconnect-Request
Jouni Malinen [Thu, 20 Feb 2014 11:56:27 +0000 (13:56 +0200)]
tests: Verify NAS identification attributes in Disconnect-Request

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoRADIUS DAS: Add support for NAS identification attributes
Jouni Malinen [Thu, 20 Feb 2014 11:55:36 +0000 (13:55 +0200)]
RADIUS DAS: Add support for NAS identification attributes

This allows NAS-IP-Address, NAS-Identifier, and NAS-IPv6-Address to be
included in the Disconnect-Request packets.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify that Disconnect-Request prevents PMKSA caching
Jouni Malinen [Thu, 20 Feb 2014 11:27:16 +0000 (13:27 +0200)]
tests: Verify that Disconnect-Request prevents PMKSA caching

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoRADIUS DAS: Remove PMKSA entry on Disconnect-Request
Jouni Malinen [Thu, 20 Feb 2014 11:26:22 +0000 (13:26 +0200)]
RADIUS DAS: Remove PMKSA entry on Disconnect-Request

When a station is disconnected based on Disconnect-Request, it is better
to force the station to go through full EAP authentication if it tries
to reconnect.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoWPS: Fix STA state validation when processing PutWLANResponse
Jouni Malinen [Wed, 19 Feb 2014 21:51:55 +0000 (23:51 +0200)]
WPS: Fix STA state validation when processing PutWLANResponse

It is possible for an ER to send an unexpected PutWLANResponse action
when the destination STA is in disassociated, but not fully
deauthenticated state. sta->eapol_sm can be NULL in such state and as
such, it would be possible to hit a NULL pointer dereference in the
eapol_auth_eap_pending_cb() call at the end of the
hostapd_wps_probe_req_rx() when trying to proxy the WPS message to the
station. Fix this by validating that sta->eapol_sm is set before
processing the message.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAndroid: Use external libnl 2.0 dynamic library
Dmitry Shmidt [Wed, 19 Feb 2014 00:26:10 +0000 (16:26 -0800)]
Android: Use external libnl 2.0 dynamic library

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoFix hostapd and wpa_supplicant build with binutils >= 2.24.x
Roger Zanoni [Mon, 17 Feb 2014 19:02:47 +0000 (15:02 -0400)]
Fix hostapd and wpa_supplicant build with binutils >= 2.24.x

Using binutils >= 2.24.x and setting
CONFIG_WPA_TRACE/CONFIG_WPA_TRACE_BDF causes both builds to fail with
"#error config.h must be included before this header" message.

Since version 2.24.x, the bfd header checks for PACKAGE and
PACKAGE_VERSION macros.

As suggested in http://sourceware.org/bugzilla/show_bug.cgi?id=14243
projects that use bfd and don't use autotools should define a PACKAGE
macro.

Signed-off-by: Roger Zanoni <roger.zanoni@openbossa.org>
10 years agoRevert "OpenSSL: Do not accept SSL Client certificate for server"
Jouni Malinen [Wed, 19 Feb 2014 09:56:02 +0000 (11:56 +0200)]
Revert "OpenSSL: Do not accept SSL Client certificate for server"

This reverts commit 51e3eafb68e15e78e98ca955704be8a6c3a7b304. There are
too many deployed AAA servers that include both id-kp-clientAuth and
id-kp-serverAuth EKUs for this change to be acceptable as a generic rule
for AAA authentication server validation. OpenSSL enforces the policy of
not connecting if only id-kp-clientAuth is included. If a valid EKU is
listed with it, the connection needs to be accepted.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoP2P: Enable U-APSD support on GO automatically
Jouni Malinen [Mon, 17 Feb 2014 11:15:29 +0000 (13:15 +0200)]
P2P: Enable U-APSD support on GO automatically

Since P2P specification mandates P2P GO to support WMM-PS with legacy
STAs, enable this automatically if the driver indicates support for
U-APSD in AP mode. The "P2P_SET go_apsd 0" command can still be used to
disable this if needed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Add more debug prints for Probe Request processing
Jouni Malinen [Mon, 17 Feb 2014 09:43:53 +0000 (11:43 +0200)]
P2P: Add more debug prints for Probe Request processing

It can be helpful to see from the debug log why the P2P Device role did
not reply to a Probe Request frame.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Add more time for P2P discovery tests
Jouni Malinen [Mon, 17 Feb 2014 09:42:43 +0000 (11:42 +0200)]
tests: Add more time for P2P discovery tests

It looks like some of the discovery_* test cases have been failing every
now and then on the virtual server and the one second timeout could have
been a bit too short to cover some possible timing cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agowpa_supplicant: Complete radio works on disable event
Andrei Otcheretianski [Thu, 13 Feb 2014 09:24:00 +0000 (11:24 +0200)]
wpa_supplicant: Complete radio works on disable event

While testing rfkill blocking of a scanning interface, it
was seen that the ongoing scan never completes. This happens
since EVENT_SCAN_RESULTS is discarded on a disabled interface.

Fix this and also other possible radio work completion issues
by removing all the radio works (including started) of the
disabled interface.

To be able to remove already started radio works, make their
callbacks be reentrant with deinit flag (when the work
is started), so each radio work should be able to handle
its own termination.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

10 years agotests: Verify CoA-Request behavior
Jouni Malinen [Sat, 15 Feb 2014 20:03:06 +0000 (22:03 +0200)]
tests: Verify CoA-Request behavior

This version verifies that hostapd NAKs a valid request since
CoA-Request is not yet supported.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Convert connect() to use kwargs
Jouni Malinen [Sat, 15 Feb 2014 17:52:56 +0000 (19:52 +0200)]
tests: Convert connect() to use kwargs

This makes it more convenient to add new network block parameters.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Verify RADIUS Disconnect-Request behavior
Jouni Malinen [Sat, 15 Feb 2014 17:27:35 +0000 (19:27 +0200)]
tests: Verify RADIUS Disconnect-Request behavior

This uses pyrad to build and send various Disconnect-Request packets to
hostapd.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoConvert RADIUS debug dumps to use wpa_printf()
Jouni Malinen [Sat, 15 Feb 2014 17:26:12 +0000 (19:26 +0200)]
Convert RADIUS debug dumps to use wpa_printf()

This allows the debug dumps of RADIUS messages to be captured through
normal wpa_printf() mechanisms.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoEAP-SIM DB: Remove client socket file on connect() error
Jouni Malinen [Sat, 15 Feb 2014 14:45:57 +0000 (16:45 +0200)]
EAP-SIM DB: Remove client socket file on connect() error

If the connection from hostapd authentication server to hlr_auc_gw fails
due to hlr_auc_gw not running yet, the local socket file was left
behind. Delete the socket file on connect() failure path.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Verify RADIUS server MIB values
Jouni Malinen [Sat, 15 Feb 2014 13:57:21 +0000 (15:57 +0200)]
tests: Verify RADIUS server MIB values

Enable hostapd control interface for the RADIUS server instance and
verify that the RADIUS server MIB counters are incremented.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Verify RADIUS accounting functionality
Jouni Malinen [Sat, 15 Feb 2014 13:38:30 +0000 (15:38 +0200)]
tests: Verify RADIUS accounting functionality

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Build hlr_auc_gw separately for code coverage analysis
Jouni Malinen [Sat, 15 Feb 2014 15:07:35 +0000 (17:07 +0200)]
tests: Build hlr_auc_gw separately for code coverage analysis

This improves accuracy of the code coverage reports with hostapd-as-AS
and hlr_auc_gw getting analyzed separately.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRADIUS: Add minimal accounting server support
Jouni Malinen [Sat, 15 Feb 2014 13:37:53 +0000 (15:37 +0200)]
RADIUS: Add minimal accounting server support

This can be used to test RADIUS Accounting in hostapd.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Verify NtPasswordHash with different UTF-8 cases
Jouni Malinen [Sat, 15 Feb 2014 10:08:50 +0000 (12:08 +0200)]
tests: Verify NtPasswordHash with different UTF-8 cases

This adds a password that uses one, two, and three octet encoding
for UTF-8 characters. The value is tested against a pre-configured
hash to verify that utf8_to_ucs2() function works correctly.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFix MSCHAP UTF-8 to UCS-2 conversion for three-byte encoding
Jouni Malinen [Sat, 15 Feb 2014 10:06:35 +0000 (12:06 +0200)]
Fix MSCHAP UTF-8 to UCS-2 conversion for three-byte encoding

This fixes issues in using a password that includes a UTF-8 character
with three-byte encoding with EAP methods that use NtPasswordHash
(anything using MSCHAPv2 or LEAP).

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFix nt_password_hash build
Jouni Malinen [Sat, 15 Feb 2014 09:49:09 +0000 (11:49 +0200)]
Fix nt_password_hash build

This needs librt on some systems for clock_gettime().

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRemove unused crypto_bignum_rshift()
Jouni Malinen [Sat, 15 Feb 2014 09:31:20 +0000 (11:31 +0200)]
Remove unused crypto_bignum_rshift()

Commit bf4f5d6570c847109378fd4f44e3d89c6ebb3acd removed the only user of
this function.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRemove unused NFC_RX_HANDOVER_REQ
Jouni Malinen [Sat, 15 Feb 2014 09:22:26 +0000 (11:22 +0200)]
Remove unused NFC_RX_HANDOVER_REQ

The more generic NFC_REPORT_HANDOVER is now used to report completed NFC
connection handover operations in either role and NFC_RX_HANDOVER_REQ
did not have any implementation within wpa_supplicant.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Set dh_file on EAP client
Jouni Malinen [Sat, 15 Feb 2014 08:42:56 +0000 (10:42 +0200)]
tests: Set dh_file on EAP client

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: EAP-TTLS and server certificate with client EKU
Jouni Malinen [Sat, 15 Feb 2014 08:33:55 +0000 (10:33 +0200)]
tests: EAP-TTLS and server certificate with client EKU

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Expired server certificate
Jouni Malinen [Sat, 15 Feb 2014 08:28:22 +0000 (10:28 +0200)]
tests: Expired server certificate

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Domain name suffix match against CN
Jouni Malinen [Sat, 15 Feb 2014 08:10:56 +0000 (10:10 +0200)]
tests: Domain name suffix match against CN

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agonl80211: Use nl80211_set_iface_id() to get hw features data
Ilan Peer [Thu, 13 Feb 2014 09:24:01 +0000 (11:24 +0200)]
nl80211: Use nl80211_set_iface_id() to get hw features data

Use nl80211_set_iface_id() in wpa_driver_nl80211_get_hw_feature_data(),
as otherwise the function fails for a P2P Device interface (which does
not have a netdev associated with it).

Signed-hostap: Ilan Peer <ilan.peer@intel.com>

10 years agohostapd: Add Operating Mode Notification support
Marek Kwaczynski [Mon, 10 Feb 2014 12:43:05 +0000 (13:43 +0100)]
hostapd: Add Operating Mode Notification support

Handle Operating Mode Notification received in (Re)Association Request
frames.

Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>

10 years agohostapd: Enable IEEE 802.11w in defconfig
Helmut Schaa [Fri, 7 Feb 2014 09:31:56 +0000 (10:31 +0100)]
hostapd: Enable IEEE 802.11w in defconfig

IEEE 802.11w is ratified since 2009 already, so this comment does not
seem to be valid anymore.

Signed-hostap: Helmut Schaa <helmut.schaa@googlemail.com>

10 years agoNFC: Workaround nfcpy message debug exception
Jouni Malinen [Thu, 13 Feb 2014 14:14:04 +0000 (16:14 +0200)]
NFC: Workaround nfcpy message debug exception

The current nfcpy version does not support new WSC connection handover
message format and the handover server fails to process the request due
to a debug print. As a temporary workaround, override
HandoverServer::_process_request() with a version that avoids pretty()
print of the handover messages. This can be removed once nfcpy has been
updated to support the new format.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAvoid NULL dereference in ieee802_1x_get_mib_sta() printf
Eytan Lifshitz [Mon, 10 Feb 2014 10:55:09 +0000 (12:55 +0200)]
Avoid NULL dereference in ieee802_1x_get_mib_sta() printf

In function ieee802_1x_get_mib_sta(), eap_server_get_name() may return
NULL, and it could be dereferenced immidiately by os_snprintf() (if the
snprintf implementation does not handle NULL pointer).

Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>

10 years agowpa_supplicant: Fix NULL dereference in tls_verify_cb()
Eytan Lifshitz [Mon, 10 Feb 2014 10:55:08 +0000 (12:55 +0200)]
wpa_supplicant: Fix NULL dereference in tls_verify_cb()

In function tls_verify_cb(), X509_STORE_CTX_get_current_cert() may
return NULL, and it will be dereferenced by X509_get_subject_name().

Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>

10 years agowpa_supplicant: Fix NULL dereference in eap_fast_parse_end()
Eytan Lifshitz [Mon, 10 Feb 2014 10:55:07 +0000 (12:55 +0200)]
wpa_supplicant: Fix NULL dereference in eap_fast_parse_end()

In eap_fast_parse_end(), pos might be NULL if the line doesn't
contain '='.

Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>

10 years agoRemove unnecessary NULL check
Eytan Lifshitz [Mon, 10 Feb 2014 10:55:06 +0000 (12:55 +0200)]
Remove unnecessary NULL check

In send_assoc_resp(), sta was checked for NULL, although it can't be
NULL.

Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>

10 years agoFix theoretical NULL dereference in debug printf
Eytan Lifshitz [Mon, 10 Feb 2014 10:55:06 +0000 (12:55 +0200)]
Fix theoretical NULL dereference in debug printf

In hostapd_logger_cb(), module_str is checked for NULL (on a path that
does not get executed in practice), and then possibly dereferenced in
snprintf() anyway.

Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>