mech_eap.git
10 years agotests: WPA (v1) with CCMP
Jouni Malinen [Sat, 5 Apr 2014 20:35:17 +0000 (23:35 +0300)]
tests: WPA (v1) with CCMP

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRemove used KDE addition code from EAPOL-Key msg 4/4
Jouni Malinen [Sat, 5 Apr 2014 20:30:16 +0000 (23:30 +0300)]
Remove used KDE addition code from EAPOL-Key msg 4/4

EAPOL-Key msg 4/4 has no specified KDE use, so remove the unused code to
simplify the implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoWNM: Fix regression in Sleep Mode exit key data parsing
Jouni Malinen [Sat, 5 Apr 2014 16:52:18 +0000 (19:52 +0300)]
WNM: Fix regression in Sleep Mode exit key data parsing

Commit dbfb8e82ff69e6c7969b7cd23e53fd39b3e896e7 changed the Action frame
RX payload pointer design to point to a different field. WNM Sleep Mode
Response handler updated one of the uses to accommodate this change, but
that commit missed another use for key data length. This resulted in GTK
and IGTK being ignored in many cases when waking up from WNM Sleep Mode
with PMF enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Add wlantest passphrase info for WNM Sleep Mode with PMF
Jouni Malinen [Sat, 5 Apr 2014 16:27:24 +0000 (19:27 +0300)]
tests: Add wlantest passphrase info for WNM Sleep Mode with PMF

This makes the sniffer capture more convenient with the Action frames
decrypted.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRemove unused wpa_sm_get_param() function
Jouni Malinen [Sat, 5 Apr 2014 16:15:39 +0000 (19:15 +0300)]
Remove unused wpa_sm_get_param() function

This function was not used anywhere and was not up-to-date with
full tet of parameters.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: PTK rekey forced by STA with WPA2 AP
Jouni Malinen [Sat, 5 Apr 2014 16:10:27 +0000 (19:10 +0300)]
tests: PTK rekey forced by STA with WPA2 AP

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: FTIE MIC mismatch in TDLS Setup Response/Confirm
Jouni Malinen [Sat, 5 Apr 2014 16:04:46 +0000 (19:04 +0300)]
tests: FTIE MIC mismatch in TDLS Setup Response/Confirm

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoTDLS: Add test mode for MIC failure testing
Jouni Malinen [Sat, 5 Apr 2014 16:04:07 +0000 (19:04 +0300)]
TDLS: Add test mode for MIC failure testing

"SET tdls_testing 0x800" can be used to enable a special test mode that
forces the FTIE MIC in TDLS setup messages to be incorrect.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: TDLS setup failure due to BSSID mismatch
Jouni Malinen [Sat, 5 Apr 2014 15:53:12 +0000 (18:53 +0300)]
tests: TDLS setup failure due to BSSID mismatch

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: PMKSA cache entry expiration with failed reauth
Jouni Malinen [Sat, 5 Apr 2014 15:09:10 +0000 (18:09 +0300)]
tests: PMKSA cache entry expiration with failed reauth

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFix memory leaks in hostapd configuration updates
Jouni Malinen [Sat, 5 Apr 2014 17:39:56 +0000 (20:39 +0300)]
Fix memory leaks in hostapd configuration updates

Some of the allocated configuration parameter did not free the previous
value if a configuration file or ctrl_iface SET command updated a
previously set value.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: PeerKey failure due to mismatching cipher
Jouni Malinen [Sat, 5 Apr 2014 14:52:44 +0000 (17:52 +0300)]
tests: PeerKey failure due to mismatching cipher

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Speed up IBSS test using single channel scan on SELECT_NETWORK
Jouni Malinen [Fri, 4 Apr 2014 20:13:49 +0000 (23:13 +0300)]
tests: Speed up IBSS test using single channel scan on SELECT_NETWORK

This removes unnecessary waits and adds test coverage for SELECT_NETWORK
freq parameter.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoExtend select_network command with freq= to reduce scan time
Dmitry Shmidt [Thu, 3 Apr 2014 20:40:52 +0000 (13:40 -0700)]
Extend select_network command with freq= to reduce scan time

