]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
10 years agotests: EAP-SIM/AKA with protected result indication
Jouni Malinen [Thu, 20 Mar 2014 21:47:58 +0000 (23:47 +0200)] 
tests: EAP-SIM/AKA with protected result indication

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoWPS: Do not advertise WPA/WPA2-Enterprise Auth Type Flags
Jouni Malinen [Thu, 20 Mar 2014 13:13:48 +0000 (15:13 +0200)] 
WPS: Do not advertise WPA/WPA2-Enterprise Auth Type Flags

While the device itself may support WPA/WPA2-Enterprise, enrollment of
credentials for EAP authentication is not supported through WPS. As
such, there is no need to claim support for these capabilities within
WPS information.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Authentication server using PKCS#12 file
Jouni Malinen [Wed, 19 Mar 2014 22:16:00 +0000 (00:16 +0200)] 
tests: Authentication server using PKCS#12 file

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Invalid ca_cert hash:// value
Jouni Malinen [Wed, 19 Mar 2014 22:02:00 +0000 (00:02 +0200)] 
tests: Invalid ca_cert hash:// value

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: TLS domain_suffix_match rejection due to incomplete label match
Jouni Malinen [Wed, 19 Mar 2014 21:50:57 +0000 (23:50 +0200)] 
tests: TLS domain_suffix_match rejection due to incomplete label match

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Increase altsubject_match coverage
Jouni Malinen [Wed, 19 Mar 2014 21:46:53 +0000 (23:46 +0200)] 
tests: Increase altsubject_match coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agonl80211: Do not indicate scan started event on scan_for_auth
Jouni Malinen [Tue, 18 Mar 2014 20:45:07 +0000 (22:45 +0200)] 
nl80211: Do not indicate scan started event on scan_for_auth

The scan_for_auth workaround for cfg80211 missing a BSS entry for the
target BSS during authentication uses a single channel scan controlled
within driver_nl80211.c. This operation does not indicate
EVENT_SCAN_RESULTS to the upper layer code. However, it did report
EVENT_SCAN_STARTED and this resulted in the radio work protection code
assuming that an external program triggered a scan, but that scan never
completed. This resulted in all new radio work items getting stuck
waiting for this scan to complete.

Fix this by handling the scan_for_auth situation consistently within
driver_nl80211.c by filtering both the EVENT_SCAN_STARTED and
EVENT_SCAN_RESULTS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Clean up debug log during exit path
Jouni Malinen [Mon, 17 Mar 2014 22:05:44 +0000 (00:05 +0200)] 
HS 2.0R2: Clean up debug log during exit path

deinit_ctx() may print debug information, so do not call
wpa_debug_close_file() before deinit_ctx().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Do not mandate OCSP response for EST operations
Jouni Malinen [Mon, 17 Mar 2014 22:03:59 +0000 (00:03 +0200)] 
HS 2.0R2: Do not mandate OCSP response for EST operations

OCSP validation is required only for the OSU operations and since the
EST server may use a different server certificate, it may not
necessarily support OCSP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Do not use OSU cert validation for EST
Jouni Malinen [Mon, 17 Mar 2014 21:56:17 +0000 (23:56 +0200)] 
HS 2.0R2: Do not use OSU cert validation for EST

There is no requirement for the EST server to use an OSU server
certificate, so do not require friendly name and icon hash matches for
EST cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Configure OSU client trust root more consistently
Jouni Malinen [Mon, 17 Mar 2014 21:46:12 +0000 (23:46 +0200)] 
HS 2.0R2: Configure OSU client trust root more consistently

Some of the code paths could have ended up ignoring CA file name from
command line due to overly complex way of setting ctx->ca_fname.
Configure this more consistently in osu_client.c as soon as the CA file
name has been determined.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Clean up debug from libcurl
Jouni Malinen [Mon, 17 Mar 2014 21:12:25 +0000 (23:12 +0200)] 
HS 2.0R2: Clean up debug from libcurl

Do not truncate CURLINFO entries on first linefeed to get full IN/OUT
headers and data into debug log. Use wpa_hexdump_ascii() if any
non-displayable characters are included. Remove the separate header/data
debug dumps since all that information is now available from the debug
callback.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoFix AP mode default TXOP Limit values for AC_VI and AC_VO
Jouni Malinen [Mon, 17 Mar 2014 16:23:13 +0000 (18:23 +0200)] 
Fix AP mode default TXOP Limit values for AC_VI and AC_VO