This allows a subset of channels to be specified for the scan used to
find the network when the SELECT_NETWORK ctrl_iface command is issued.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoFix radius_example build
Amit Khatri [Wed, 2 Apr 2014 06:49:35 +0000 (12:19 +0530)]
Fix radius_example build

radius_example needs the -lrt option to build with some glibc versions.

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
10 years agoInterworking: Add writing of forgotten cred parameters into config file
Jouni Malinen [Fri, 4 Apr 2014 19:57:15 +0000 (22:57 +0300)]
Interworking: Add writing of forgotten cred parameters into config file

req_conn_capab and required_roaming_consortium parameters were not
written into the cred block when requesting wpa_supplicant to write the
configuration file.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Extend wpas_ctrl_cred to cover most cred block operations
Jouni Malinen [Fri, 4 Apr 2014 19:50:46 +0000 (22:50 +0300)]
tests: Extend wpas_ctrl_cred to cover most cred block operations

This verifies the new cred modification events and GET_CRED.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoInterworking: Add GET_CRED ctrl_iface command
Jouni Malinen [Fri, 4 Apr 2014 17:10:49 +0000 (20:10 +0300)]
Interworking: Add GET_CRED ctrl_iface command

"GET_CRED <id> <field>" can now be used to fetch credential parameters
over the control interface. This does not allow passwords etc. private
material to be retrieved ("*" is returned for those if the value is set
regardless of the value). FAIL is returned if the requested parameter
has not been set. For cred parameters that can have multiple values,
newline separated list of values is returned.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoInterworking: Add ctrl_iface events on cred block modifications
Jouni Malinen [Fri, 4 Apr 2014 16:10:47 +0000 (19:10 +0300)]
Interworking: Add ctrl_iface events on cred block modifications

Following events are now sent to ctrl_iface monitors to indicate if
credential blocks have been added, modified, or removed:

CRED-ADDED <id>
CRED-MODIFIED <id> <field>
CRED-REMOVE <id>

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Run make clean for hwsim_test before rebuilding it
Amit Khatri [Tue, 1 Apr 2014 04:59:47 +0000 (04:59 +0000)]
tests: Run make clean for hwsim_test before rebuilding it

This makes sure that the build.sh script ends up rebuilding hwsim_test.

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
10 years agowpa_supplicant: Allow disabling LDPC
Pawel Kulakowski [Tue, 1 Apr 2014 05:16:00 +0000 (07:16 +0200)]
wpa_supplicant: Allow disabling LDPC

Allows user to disable LDPC coding.
This possibility is useful for testing purpose.

Signed-off-by: Pawel Kulakowski <pawel.kulakowski@tieto.com>
10 years agoInterworking: Read IMSI if not read at supplicant start
Jean Trivelly [Fri, 28 Mar 2014 16:30:32 +0000 (17:30 +0100)]
Interworking: Read IMSI if not read at supplicant start

It is required to read IMSI from SIM if it has not already been done
when comparing HS 2.0 AP 3GPP information with the local credentials.

Signed-off-by: Jean Trivelly <jean.trivelly@intel.com>
10 years agoInterworking: Init scard when a credential requires SIM access
Jean Trivelly [Fri, 28 Mar 2014 13:41:36 +0000 (14:41 +0100)]
Interworking: Init scard when a credential requires SIM access

When an ANQP fetch is triggered and ANQP_3GPP_CELLULAR_NETWORK info is
required, initialize scard to be ready when comparing ANQP and
credentials.

Signed-off-by: Jean Trivelly <jean.trivelly@intel.com>
10 years agoInterworking: Fix incorrect compile PCSC flag
Jean Trivelly [Wed, 26 Mar 2014 15:54:35 +0000 (16:54 +0100)]
Interworking: Fix incorrect compile PCSC flag

CONFIG_PCSC is used instead of PCSC_FUNCS.

Signed-off-by: Jean Trivelly <jean.trivelly@intel.com>
10 years agoedit: Increase buffer size to 4096 bytes
Jouni Malinen [Mon, 31 Mar 2014 09:29:22 +0000 (12:29 +0300)]
edit: Increase buffer size to 4096 bytes

wpa_supplicant and wpa_cli had already moved to allowing up to 4096 byte
buffer size to be used for control interface commands. This was limited
by the line edit buffer in interactive mode. Increase that limit to
match the other buffers to avoid artificially truncating long commands.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoOSU server: Add example scripts for Hotspot 2.0 PKI
Jouni Malinen [Fri, 25 Oct 2013 14:54:25 +0000 (17:54 +0300)]
OSU server: Add example scripts for Hotspot 2.0 PKI

These can be used to generate certificates for developer testing of the
OSU protocol.

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

This is meant mainly for testing purposes and as a reference
implementation showing how OSU SPP server could be implemented. This is
not suitable for any real production use in its current form.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoXML: Remove forgotten, unused definition of debug_print_func
Jouni Malinen [Mon, 31 Mar 2014 09:05:56 +0000 (12:05 +0300)]
XML: Remove forgotten, unused definition of debug_print_func

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Prevent grpform_pbc_overlap_group_iface failures
Jouni Malinen [Sun, 30 Mar 2014 17:55:56 +0000 (20:55 +0300)]
tests: Prevent grpform_pbc_overlap_group_iface failures

Do not report missing PBC overlap detection as an issue in this test
case since the sequence can miss the overlap due to per-SSID scan used
during group formation. In addition, increase AP beaconing frequency to
make it more likely for a Beacon frame to be seen during the optimized
scan.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Make grpform_pbc_overlap* more likely to clear state
Jouni Malinen [Sun, 30 Mar 2014 15:21:58 +0000 (18:21 +0300)]
tests: Make grpform_pbc_overlap* more likely to clear state

The PBC overlap state could remain for the next test case and result in
unexpected failure reports.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd configuration parameters
Jouni Malinen [Sun, 30 Mar 2014 09:42:16 +0000 (12:42 +0300)]
tests: hostapd configuration parameters

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoMake hs20_wan_metrics parser error print more helpful
Jouni Malinen [Sun, 30 Mar 2014 14:24:39 +0000 (17:24 +0300)]
Make hs20_wan_metrics parser error print more helpful

pos == NULL in almost all of the error cases here, so print the full
parameter value instead of the current position.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFix validation of anqp_3gpp_cell_net configuration parameter
Jouni Malinen [Sun, 30 Mar 2014 14:19:20 +0000 (17:19 +0300)]
Fix validation of anqp_3gpp_cell_net configuration parameter

The "< '0' && > '9'" part would not match any character.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Update hlr_auc_gw Milenage file
Jouni Malinen [Sun, 30 Mar 2014 13:25:27 +0000 (16:25 +0300)]
tests: Update hlr_auc_gw Milenage file

This increases hlr_auc_gw.c test coverage and allows the SQN updated to
be checked if desired.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRemove duplicated vht_capab parser entry
Jouni Malinen [Sun, 30 Mar 2014 08:35:31 +0000 (11:35 +0300)]
Remove duplicated vht_capab parser entry

[VHT160-80PLUS80] was parsed twice with the second copy not really doing
anything useful.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd MAC ACL file entry removal
Jouni Malinen [Sun, 30 Mar 2014 08:01:10 +0000 (11:01 +0300)]
tests: hostapd MAC ACL file entry removal

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: VLAN using vlan_file mapping
Jouni Malinen [Sun, 30 Mar 2014 07:59:16 +0000 (10:59 +0300)]
tests: VLAN using vlan_file mapping

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: STA disconnection due to MAC ACL file change
Jouni Malinen [Sun, 30 Mar 2014 07:49:44 +0000 (10:49 +0300)]
tests: STA disconnection due to MAC ACL file change

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoNotify STA of disconnection based on ACL change
Jouni Malinen [Sun, 30 Mar 2014 07:48:32 +0000 (10:48 +0300)]
Notify STA of disconnection based on ACL change