These were previous set to 3.0 and 1.5 ms which ended up using values 93
and 46 in 36 usec inits. However, the default values for these are
actually defined as 3.008 ms and 1.504 ms (94/47) and those values are
also listed in the hostapd.conf example.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoTLS testing: Add new test cases for RSA-DHE primes
Jouni Malinen [Sun, 16 Mar 2014 10:28:49 +0000 (12:28 +0200)] 
TLS testing: Add new test cases for RSA-DHE primes

test-tls-4: Short 511-bit RSA-DHE prime
test-tls-5: Short 767-bit RSA-DHE prime
test-tls-6: Bogus RSA-DHE "prime" 15
test-tls-7: Very short 58-bit RSA-DHE prime in a long container
test-tls-8: Non-prime as RSA-DHE prime

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoTLS client: Reject RSA-DHE prime if it shorter than 768 bits
Jouni Malinen [Sun, 16 Mar 2014 10:27:52 +0000 (12:27 +0200)] 
TLS client: Reject RSA-DHE prime if it shorter than 768 bits

Such short primes cannot really be considered secure enough for
authentication purposes.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoTLS testing: Fix test_flags check for ApplData report
Jouni Malinen [Sun, 16 Mar 2014 08:59:17 +0000 (10:59 +0200)] 
TLS testing: Fix test_flags check for ApplData report

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: wpa_supplicant MIB command
Jouni Malinen [Sat, 15 Mar 2014 22:18:03 +0000 (00:18 +0200)] 
tests: wpa_supplicant MIB command

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Supplicant-enforced PTK rekey
Jouni Malinen [Sat, 15 Mar 2014 22:13:23 +0000 (00:13 +0200)] 
tests: Supplicant-enforced PTK rekey

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: TDLS discovery
Jouni Malinen [Sat, 15 Mar 2014 22:03:07 +0000 (00:03 +0200)] 
tests: TDLS discovery

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: EAP TLS parameters using configuration blobs
Jouni Malinen [Sat, 15 Mar 2014 21:52:43 +0000 (23:52 +0200)] 
tests: EAP TLS parameters using configuration blobs

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoAllow config blobs to be set through ctrl_iface
Jouni Malinen [Sat, 15 Mar 2014 21:51:37 +0000 (23:51 +0200)] 
Allow config blobs to be set through ctrl_iface

"SET blob <name> <hexdump>" can now be used to set a configuration blob
through the wpa_supplicant control interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoACS: Fix VHT20
Michal Kazior [Fri, 28 Feb 2014 14:19:42 +0000 (15:19 +0100)] 
ACS: Fix VHT20

The center segment0 calculation for VHT20 ACS was incorrect. This caused
ACS to fail with: "Could not set channel for kernel driver".

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
10 years agotests: WPS AP PIN unlocking
Jouni Malinen [Sat, 15 Mar 2014 15:27:05 +0000 (17:27 +0200)] 
tests: WPS AP PIN unlocking

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WPS AP configuration using external settings management
Jouni Malinen [Sat, 15 Mar 2014 15:21:05 +0000 (17:21 +0200)] 
tests: WPS AP configuration using external settings management

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WPS PIN request file
Jouni Malinen [Sat, 15 Mar 2014 15:11:14 +0000 (17:11 +0200)] 
tests: WPS PIN request file

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: More HT40 co-ex scan cases
Jouni Malinen [Sat, 15 Mar 2014 14:11:45 +0000 (16:11 +0200)] 
tests: More HT40 co-ex scan cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFix HT40 co-ex scan for some pri/sec channel switches
Jouni Malinen [Sat, 15 Mar 2014 14:42:29 +0000 (16:42 +0200)] 
Fix HT40 co-ex scan for some pri/sec channel switches

Secondary channel was compared incorrectly (-4/4 vs. actual channel
number) which broke matching neighboring 40 MHz BSSes and only the
no-beacons-on-secondary-channel rule was applied in practice. Once
sec_chan was fixed, this triggered another issue in this function where
both rules to switch pri/sec channels could end up getting applied in a
way that effectively canceled the switch.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: VLAN with tagged interface
Jouni Malinen [Sat, 15 Mar 2014 13:49:32 +0000 (15:49 +0200)] 
tests: VLAN with tagged interface

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: AP using inactivity poll/disconnect
Jouni Malinen [Sat, 15 Mar 2014 11:46:01 +0000 (13:46 +0200)] 
tests: AP using inactivity poll/disconnect

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Go to listen state in go_neg_pin_authorized
Jouni Malinen [Sat, 15 Mar 2014 10:38:08 +0000 (12:38 +0200)] 
tests: Go to listen state in go_neg_pin_authorized