ap_sta_deauthenticate() does not necessarily send a Deauthentication
frame to the STA. Use ap_sta_disconnect() to drop the association so
that the notification frame goes out.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd control interface error cases
Jouni Malinen [Sun, 30 Mar 2014 07:29:41 +0000 (10:29 +0300)]
tests: hostapd control interface error cases

Invalid parameters to HS20_WNM_NOTIF, HS20_DEAUTH_REQ,
DISASSOC_IMMINENT, and ESS_DISASSOC.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: EAP-SIM server using GSM triplets
Jouni Malinen [Sun, 30 Mar 2014 07:12:20 +0000 (10:12 +0300)]
tests: EAP-SIM server using GSM triplets

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: RADIUS MAC ACL
Jouni Malinen [Sat, 29 Mar 2014 17:32:45 +0000 (19:32 +0200)]
tests: RADIUS MAC ACL

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRADIUS server: Add support for MAC ACL
Jouni Malinen [Sat, 29 Mar 2014 17:31:56 +0000 (19:31 +0200)]
RADIUS server: Add support for MAC ACL

"user" MACACL "password" style lines in the eap_user file can now be
used to configured user entries for RADIUS-based MAC ACL.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Unknown Action frame category
Jouni Malinen [Sat, 29 Mar 2014 15:07:22 +0000 (17:07 +0200)]
tests: Unknown Action frame category

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: max_num_sta limit
Jouni Malinen [Sat, 29 Mar 2014 15:00:02 +0000 (17:00 +0200)]
tests: max_num_sta limit

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: max_listen_interval rejecting association
Jouni Malinen [Sat, 29 Mar 2014 14:56:14 +0000 (16:56 +0200)]
tests: max_listen_interval rejecting association

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: OSEN network and invalid association without OSEN IE
Jouni Malinen [Sat, 29 Mar 2014 14:51:44 +0000 (16:51 +0200)]
tests: OSEN network and invalid association without OSEN IE

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Connection during large packet loss
Jouni Malinen [Sat, 29 Mar 2014 14:48:00 +0000 (16:48 +0200)]
tests: Connection during large packet loss

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: SAE anti-clogging with non-SAE STA associated as well
Jouni Malinen [Sat, 29 Mar 2014 14:39:22 +0000 (16:39 +0200)]
tests: SAE anti-clogging with non-SAE STA associated as well

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: OLBC state clearing on timeout
Jouni Malinen [Sat, 29 Mar 2014 14:35:54 +0000 (16:35 +0200)]
tests: OLBC state clearing on timeout

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: HT OLBC detection on 5 GHz
Jouni Malinen [Sat, 29 Mar 2014 14:28:00 +0000 (16:28 +0200)]
tests: HT OLBC detection on 5 GHz

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Chargeable-User-Idnetity in Accounting-Request
Jouni Malinen [Sat, 29 Mar 2014 14:16:24 +0000 (16:16 +0200)]
tests: Chargeable-User-Idnetity in Accounting-Request

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Add initial cfg80211 test
Jouni Malinen [Mon, 24 Mar 2014 16:29:46 +0000 (18:29 +0200)]
tests: Add initial cfg80211 test

This adds some helper definitions and functions to allow cfg80211 to be
tested with raw nl80211 messages built in the test scripts. The first
test case shows a case where station disassociates instead of
deauthenticates (which is the wpa_supplicant behavior).

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Require HT/VHT as BSS membership selector in Supp Rates
Jouni Malinen [Sat, 29 Mar 2014 08:39:32 +0000 (10:39 +0200)]
tests: Require HT/VHT as BSS membership selector in Supp Rates

These are similar to the previous cases, but with supported rate set
limited to allow the BSS membership selector to fit into that element
instead of Ext Supp Rates.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd configuration file error cases
Jouni Malinen [Sat, 29 Mar 2014 08:36:25 +0000 (10:36 +0200)]
tests: hostapd configuration file error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: PSK file error cases
Jouni Malinen [Sat, 29 Mar 2014 07:51:54 +0000 (09:51 +0200)]
tests: PSK file error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoClean up debug print for PSK file search
Jouni Malinen [Sat, 29 Mar 2014 07:50:51 +0000 (09:50 +0200)]
Clean up debug print for PSK file search