Previusly, the responding device was left in p2p_find state as a
consequence of using discover_peer() if the peer was not already known.
This was not the sequence that was supposed to be used here. Go to
listen-only state when waiting for the peer to initiate a previously
authorized GO Negotiation.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: RSN pre-authentication
Jouni Malinen [Sat, 15 Mar 2014 09:52:11 +0000 (11:52 +0200)] 
tests: RSN pre-authentication

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WDS STA mode
Jouni Malinen [Sat, 15 Mar 2014 08:42:46 +0000 (10:42 +0200)] 
tests: WDS STA mode

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRemove unused STA entry information
Jouni Malinen [Sat, 15 Mar 2014 07:57:10 +0000 (09:57 +0200)] 
Remove unused STA entry information

previous_ap and last_assoc_req were not really used for anything
meaninful, so get rid of them to reduce the size of per-STA memory
allocation.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: SAE mixed network and forced anti-clogging
Jouni Malinen [Sat, 15 Mar 2014 07:38:30 +0000 (09:38 +0200)] 
tests: SAE mixed network and forced anti-clogging

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: PeerKey attempt with unknown peer
Jouni Malinen [Fri, 14 Mar 2014 22:47:06 +0000 (00:47 +0200)] 
tests: PeerKey attempt with unknown peer

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFix hostapd_add_iface error path to deinit partially initialized BSS
Jouni Malinen [Fri, 14 Mar 2014 19:10:47 +0000 (21:10 +0200)] 
Fix hostapd_add_iface error path to deinit partially initialized BSS

It was possible for the control interface and some of the BSS setup to
be left partially initialized in failure cases while the BSS structures
were still freed. Fix this by properly cleaning up anything that may
have passed initialization successfully before freeing memory.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoFix external radio_work deinit path
Jouni Malinen [Fri, 14 Mar 2014 18:33:56 +0000 (20:33 +0200)] 
Fix external radio_work deinit path

The radio_work type was stored within the dynamically allocated
wpa_radio_work buffer and that buffer ended up getting freed before the
final use of the type string within radio_work_done(). This resulted in
freed memory being used for a debug print. Avoid this by freeing the
wpa_external_work instance after having completed radio_work_done() for
the related work.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAllow management group cipher to be configured
Jouni Malinen [Wed, 12 Mar 2014 18:26:37 +0000 (20:26 +0200)] 
Allow management group cipher to be configured

This allows hostapd to set a different management group cipher than the
previously hardcoded default BIP (AES-128-CMAC). The new configuration
file parameter group_mgmt_cipher can be set to BIP-GMAC-128,
BIP-GMAC-256, or BIP-CMAC-256 to select one of the ciphers defined in
IEEE Std 802.11ac-2013.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Do not create another group interface on NFC Token enable
Manish Bansal [Fri, 14 Mar 2014 14:55:10 +0000 (16:55 +0200)] 
P2P: Do not create another group interface on NFC Token enable

If a group interface is present and the command was issued on the group
interface, enable the token for that interface instead of creating a new
one.

Signed-off-by: Manish <manish.bansal@broadcom.com>
10 years agowpa_supplicant: Apply VHT_OVERRIDES to wpas_start_assoc_cb()
Paul Stewart [Fri, 14 Mar 2014 04:33:43 +0000 (21:33 -0700)] 
wpa_supplicant: Apply VHT_OVERRIDES to wpas_start_assoc_cb()

A previous patch "Support VHT capability overrides" missed one
place where HT overrides were being applied and where it would
also be useful to apply VHT overrides.

Signed-hostap: Paul Stewart <pstew@chromium.org>

10 years agohostapd: Supply default parameters for OBSS scan
Paul Stewart [Wed, 12 Mar 2014 22:28:39 +0000 (15:28 -0700)] 
hostapd: Supply default parameters for OBSS scan

For some client OBSS implementations that are performed in
firmware, all OBSS parameters need to be set to valid values.
Do this, as well as supplying the "20/40 Coex Mgmt Support"
flag in the extended capabilities IE.

Signed-hostap: Paul Stewart <pstew@chromium.org>

10 years agoTDLS: Add get_capability tdls command
Dmitry Shmidt [Thu, 13 Mar 2014 22:12:38 +0000 (15:12 -0700)] 
TDLS: Add get_capability tdls command

Command returns info in format: UNSUPPORTED/INTERNAL/EXTERNAL

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agotests: Verify VHT20 with center freq seq0 set to zero
Johannes Berg [Fri, 14 Mar 2014 14:48:13 +0000 (16:48 +0200)] 
tests: Verify VHT20 with center freq seq0 set to zero

This was found through a mac80211 bug which didn't correctly accept a
center segment 0 value of zero, so the test will fail until the mac80211
bug is fixed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agohostapd: For VHT 20/40, allow center segment 0 to be zero
Johannes Berg [Fri, 14 Mar 2014 14:45:21 +0000 (16:45 +0200)] 
hostapd: For VHT 20/40, allow center segment 0 to be zero

The 802.11ac amendment specifies that that the center segment 0 field
is reserved, so it should be zero. Hostapd previously required it to
be set, which is likely a good idea for interoperability, but allow it
to be unset. However, don't allow it to be set to a random value, only
allow zero and the correct channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agotests: Static MAC ACL
Jouni Malinen [Thu, 13 Mar 2014 21:27:11 +0000 (23:27 +0200)] 
tests: Static MAC ACL

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: require_vht=1
Jouni Malinen [Thu, 13 Mar 2014 21:17:04 +0000 (23:17 +0200)] 
tests: require_vht=1

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Use disable_dgaf=1 for more coverage
Jouni Malinen [Thu, 13 Mar 2014 21:14:08 +0000 (23:14 +0200)] 
tests: Use disable_dgaf=1 for more coverage

This runs one of the HS 2.0 test cases with DGAF disabled.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: RADIUS Disconnect-Request using CUI
Jouni Malinen [Thu, 13 Mar 2014 21:08:01 +0000 (23:08 +0200)] 
tests: RADIUS Disconnect-Request using CUI

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: WPS reconfiguration to open network
Jouni Malinen [Thu, 13 Mar 2014 20:56:07 +0000 (22:56 +0200)] 
tests: WPS reconfiguration to open network

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoGAS server: Remove incomplete remote ANQP processing
Jouni Malinen [Thu, 13 Mar 2014 19:12:39 +0000 (21:12 +0200)] 
GAS server: Remove incomplete remote ANQP processing

Some of the remote ANQP server concepts were introduces into gas_serv.c,
but these were not completed. Remote the unused implementation for now.
It can be added back if support for remote ANQP server is added at some
point.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: GAS with unknown advertisement protocol id
Jouni Malinen [Thu, 13 Mar 2014 18:58:14 +0000 (20:58 +0200)] 
tests: GAS with unknown advertisement protocol id

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify hostapd ENABLE/DISABLE/ENABLE
Jouni Malinen [Thu, 13 Mar 2014 18:41:54 +0000 (20:41 +0200)] 
tests: Verify hostapd ENABLE/DISABLE/ENABLE

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: HS 2.0 subrem from control interface
Jouni Malinen [Thu, 13 Mar 2014 17:36:36 +0000 (19:36 +0200)] 
tests: HS 2.0 subrem from control interface

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Per-station PSK with WPS
Jouni Malinen [Thu, 13 Mar 2014 11:28:31 +0000 (13:28 +0200)] 
tests: Per-station PSK with WPS

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoWPS: Extend per-station PSK to support ER case as well
Jouni Malinen [Thu, 13 Mar 2014 11:26:21 +0000 (13:26 +0200)] 
WPS: Extend per-station PSK to support ER case as well

When wpa_psk_file is used instead of wpa_psk/wpa_passphrase, each WPS
Enrollee was given a unique PSK. This did not work for the
station-as-Registrar case where ER would learn the current AP settings
instead of enrolling itself (i.e., when using the AP PIN instead of
station PIN). That case can be covered with a similar design, so
generate a per-device PSK when building M7 as an AP in wpa_psk_file
configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify PMF association comeback and STA initiated SA Query
Jouni Malinen [Wed, 12 Mar 2014 23:27:40 +0000 (01:27 +0200)] 
tests: Verify PMF association comeback and STA initiated SA Query

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agowpa_supplicant AP: Allow PMF to be enabled with ieee80211w
Jouni Malinen [Thu, 13 Mar 2014 16:00:08 +0000 (18:00 +0200)] 
wpa_supplicant AP: Allow PMF to be enabled with ieee80211w