p2p_dev_addr was not NULL, so the all zeros case was printed as well.
Clean this up by printing p2p_dev_addr in debug prints only if it is a
real P2P Device Address.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: ACS for 40 MHz channels, on 5 GHz, and for VHT
Jouni Malinen [Sat, 29 Mar 2014 07:24:22 +0000 (09:24 +0200)]
tests: ACS for 40 MHz channels, on 5 GHz, and for VHT

The 5 GHz cases are not yet complete due to missing mac80211_hwsim
functionality. The current test cases allow the ACS operation to fail
for those cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoDFS: Print CAC info in ctrl_iface STATUS command
Janusz Dziedzic [Wed, 5 Mar 2014 08:23:42 +0000 (09:23 +0100)]
DFS: Print CAC info in ctrl_iface STATUS command

Print CAC time and CAC left time in control interface STATUS command.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
10 years agotests: Verify PBC overlap detection during P2P group formation
Jouni Malinen [Fri, 28 Mar 2014 17:25:33 +0000 (19:25 +0200)]
tests: Verify PBC overlap detection during P2P group formation

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoP2P: Fix segfault when PBC overlap is detected
Avraham Stern [Thu, 27 Mar 2014 06:58:30 +0000 (08:58 +0200)]
P2P: Fix segfault when PBC overlap is detected

If a separate P2P group interface is used, PBC overlap during group
formation causes the group interface to be removed, which ends up with
the interface context becoming invalid. Fix this by scheduling a timeout
to process the PBC overlap and interface removal instead of removing the
interface directly before the connection operation has returned.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
10 years agoAdd writing of network block ocsp parameter
Jouni Malinen [Fri, 28 Mar 2014 14:56:41 +0000 (16:56 +0200)]
Add writing of network block ocsp parameter

This was forgotten from the per-network ocsp parameter addition. The new
parameter needs to be stored to the configuration file similarly to the
other EAP parameters.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agonl80211: Set all BSS interfaces down when tearing down AP in MBSS mode
Maxime Bizon [Thu, 20 Mar 2014 18:23:43 +0000 (19:23 +0100)]
nl80211: Set all BSS interfaces down when tearing down AP in MBSS mode

If the interface was not added by hostapd, it could have been left up
when disabling the AP.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
10 years agowpa_supplicant: Remove pending sme-connect radio work
Ilan Peer [Thu, 27 Mar 2014 06:58:33 +0000 (08:58 +0200)]
wpa_supplicant: Remove pending sme-connect radio work

If a new connection is attempted while there is a pending sme-connection
radio work, cancel the pending radio work and continue with the new
connection attempt. This is preferable over rejecting the new work and
continuing with the pending one, as it is possible that the previous
work is no longer valid.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
10 years agowpa_supplicant: Override HT A-MPDU size if VHT A-MPDU was overridden
Eliad Peller [Thu, 27 Mar 2014 06:58:32 +0000 (08:58 +0200)]
wpa_supplicant: Override HT A-MPDU size if VHT A-MPDU was overridden

According to the standard, if the max A-MPDU VHT cap is <= 3, we
have to adjust the max A-MPDU HT cap to the same value. Otherwise
it should be set to 3.

Take care of it when the max VHT A-MPDU value is overridden.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
10 years agohostapd: Add vendor command support
Avraham Stern [Thu, 27 Mar 2014 06:58:31 +0000 (08:58 +0200)]
hostapd: Add vendor command support

Add support of vendor command to hostapd ctrl_iface.
Vendor command's format:
VENDOR <vendor id> <sub command id> [<hex formatted data>]

The 3rd argument will be converted to binary data and then passed as
argument to the sub command.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
10 years agoP2P: Do not initiate scan on P2P Device when enabled
Ilan Peer [Thu, 27 Mar 2014 06:58:29 +0000 (08:58 +0200)]
P2P: Do not initiate scan on P2P Device when enabled

Do not start a scan on a P2P Device interface when processing an
interface enabled event.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
10 years agoFix issue with incorrect secondary_channel in HT40/HT80
Pawel Kulakowski [Wed, 26 Mar 2014 12:18:29 +0000 (13:18 +0100)]
Fix issue with incorrect secondary_channel in HT40/HT80

When primary and secondary channel were switched and config was
reloaded, secondary channel was incorrectly overwritten.

Proceed as for other settings that should not be changed and don't
allow to overwrite.

Signed-off-by: Pawel Kulakowski <pawel.kulakowski@tieto.com>
10 years agoPass TDLS peer capability information in tdls_mgmt
Sunil Dutt [Wed, 26 Mar 2014 16:04:50 +0000 (21:34 +0530)]
Pass TDLS peer capability information in tdls_mgmt

While framing the TDLS Setup Confirmation frame, the driver needs to
know if the TDLS peer is VHT/HT/WMM capable and thus shall construct the
VHT/HT operation / WMM parameter elements accordingly. Supplicant
determines if the TDLS peer is VHT/HT/WMM capable based on the presence
of the respective IEs in the received TDLS Setup Response frame.

The host driver should not need to parse the received TDLS Response
frame and thus, should be able to rely on the supplicant to indicate
the capability of the peer through additional flags while transmitting
the TDLS Setup Confirmation frame through tdls_mgmt operations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoSync with wireless-testing.git include/uapi/linux/nl80211.h
Jouni Malinen [Thu, 27 Mar 2014 12:50:39 +0000 (14:50 +0200)]
Sync with wireless-testing.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2014-03-25.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agonl80211: Fix EAPOL frames not being delivered
Maxime Bizon [Thu, 20 Mar 2014 18:29:44 +0000 (19:29 +0100)]
nl80211: Fix EAPOL frames not being delivered

When hostapd choose to reuse an existing interface, it does not add it
to the set of interfaces from which we accept EAPOL packets.

Make sure we always add it to that set.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
10 years agonl80211: Set interface address even if using old interface
Jouni Malinen [Tue, 25 Mar 2014 23:17:29 +0000 (01:17 +0200)]
nl80211: Set interface address even if using old interface

If an existing interface is allowed to be used, its address better be
updated to match the requested one.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agonl80211: Print if_indices list in debug log
Jouni Malinen [Tue, 25 Mar 2014 22:42:24 +0000 (00:42 +0200)]
nl80211: Print if_indices list in debug log

This makes it easier to debug dynamic interface addition/removal.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoeloop: Add assert() on negative fd when using select() code path
Maxime Bizon [Thu, 20 Mar 2014 18:25:18 +0000 (19:25 +0100)]
eloop: Add assert() on negative fd when using select() code path

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
10 years agoAdd a note on using 'iw list' to determine multi-BSS support
Jouni Malinen [Tue, 25 Mar 2014 21:58:22 +0000 (23:58 +0200)]
Add a note on using 'iw list' to determine multi-BSS support

This adds a pointer to hostapd.conf to using 'iw list' with the current
nl80211 drivers to determine supported interface combinations.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: GAS/ANQP query for both IEEE 802.11 and Hotspot 2.0 elements
Jouni Malinen [Tue, 25 Mar 2014 16:08:52 +0000 (18:08 +0200)]
tests: GAS/ANQP query for both IEEE 802.11 and Hotspot 2.0 elements

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0: Extend ANQP_GET to accept Hotspot 2.0 subtypes
Dmitry Shmidt [Tue, 25 Mar 2014 00:36:13 +0000 (17:36 -0700)]
HS 2.0: Extend ANQP_GET to accept Hotspot 2.0 subtypes

This allows a single ANQP query to be used to fetch both IEEE 802.11
defined ANQP elements and Hotspot 2.0 vendor specific elements.