The ieee80211w parameter was not previously copied to the hostapd BSS
structure from wpa_supplicant configuration, so PMF was practically
disabled. Allow it to be configured through the wpa_supplicant network
configuration block.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAllow reason code to be specified for DEAUTH/DISASSOC test frame
Jouni Malinen [Wed, 12 Mar 2014 23:26:09 +0000 (01:26 +0200)] 
Allow reason code to be specified for DEAUTH/DISASSOC test frame

hostapd DEAUTHENTICATE and DISASSOCIATE control interface commands
accepted both a test=<0/1> and reason=<val> parameters, but these were
not supported in the same command as a combination. Move the code around
a bit to allow that as well since it can be helpful for automated test
scripts.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: VHT functionality
Jouni Malinen [Wed, 12 Mar 2014 11:56:08 +0000 (13:56 +0200)] 
tests: VHT functionality

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoTDLS: Use QoS info from WMM IE obtained in TDLS frames
Sunil Dutt [Mon, 10 Feb 2014 07:02:32 +0000 (12:32 +0530)] 
TDLS: Use QoS info from WMM IE obtained in TDLS frames

TDLS Setup Request/Response frames from the peers include the WMM IE,
hence parse the same and consider the QoS Info from the WMM IE. The
qos_info obtained in the WMM IE overwrites the one obtained through
WLAN_EID_QOS attribute.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoFix CONFIG_NO_SCAN_PROCESSING=y build
Jouni Malinen [Wed, 12 Mar 2014 19:31:46 +0000 (21:31 +0200)] 
Fix CONFIG_NO_SCAN_PROCESSING=y build

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Report dev_found event (if not yet done) from GO Neg Req RX
Sunil Dutt Undekari [Thu, 6 Mar 2014 14:15:27 +0000 (19:45 +0530)] 
P2P: Report dev_found event (if not yet done) from GO Neg Req RX

p2p_find removes P2P_DEV_REPORTED flag from every existing P2P peer
entry. Thus, if a GO Negotiation Request frame is received before the
peer is re-discovered based on Probe Response frame, report
P2P-DEVICE-FOUND indication prior to the P2P-GO-NEG-REQUEST similarly to
how this is done the first time the peer is found.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: TKIP countermeasures
Jouni Malinen [Wed, 12 Mar 2014 15:58:27 +0000 (17:58 +0200)] 
tests: TKIP countermeasures

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Check for AP-DISABLED when setting up AP
Jouni Malinen [Wed, 12 Mar 2014 11:35:10 +0000 (13:35 +0200)] 
tests: Check for AP-DISABLED when setting up AP

This allows a critical error to be noticed more quickly and reported
more clearly in the test log.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoMark AP disabled if initialization steps fail
Jouni Malinen [Wed, 12 Mar 2014 11:33:22 +0000 (13:33 +0200)] 
Mark AP disabled if initialization steps fail

Previously, some of the last initialization steps could fail without
clearly marking the interface disabled. For example, configuring the
channel to the driver could fail, but hostapd would not clearly identify
as the interface not being in functional state apart from not moving it
to the ENABLED state. Send an AP-DISABLED event and mark interface state
DISABLED if such a setup operation fails.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Wait longer for hostapd REMOVE command to complete
Jouni Malinen [Wed, 12 Mar 2014 09:42:59 +0000 (11:42 +0200)] 
tests: Wait longer for hostapd REMOVE command to complete

Some kernel debugging options (especially
CONFIG_DEBUG_KOBJECT_RELEASE=y) can add significant blocking time to
interface removal with NL80211_CMD_DEL_INTERFACE and
SIOCGIFBR(BRCTL_DEL_BRIDGE) block for 1-8 seconds. This could result in
the VLAN test cases failing due to a wpaspy timeout on the REMOVE
command even though the issue was only in the kernel debugging code
making the operations significantly slower. Work around this by using a
longer timeout for that control interface command to allow this type of
debug kernel to be used.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add parse_cert command for debugging purposes
Jouni Malinen [Tue, 11 Mar 2014 22:29:36 +0000 (00:29 +0200)] 
HS 2.0R2: Add parse_cert command for debugging purposes