ANQP_GET <addr> <info id>[,<info id>]...
[,hs20:<subtype>][...,hs20:<subtype>]

For example:
ANQP_GET 00:11:22:33:44:55:66 258,268,hs20:3,hs20:4

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agonl80211: Indicate HS 2.0 OSEN AKM in connect/associate command
Jouni Malinen [Tue, 25 Mar 2014 15:57:54 +0000 (17:57 +0200)]
nl80211: Indicate HS 2.0 OSEN AKM in connect/associate command

This allows drivers that build the WPA/RSN IEs internally to use similar
design for building the OSEN IE.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: HS 2.0 OSEN using nl80211 connect command
Jouni Malinen [Tue, 25 Mar 2014 15:56:55 +0000 (17:56 +0200)]
tests: HS 2.0 OSEN using nl80211 connect command

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Remove CONFIG_WPS2=y from example configuration files
Jouni Malinen [Tue, 25 Mar 2014 15:42:17 +0000 (17:42 +0200)]
tests: Remove CONFIG_WPS2=y from example configuration files

This build parameter is not used anymore.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoWPS: Enable WSC 2.0 support unconditionally
Jouni Malinen [Tue, 25 Mar 2014 15:40:50 +0000 (17:40 +0200)]
WPS: Enable WSC 2.0 support unconditionally

There is not much point in building devices with WPS 1.0 only supported
nowadays. As such, there is not sufficient justification for maintaining
extra complexity for the CONFIG_WPS2 build option either. Remove this by
enabling WSC 2.0 support unconditionally.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Set a timeout for a persistent reinvoke on a P2P Client
Sunil Dutt Undekari [Tue, 11 Mar 2014 09:54:17 +0000 (15:24 +0530)]
P2P: Set a timeout for a persistent reinvoke on a P2P Client

Use P2P group formation timeout to wait for the 4-way handshake to
complete on a persistent reinvocation on a P2P Client.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Optimize scan for GO during persistent group invocation
Rashmi Ramanna [Fri, 21 Mar 2014 12:56:02 +0000 (18:26 +0530)]
P2P: Optimize scan for GO during persistent group invocation

Scan for GO on the negotiated operating channel for few iterations
before searching on all the supported channels during persistent group
reinvocation. In addition, use the already known SSID of the group in
the scans. These optimizations reduce group formation time.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: P2P persistent group re-invocation with empty BSS table
Jouni Malinen [Tue, 25 Mar 2014 11:43:56 +0000 (13:43 +0200)]
tests: P2P persistent group re-invocation with empty BSS table

This verifies P2P Client scanning behavior during group re-invocation in
a case where old scan results are not available to allow the scan to be
skipped completely.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Optimize scanning in wpa_supplicant-as-AP test case
Jouni Malinen [Tue, 25 Mar 2014 13:08:07 +0000 (15:08 +0200)]
tests: Optimize scanning in wpa_supplicant-as-AP test case

Wait for the AP to be ready before initiating the scan to avoid
unnecessary five second extra wait. In addition, disconnect the station
to avoid possibility of starting a new scan at the end of the test case.
These remove unnecessary wait time from the test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoACS: Fix number of error path issues
Jouni Malinen [Mon, 24 Mar 2014 20:38:35 +0000 (22:38 +0200)]
ACS: Fix number of error path issues

Especially when multiple BSSes are used with ACS, number of the error
paths were not cleaning up driver initialization properly. This could
result in using freed memory and crashing the process if ACS failed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Add scripts to allow parallel execution of tests in VMs
Jouni Malinen [Sun, 23 Mar 2014 23:35:58 +0000 (01:35 +0200)]
tests: Add scripts to allow parallel execution of tests in VMs

"parallel-vm.sh <number of VMs> [arguments..]" can now be used to run
multiple VMs in parallel to speed up full test cycle significantly. In
addition, the "--split srv/total" argument used in this design would
also make it possible to split this to multiple servers to speed up
testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Extend OBSS scan coverage
Jouni Malinen [Sun, 23 Mar 2014 21:57:38 +0000 (23:57 +0200)]
tests: Extend OBSS scan coverage