This hs20-osu-client client command can be used to parse a DER encoded
X.509v3 certificate with the logotype extensions and
id-wfa-hotspot-friendlyName values shown in detail.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add OSU client implementation
Jouni Malinen [Thu, 28 Mar 2013 08:27:27 +0000 (10:27 +0200)] 
HS 2.0R2: Add OSU client implementation

This adds a reference implementation of Hotspot 2.0 Release 2 OSU
client. While this implements all of the required functionality, it is
likely that a significant extensions would be used to integrate this
with user interfaces and operating system configuration components.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAdd os_file_exists()
Jouni Malinen [Thu, 28 Mar 2013 08:38:17 +0000 (10:38 +0200)] 
Add os_file_exists()

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add wrapper functions for libcurl
Jouni Malinen [Thu, 28 Mar 2013 08:23:12 +0000 (10:23 +0200)] 
HS 2.0R2: Add wrapper functions for libcurl

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add wrapper functions for libxml2
Jouni Malinen [Thu, 28 Mar 2013 08:23:12 +0000 (10:23 +0200)] 
HS 2.0R2: Add wrapper functions for libxml2

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add wrapper for system browser
Jouni Malinen [Wed, 9 Oct 2013 22:30:32 +0000 (15:30 -0700)] 
HS 2.0R2: Add wrapper for system browser

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add wrapper for wpadebug browser on Android
Jouni Malinen [Tue, 6 Aug 2013 15:29:43 +0000 (18:29 +0300)] 
HS 2.0R2: Add wrapper for wpadebug browser on Android

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add wrapper for Android browser for user interaction
Jouni Malinen [Tue, 30 Apr 2013 18:47:24 +0000 (21:47 +0300)] 
HS 2.0R2: Add wrapper for Android browser for user interaction

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add wrapper functions for WebKit
Jouni Malinen [Thu, 28 Mar 2013 08:23:12 +0000 (10:23 +0200)] 
HS 2.0R2: Add wrapper functions for WebKit

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAdd wpa_ctrl helper functions for upper level functionality
Jouni Malinen [Thu, 28 Mar 2013 08:19:33 +0000 (10:19 +0200)] 
Add wpa_ctrl helper functions for upper level functionality

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoClean up hostapd_config_fill() parsers
Jouni Malinen [Tue, 11 Mar 2014 20:55:39 +0000 (22:55 +0200)] 
Clean up hostapd_config_fill() parsers

Some of the parsing code was using a bit too complex design and could be
simplified after the earlier return-on-error cleanups.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoFix memory leaks on wpa_config_parse_string() error paths
Jouni Malinen [Tue, 11 Mar 2014 20:41:12 +0000 (22:41 +0200)] 
Fix memory leaks on wpa_config_parse_string() error paths

hostapd configuration parser did not free the temporary buffer on some
error paths.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoSimplify hostapd_config_fill() error reporting
Jouni Malinen [Tue, 11 Mar 2014 20:35:39 +0000 (22:35 +0200)] 
Simplify hostapd_config_fill() error reporting

There is no need for trying to count the number of errors in this
function since this is not a loop anymore and the return value will be
either 0 or 1.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoRemove extra indentation level from hostapd_config_fill()
Jouni Malinen [Tue, 11 Mar 2014 20:25:46 +0000 (22:25 +0200)] 
Remove extra indentation level from hostapd_config_fill()

The configuration file parsing routines were moved to a separate
function a while back, but left at the old indentation level to avoid
showing large diffs in the commit and to avoid conflicts with parallel
development in other branches. There is never a perfect time for this
type of changes, but we might as well finally get rid of that extra
indentation now with Hotspot 2.0 Rel 2 changes pulled in.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify reassociate-to-same-BSS commands
Jouni Malinen [Tue, 11 Mar 2014 18:08:18 +0000 (20:08 +0200)] 
tests: Verify reassociate-to-same-BSS commands

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agonl80211: Hide deauth event due to forced deauth-during-auth
Jouni Malinen [Tue, 11 Mar 2014 18:02:23 +0000 (20:02 +0200)] 
nl80211: Hide deauth event due to forced deauth-during-auth