Include another BSS in the scan results and run a test with a 40 MHz
intolerant neighboring BSS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoSME: Add more debug prints for OBSS scans and 20/40 MHz co-ex report
Jouni Malinen [Sun, 23 Mar 2014 21:56:50 +0000 (23:56 +0200)]
SME: Add more debug prints for OBSS scans and 20/40 MHz co-ex report

This makes it easier to debug wpa_supplicant behavior when reporting
20/40 MHz co-ex information based on OBSS scans.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoSME: Fix OBSS scan result processing for 20/40 MHz co-ex report
Jouni Malinen [Sun, 23 Mar 2014 21:54:50 +0000 (23:54 +0200)]
SME: Fix OBSS scan result processing for 20/40 MHz co-ex report

The 40 MHz intolerant bit needs to be checked before skipping the BSS
based on the channel already being in the lost (which could have
happened due to another BSS that does not indicate 40 MHz intolerant).
This fixed the 20/40 MHz co-ex report to indicate 20 MHz request
properly if there are both 40 MHz tolerant and intolerant BSSes on the
same channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAllow hostapd to advertise 40 MHz intolerant HT capability
Jouni Malinen [Sun, 23 Mar 2014 21:50:37 +0000 (23:50 +0200)]
Allow hostapd to advertise 40 MHz intolerant HT capability

ht_capab=[40-INTOLERANT] can now be used to advertise that the BSS is 40
MHz intolerant to prevent other 20/40 MHz co-ex compliant APs from using
40 MHz channel bandwidth.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify HT/VHT required rejection
Jouni Malinen [Sun, 23 Mar 2014 17:49:12 +0000 (19:49 +0200)]
tests: Verify HT/VHT required rejection

Previously, only the case of STA supporting HT/VHT was tested. Now both
cases are verified.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Additional AP parameters
Jouni Malinen [Sun, 23 Mar 2014 17:31:35 +0000 (19:31 +0200)]
tests: Additional AP parameters

This tests basic rate, short preamble, and spectrum management
configuration.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Negative FT RRB test cases
Jouni Malinen [Sun, 23 Mar 2014 17:23:16 +0000 (19:23 +0200)]
tests: Negative FT RRB test cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: FT pull PMK-R1
Jouni Malinen [Sun, 23 Mar 2014 16:31:58 +0000 (18:31 +0200)]
tests: FT pull PMK-R1

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFT: Add support for postponing FT response
Jouni Malinen [Sun, 23 Mar 2014 16:13:03 +0000 (18:13 +0200)]
FT: Add support for postponing FT response

If the PMK-R1 needs to be pulled for the R0KH, the previous
implementation ended up rejecting the over-the-air authentication and
over-the-DS action frame unnecessarily while waiting for the RRB
response. Improve this by postponing the Authentication/Action frame
response until the pull response is received.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: P2P broadcast SD query canceling
Jouni Malinen [Sun, 23 Mar 2014 10:11:55 +0000 (12:11 +0200)]
tests: P2P broadcast SD query canceling

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: P2P channel selection
Jouni Malinen [Sun, 23 Mar 2014 09:24:01 +0000 (11:24 +0200)]
tests: P2P channel selection

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Allow test cases to receive additional parameters
Jouni Malinen [Sun, 23 Mar 2014 09:59:43 +0000 (11:59 +0200)]
tests: Allow test cases to receive additional parameters

The optional third argument to the test case functions can now be used
to receive additional parameters from run-tests.py. As the initial
parameter, logdir value is provided so that test cases can use it to
review the debug logs from the test run.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoP2P: Clean up channel selection code to use helper functions
Jouni Malinen [Sun, 23 Mar 2014 09:01:59 +0000 (11:01 +0200)]
P2P: Clean up channel selection code to use helper functions

This moves some of the p2p_prepare_channel_best() functionality into
separate helper functions to make the implementation easier to read.

Signed-off-by: Jouni Malinen <j@w1.fi>