If NL80211_CMD_AUTHENTICATE fails due to exiting authentication, forced
deauthentication is used to clear cfg80211 start and a new
authentication command is retried. This resulted in an extra
disconnection event getting delivered to the core wpa_supplicant code
and that could end up confusing state there, e.g., by clearing
connection parameters like wpa_s->key_mgmt and preventing the following
association from reaching proper COMPLETED state with open networks.

Fix this by hiding the unnecessary disconnection event when using the
deauth-for-auth workaround.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAdd a reattach command for fast reassociate-back-to-same-BSS
Peter Qiu [Thu, 6 Mar 2014 18:06:04 +0000 (10:06 -0800)] 
Add a reattach command for fast reassociate-back-to-same-BSS

Add "reattach" command to perform single-channel single-ssid scan
instead of full scan when trying to reconnect to the currently
"connected" network (assuming old scan results are not current enough to
skip the scan completely). This allows the scan result to come back in
much faster time. In ath9k, the scan took around 12 seconds with full
background scan, and only 0.1 second with the single-channel single-ssid
scan. Thus, take much less time for the client to re-establish
connection with the currently "connected" network.

Signed-hostap: Peter Qiu <zqiu@chromium.org>

10 years agohostapd: Document interworking realm EAP Method types
Ben Greear [Thu, 6 Mar 2014 00:19:58 +0000 (16:19 -0800)] 
hostapd: Document interworking realm EAP Method types

Add link to the EAP type definitions document.

Signed-hostap: Ben Greear <greearb@candelatech.com>

10 years agoDFS: Add extra debugging messages
Ben Greear [Thu, 6 Mar 2014 00:19:53 +0000 (16:19 -0800)] 
DFS: Add extra debugging messages

This might help someone realize why their hostapd config isn't working
properly.

Signed-off-by: Ben Greear <greearb@candelatech.com>
10 years agowpa_supplicant: Put upper bound on initial scan time delay
Ben Greear [Thu, 6 Mar 2014 00:19:49 +0000 (16:19 -0800)] 
wpa_supplicant: Put upper bound on initial scan time delay

This makes stations associate much faster when using lots of stations.
In addition, this avoids delaying the initial scan continuously for
dynamic interface removal/addition cases.

Signed-hostap: Ben Greear <greearb@candelatech.com>

10 years agonl80211: Fix P2P Device handling when starting with RF-kill blocked
Moshe Benji [Mon, 3 Mar 2014 12:53:21 +0000 (14:53 +0200)] 
nl80211: Fix P2P Device handling when starting with RF-kill blocked

On RF-kill, we should not request the kernel to start a P2P device. In
addition, we should call i802_set_iface_flags() both for a P2P Device
interface and any other interface instead of calling a dedicated
function for each.

Signed-off-by: Moshe Benji <Moshe.Benji@intel.com>
10 years agoPNO: Change sched_scan_stopped event to handle pending PNO properly
Alexander Bondar [Wed, 26 Feb 2014 06:04:11 +0000 (08:04 +0200)] 
PNO: Change sched_scan_stopped event to handle pending PNO properly

When a sched_scan_stopped event is received and there is a pending PNO,
it used regular scheduled scan parameters instead of PNO specific
parameters. Change it by calling wpas_start_pno().

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
10 years agoPNO: Move and rename pno_start()/pno_stop()
Alexander Bondar [Wed, 26 Feb 2014 06:04:10 +0000 (08:04 +0200)] 
PNO: Move and rename pno_start()/pno_stop()

Move pno_start() and pno_stop() to scan.c as a more relevant location
and rename them to wpas_start_pno()/wpas_stop_pno().

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
10 years agotests: Fix trace parameter invocation
Eduardo Abinader [Tue, 25 Feb 2014 21:27:03 +0000 (17:27 -0400)] 
tests: Fix trace parameter invocation

If trace-cmd command does not exist, run-tests.py could end up hanging
in a loop waiting for input. Fix this simply by checking whether the
trace-cmd command can be executed sucessfully and exiting the script if
not.

Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
10 years agohostapd: Process management frames only once per BSS
Simon Wunderlich [Mon, 10 Feb 2014 15:04:17 +0000 (16:04 +0100)] 
hostapd: Process management frames only once per BSS

At least in nl80211, broadcast management frames like Probe Request
frames, may be processed multiple times per BSS if multi-BSS is active
and NL80211_CMD_FRAME event is used to deliver them. In the case of
Probe Request frames, hostapd will create multiple redundant Probe
Response frames which are problematic when many BSS are on one channel.

This problem is caused by driver_nl80211 generating an event for
wpa_supplicant_event() for each BSS, and hostapd_mgmt_rx() calls
ieee802_11_mgmt() for each BSS, too.

Fix this by processing broadcast events only for the BSS the driver
intended to. The behavior is not changed for drivers not setting a BSS.

Signed-hostap: Simon Wunderlich <simon@open-mesh.com>

10 years agohostapd: Allow to switch to usable DFS channels
Simon Wunderlich [Thu, 6 Feb 2014 18:30:39 +0000 (19:30 +0100)] 
hostapd: Allow to switch to usable DFS channels

If channels are "available", change to "usable" DFS channels as a
fallback, too. This requires CAC, but it is still better to do that
instead of stopping service completely.

Signed-hostap: Simon Wunderlich <sw@simonwunderlich.de>

10 years agohostapd: Allow to switch to DFS channels if available
Simon Wunderlich [Thu, 6 Feb 2014 18:30:38 +0000 (19:30 +0100)] 
hostapd: Allow to switch to DFS channels if available

If DFS channels are marked as "available", an AP can switch to them
immediately without performing CAC. Therefore, the channel selection
function should consider these channels even though these are radar
channels.

Signed-hostap: Simon Wunderlich <sw@simonwunderlich.de>

10 years agohostapd: Add config option chanlist for DFS channels
Simon Wunderlich [Thu, 6 Feb 2014 18:30:37 +0000 (19:30 +0100)] 
hostapd: Add config option chanlist for DFS channels

Different channels allow different transmission power, at least in ETSI
countries. Also, ETSI requires a "channel plan" for DFS operation, and
channels should be randomly choosen from these channels.

Add a channel list configuration option for users to add channels
hostapd may pick from.

Signed-hostap: Simon Wunderlich <sw@simonwunderlich.de>

10 years agotests: Fix trace-cmd output for host case
Jouni Malinen [Tue, 11 Mar 2014 15:04:33 +0000 (17:04 +0200)] 
tests: Fix trace-cmd output for host case

Both the output file path and the current working directory included the
log directory and this failed if log directory was not absolute (e.g.,
when using the default logs/current in the case a VM is not used).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoUse internal FIPS 186-2 PRF if needed
Jouni Malinen [Tue, 11 Mar 2014 14:33:05 +0000 (16:33 +0200)] 
Use internal FIPS 186-2 PRF if needed

Previously, EAP-SIM/AKA/AKA' did not work with number of crypto
libraries (GnuTLS, CryptoAPI, NSS) since the required FIPS 186-2 PRF
function was not implemented. This resulted in somewhat confusing error
messages since the placeholder functions were silently returning an
error. Fix this by using the internal implementation of FIP 186-2 PRF
(including internal SHA-1 implementation) with crypto libraries that do
not implement this in case EAP-SIM/AKA/AKA' is included in the build.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Fix reporting of skipped cipher suite tests
Jouni Malinen [Tue, 11 Mar 2014 13:03:38 +0000 (15:03 +0200)] 
tests: Fix reporting of skipped cipher suite tests

The return value was lost and GCMP, CCMP-256, and GCMP-256 test cases
were reporting PASS instead of SKIP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoFix PTK derivation for CCMP-256 and GCMP-256
Jouni Malinen [Tue, 11 Mar 2014 13:00:09 +0000 (15:00 +0200)] 
Fix PTK derivation for CCMP-256 and GCMP-256

Incorrect PTK length was used in PMK-to-PTK derivation and the Michael
MIC TX/RX key swapping code was incorrectly executed for these ciphers
on supplicant side.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agonl80211: Add debug print of KEY_DATA and KEY_SEQ
Jouni Malinen [Tue, 11 Mar 2014 12:59:15 +0000 (14:59 +0200)] 
nl80211: Add debug print of KEY_DATA and KEY_SEQ

While these were already available from elsewhere in the debug log, it
is convenient to have the values also available at the location where
the actual nl80211 command is issued.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: HS 2.0 session information URL
Jouni Malinen [Mon, 10 Mar 2014 09:34:31 +0000 (11:34 +0200)] 
tests: HS 2.0 session information URL

Verify that session information is stored from Access-Accept and sent to
the station at the requested timeout. Verify that station processes this
notification.

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