]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
7 years agowpa_supplicant: Extend verify_channel() and make it global
Avraham Stern [Wed, 28 Dec 2016 13:06:44 +0000 (15:06 +0200)] 
wpa_supplicant: Extend verify_channel() and make it global

Extend verify_channel() to return whether IR is allowed on the channel
or not, and make it a global function so it can be used in other files,
too. This makes this function useful for checking not only if a channel
is supported but also if it is allowed for active and passive scan.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agocommon: Add function to get an operating class by its number and country
Avraham Stern [Wed, 28 Dec 2016 13:06:43 +0000 (15:06 +0200)] 
common: Add function to get an operating class by its number and country

Add a function to get operating class definition (including bandwidth,
channel numbers, etc.) from the operating class number and country.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agocommon: Add non-global to global operating classes conversion
Avraham Stern [Wed, 28 Dec 2016 13:06:42 +0000 (15:06 +0200)] 
common: Add non-global to global operating classes conversion

Add helper function that converts non-global operating classes to global
operating classes according to IEEE Std 802.11-2016, Annex E.

Signed-off-by: Avrahams Stern <avraham.stern@intel.com>
7 years agonl80211: Add support for additional scan parameters for beacon report
Avraham Stern [Wed, 28 Dec 2016 13:06:41 +0000 (15:06 +0200)] 
nl80211: Add support for additional scan parameters for beacon report

Add support for:
 1. Setting scan dwell time
 2. Parsing scan start TSF and beacon received TSF reported
    by the driver
 3. Setting driver capabilities for the above

These capabilities are needed for Beacon Report radio measurement.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agodriver: Add scan support to beacon report
Avraham Stern [Wed, 28 Dec 2016 13:06:40 +0000 (15:06 +0200)] 
driver: Add scan support to beacon report

Add the following parameters to scan request:
 1. Dwell time on each channel.
 2. Whether the specified dwell time is mandatory.

In addition, add to scan results info the time that the scan actually
started, and to each scan result the time the beacon/probe was received,
both in terms of TSF of the BSS that the interface that requested the
scan is connected to (if available).

Add flags to indicate whether the driver supports dwell time
configuration and scan information reporting.

This scan configuration and information is required to support beacon
report radio measurement.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agowpa_supplicant: Refactor wpas_rrm_build_lci_report()
Avraham Stern [Wed, 28 Dec 2016 13:06:39 +0000 (15:06 +0200)] 
wpa_supplicant: Refactor wpas_rrm_build_lci_report()

1. Change the return type to reflect whether building the report
   succeeded or failed.
2. Change argument type to rrm_measurement_request_element instead
   of raw packet data to ease processing the request.
3. Use already existing function to create the measurement report
   and add it to the report buffer.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agowpa_supplicant: Send rejection for unsupported radio measurements
Avraham Stern [Wed, 28 Dec 2016 13:06:38 +0000 (15:06 +0200)] 
wpa_supplicant: Send rejection for unsupported radio measurements

Send measurement report with the mode field set to incapable in response
to measurement requests with unsupported measurement types.

In addition, measurements requests that request parallel measurements
are rejected since these features are not supported.

Measurement request frames with the enable bit set are ignored since
these are not really requesting measurements and are not supported for
now.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agowpa_supplicant: Limit RRM response size to MMPDU size
Avraham Stern [Wed, 28 Dec 2016 13:06:37 +0000 (15:06 +0200)] 
wpa_supplicant: Limit RRM response size to MMPDU size

The length of a Measurement Report frame should be limited by the
maximum allowed MMPDU size (IEEE Std 802.11-2016, 9.6.2.3). Enforce this
size limit, and in case the report elements are longer than the allowed
size, split them between several MPDUs.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agowpa_supplicant: Refactor Radio Measurement Request handling
Avraham Stern [Wed, 28 Dec 2016 13:06:36 +0000 (15:06 +0200)] 
wpa_supplicant: Refactor Radio Measurement Request handling

Extract the code dealing with processing the measurement request
elements to a separate function. This will be needed for beacon report
requests processing.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agowpa_supplicant: Validate RRM request frame format
Avraham Stern [Wed, 28 Dec 2016 13:06:35 +0000 (15:06 +0200)] 
wpa_supplicant: Validate RRM request frame format

RRM request frame should contain only information elements of type Radio
Measurement Request. Go through all the frame and validate that only
elements of this type are included.

In addition, if a truncated element is encountered, or the element
length field indicates that the element length is more than the
entire frame, abort the request.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agowpa_supplicant: Move RRM implementation to a dedicated file
Avraham Stern [Wed, 28 Dec 2016 13:06:34 +0000 (15:06 +0200)] 
wpa_supplicant: Move RRM implementation to a dedicated file

As support for new RRM measurements will be added, the RRM
implementation will become quite large, so move it to a dedicated file.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agoAdd RRM definitions for beacon report measurement
Avraham Stern [Wed, 28 Dec 2016 13:06:33 +0000 (15:06 +0200)] 
Add RRM definitions for beacon report measurement

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agoFix LCI request subelement processing
Jouni Malinen [Tue, 3 Jan 2017 13:12:34 +0000 (15:12 +0200)] 
Fix LCI request subelement processing

Commit 4a742011abca8a9c185cc40d17783cfa4c9af757 ('wpa_supplicant: Handle
LCI request') introduced LCI request parsing in a manner that
incremented the request pointer by four within
wpas_rrm_build_lci_report() without decrementing len correspondingly.
This could potentially result in get_ie() reading four octets beyond the
buffer if a corrupted request is received. This would be applicable only
if the LCI reporting was enabled explicitly ("SET LCI ..." control
interface command).

Fix this by updating the len variable to match the request pointer
changes.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoAdd CONFIG_MESH into wpa_supplicant defconfig
Masashi Honma [Tue, 27 Dec 2016 03:49:08 +0000 (12:49 +0900)] 
Add CONFIG_MESH into wpa_supplicant defconfig

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agowpa_cli: Add commands to use PMKSA_GET/ADD
Masashi Honma [Tue, 27 Dec 2016 03:49:07 +0000 (12:49 +0900)] 
wpa_cli: Add commands to use PMKSA_GET/ADD

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agotests: P2P autonomous GO switching channels with cfg80211 P2P Device
Jouni Malinen [Fri, 30 Dec 2016 21:56:35 +0000 (23:56 +0200)] 
tests: P2P autonomous GO switching channels with cfg80211 P2P Device

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoP2P: Fix compilation warning in p2p_add_device()
Andrei Otcheretianski [Wed, 28 Dec 2016 13:47:06 +0000 (15:47 +0200)] 
P2P: Fix compilation warning in p2p_add_device()

The address of msg.device_name array is obviously always true, and some
compilers even warn about it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
7 years agotests: WPS and pbc_in_m1
Jouni Malinen [Thu, 29 Dec 2016 22:47:19 +0000 (00:47 +0200)] 
tests: WPS and pbc_in_m1

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: AP with wowlan_triggers
Jouni Malinen [Thu, 29 Dec 2016 22:45:04 +0000 (00:45 +0200)] 
tests: AP with wowlan_triggers

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: ANQP Domain ID
Jouni Malinen [Thu, 29 Dec 2016 22:28:54 +0000 (00:28 +0200)] 
tests: ANQP Domain ID

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoGAS: Remove unnecessarily duplicate gas_frag_limit configuration
Jouni Malinen [Thu, 29 Dec 2016 22:23:10 +0000 (00:23 +0200)] 
GAS: Remove unnecessarily duplicate gas_frag_limit configuration

The actual BSS configuration parameter can be updated with the SET
control interface command, so there is no need to maintain a separate
per-BSS parameter and a separate control interface handling for this.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: AP with U-APSD advertisement
Jouni Malinen [Thu, 29 Dec 2016 10:50:50 +0000 (12:50 +0200)] 
tests: AP with U-APSD advertisement

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: AP with long preamble
Jouni Malinen [Thu, 29 Dec 2016 10:45:55 +0000 (12:45 +0200)] 
tests: AP with long preamble

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: AP with Probe Response frame sending from hostapd disabled
Jouni Malinen [Thu, 29 Dec 2016 10:42:49 +0000 (12:42 +0200)] 
tests: AP with Probe Response frame sending from hostapd disabled

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: DTIM period configuration
Jouni Malinen [Thu, 29 Dec 2016 10:27:12 +0000 (12:27 +0200)] 
tests: DTIM period configuration

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: WPS and wps_rf_bands configuration
Jouni Malinen [Thu, 29 Dec 2016 10:17:17 +0000 (12:17 +0200)] 
tests: WPS and wps_rf_bands configuration

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Automatic channel selection using acs_survey parameter
Jouni Malinen [Thu, 29 Dec 2016 10:10:01 +0000 (12:10 +0200)] 
tests: Automatic channel selection using acs_survey parameter

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: WPA2-PSK-FT AP over DS disabled
Jouni Malinen [Wed, 28 Dec 2016 23:15:11 +0000 (01:15 +0200)] 
tests: WPA2-PSK-FT AP over DS disabled

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFT: Drop FT Action frames if ft_over_ds=0
Jouni Malinen [Wed, 28 Dec 2016 23:13:59 +0000 (01:13 +0200)] 
FT: Drop FT Action frames if ft_over_ds=0

Previously, the hostapd ft_over_ds parameter was used to only advertise
whether FT-over-DS is enabled in MDE and leave it to the stations to
follow that advertisement. This commit extends this to explicitly reject
(silently drop) FT Action frames if a station does not follow the
advertised capabilities.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: RADIUS Dynamic Authorization Extensions - Disconnect - time window
Jouni Malinen [Wed, 28 Dec 2016 23:06:11 +0000 (01:06 +0200)] 
tests: RADIUS Dynamic Authorization Extensions - Disconnect - time window

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Additional radius_auth/acct_req_attr coverage
Jouni Malinen [Wed, 28 Dec 2016 18:10:18 +0000 (20:10 +0200)] 
tests: Additional radius_auth/acct_req_attr coverage

The third attribute is needed in the list to cover full parsing code
coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: IEEE 802.1X and EAPOL-Key index workaround
Jouni Malinen [Wed, 28 Dec 2016 16:11:13 +0000 (18:11 +0200)] 
tests: IEEE 802.1X and EAPOL-Key index workaround

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: WPA2-Enterprise using EAP-SIM with zero database timeout
Jouni Malinen [Wed, 28 Dec 2016 16:04:42 +0000 (18:04 +0200)] 
tests: WPA2-Enterprise using EAP-SIM with zero database timeout

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: EAP-FAST and provisioning options
Jouni Malinen [Wed, 28 Dec 2016 15:53:06 +0000 (17:53 +0200)] 
tests: EAP-FAST and provisioning options

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd eapol_version configuration
Jouni Malinen [Wed, 28 Dec 2016 13:04:53 +0000 (15:04 +0200)] 
tests: hostapd eapol_version configuration

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd configuration SET OOM and error cases
Jouni Malinen [Wed, 28 Dec 2016 11:11:12 +0000 (13:11 +0200)] 
tests: hostapd configuration SET OOM and error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoRemove deprecated tx_queue_* params from hostapd.conf notes
Jouni Malinen [Wed, 28 Dec 2016 10:34:33 +0000 (12:34 +0200)] 
Remove deprecated tx_queue_* params from hostapd.conf notes

The after_beacon and beacon TX queue parameters has not been
configurable through this mechanism for years, so do not list them in
hostapd.conf notes.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd eap_user_file parsing
Jouni Malinen [Wed, 28 Dec 2016 10:13:07 +0000 (12:13 +0200)] 
tests: hostapd eap_user_file parsing

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFix memory leak on hostapd eap_user_file parsing error paths
Jouni Malinen [Wed, 28 Dec 2016 10:12:14 +0000 (12:12 +0200)] 
Fix memory leak on hostapd eap_user_file parsing error paths

Need to free all the pending completed EAP users if a parsing error
prevents the file from being used.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd vlan_file/mac_file parsing
Jouni Malinen [Tue, 27 Dec 2016 22:57:25 +0000 (00:57 +0200)] 
tests: hostapd vlan_file/mac_file parsing

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Remove unnecessary NULL check from parser functions
Jouni Malinen [Tue, 27 Dec 2016 22:58:21 +0000 (00:58 +0200)] 
hostapd: Remove unnecessary NULL check from parser functions

The fname argument cannot be NULL in these location.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd global ctrl_iface DETACH failure
Jouni Malinen [Tue, 27 Dec 2016 22:38:51 +0000 (00:38 +0200)] 
tests: hostapd global ctrl_iface DETACH failure

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and TEST_ALLOC_FAIL/TEST_FAIL
Jouni Malinen [Tue, 27 Dec 2016 22:30:41 +0000 (00:30 +0200)] 
tests: hostapd and TEST_ALLOC_FAIL/TEST_FAIL

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and SET accept_mac_file ctrl_iface command (VLAN ID)
Jouni Malinen [Tue, 27 Dec 2016 22:25:46 +0000 (00:25 +0200)] 
tests: hostapd and SET accept_mac_file ctrl_iface command (VLAN ID)

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd global control interface with unknown IFNAME= prefix
Jouni Malinen [Tue, 27 Dec 2016 19:21:55 +0000 (21:21 +0200)] 
tests: hostapd global control interface with unknown IFNAME= prefix

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd DUP_NETWORK error cases
Jouni Malinen [Tue, 27 Dec 2016 19:20:57 +0000 (21:20 +0200)] 
tests: hostapd DUP_NETWORK error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd global ctrl_iface INTERFACES
Jouni Malinen [Tue, 27 Dec 2016 19:14:34 +0000 (21:14 +0200)] 
tests: hostapd global ctrl_iface INTERFACES

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and UPDATE_BEACON
Jouni Malinen [Tue, 27 Dec 2016 19:10:45 +0000 (21:10 +0200)] 
tests: hostapd and UPDATE_BEACON

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and POLL_STA errors
Jouni Malinen [Tue, 27 Dec 2016 18:55:12 +0000 (20:55 +0200)] 
tests: hostapd and POLL_STA errors

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Invalid hostapd STA ctrl_iface command subparameter
Jouni Malinen [Tue, 27 Dec 2016 18:52:57 +0000 (20:52 +0200)] 
tests: Invalid hostapd STA ctrl_iface command subparameter

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: sae_group in hostapd STA ctrl_iface command
Jouni Malinen [Tue, 27 Dec 2016 18:51:07 +0000 (20:51 +0200)] 
tests: sae_group in hostapd STA ctrl_iface command

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and RELOG
Jouni Malinen [Tue, 27 Dec 2016 18:48:11 +0000 (20:48 +0200)] 
tests: hostapd and RELOG

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: More SET_NEIGHBOR and REMOVE_NEIGHBOR error cases
Jouni Malinen [Tue, 27 Dec 2016 18:46:10 +0000 (20:46 +0200)] 
tests: More SET_NEIGHBOR and REMOVE_NEIGHBOR error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: More hostapd REQ_RANGE error case coverage
Jouni Malinen [Tue, 27 Dec 2016 18:36:14 +0000 (20:36 +0200)] 
tests: More hostapd REQ_RANGE error case coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and EAPOL_REAUTH errors
Jouni Malinen [Tue, 27 Dec 2016 18:28:23 +0000 (20:28 +0200)] 
tests: hostapd and EAPOL_REAUTH errors

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and VENDOR errors
Jouni Malinen [Tue, 27 Dec 2016 18:27:08 +0000 (20:27 +0200)] 
tests: hostapd and VENDOR errors

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and external I/O errors
Jouni Malinen [Tue, 27 Dec 2016 18:22:05 +0000 (20:22 +0200)] 
tests: hostapd and external I/O errors

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd and RADAR ctrl_iface command
Jouni Malinen [Tue, 27 Dec 2016 18:05:12 +0000 (20:05 +0200)] 
tests: hostapd and RADAR ctrl_iface command

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: WPS PIN provisioning with configured AP using dummy cred
Jouni Malinen [Tue, 27 Dec 2016 17:59:22 +0000 (19:59 +0200)] 
tests: WPS PIN provisioning with configured AP using dummy cred

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: More hostapd SET command coverage
Jouni Malinen [Tue, 27 Dec 2016 17:59:03 +0000 (19:59 +0200)] 
tests: More hostapd SET command coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: More hostapd GET_CONFIG key_mgmt coverage
Jouni Malinen [Tue, 27 Dec 2016 17:24:34 +0000 (19:24 +0200)] 
tests: More hostapd GET_CONFIG key_mgmt coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: More BSS_TM_REQ coverage
Jouni Malinen [Tue, 27 Dec 2016 17:20:42 +0000 (19:20 +0200)] 
tests: More BSS_TM_REQ coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFix memory leak in hostapd BSS_TM_REQ error path handling
Jouni Malinen [Tue, 27 Dec 2016 17:08:31 +0000 (19:08 +0200)] 
Fix memory leak in hostapd BSS_TM_REQ error path handling

The optional url=<URL> parameter was stored in allocated memory and that
memory was leaked if some following parameter parsing attempts failed.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: More hostapd ctrl_iface QoS Map error coverage
Jouni Malinen [Tue, 27 Dec 2016 15:22:11 +0000 (17:22 +0200)] 
tests: More hostapd ctrl_iface QoS Map error coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: HS20_DEAUTH_REQ OOM
Jouni Malinen [Tue, 27 Dec 2016 15:17:43 +0000 (17:17 +0200)] 
tests: HS20_DEAUTH_REQ OOM

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Additional HS20_WNM_NOTIF coverage
Jouni Malinen [Tue, 27 Dec 2016 15:14:49 +0000 (17:14 +0200)] 
tests: Additional HS20_WNM_NOTIF coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoRemove trailing whitespace
Jouni Malinen [Tue, 27 Dec 2016 15:11:27 +0000 (17:11 +0200)] 
Remove trailing whitespace

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Remove trailing whitespace
Jouni Malinen [Tue, 27 Dec 2016 15:07:11 +0000 (17:07 +0200)] 
tests: Remove trailing whitespace

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Additional hostapd WPS control interface coverage
Jouni Malinen [Tue, 27 Dec 2016 15:04:30 +0000 (17:04 +0200)] 
tests: Additional hostapd WPS control interface coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Additional SA_QUERY coverage
Jouni Malinen [Tue, 27 Dec 2016 14:38:20 +0000 (16:38 +0200)] 
tests: Additional SA_QUERY coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Additional hostapd NEW_STA coverage
Jouni Malinen [Tue, 27 Dec 2016 14:35:08 +0000 (16:35 +0200)] 
tests: Additional hostapd NEW_STA coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd BSS config file
Jouni Malinen [Tue, 27 Dec 2016 12:50:56 +0000 (14:50 +0200)] 
tests: hostapd BSS config file

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Add TERMINATE as per-interface command
Jouni Malinen [Tue, 27 Dec 2016 12:50:14 +0000 (14:50 +0200)] 
hostapd: Add TERMINATE as per-interface command

This was already avaialble through the global control interface, but not
the per-interface one.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd -i command line argument
Jouni Malinen [Tue, 27 Dec 2016 12:27:03 +0000 (14:27 +0200)] 
tests: hostapd -i command line argument

This adds some more code coverage reachability testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd SIGUSR1
Jouni Malinen [Tue, 27 Dec 2016 12:23:46 +0000 (14:23 +0200)] 
tests: hostapd SIGUSR1

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Ignoring invalid hostapd configuration parameter updates
Jouni Malinen [Tue, 27 Dec 2016 10:39:44 +0000 (12:39 +0200)] 
tests: Ignoring invalid hostapd configuration parameter updates

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Do not update dtim_period with invalid value
Jouni Malinen [Tue, 27 Dec 2016 10:24:02 +0000 (12:24 +0200)] 
hostapd: Do not update dtim_period with invalid value

Previously, the update command was rejected, but the actual value was
updated.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoRADIUS server: Increase maximum number of sessions
Jouni Malinen [Tue, 27 Dec 2016 10:14:48 +0000 (12:14 +0200)] 
RADIUS server: Increase maximum number of sessions

It was possible to hit the previously used maximum of 100 active session
in some hwsim test case sequences like this one: eap_proto_pwd_errors
eap_proto_ikev2_errors eap_proto_sim_errors. This happened due to the
large number of RADIUS authentication iterations in short period of
time, i.e., within the 10 second timeout for expiring completed
sessions.

Increase RADIUS_MAX_SESSION from 100 to 1000 and also reduce the timeout
on expiring completed sessions from 10 to 5 seconds.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Do not update invalid wep_key_len_unicast
Jouni Malinen [Tue, 27 Dec 2016 10:02:53 +0000 (12:02 +0200)] 
hostapd: Do not update invalid wep_key_len_unicast

Previously, the update command was rejected, but the configuration
parameter value was updated anyway.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Do not update rejected wep_key_len_broadcast
Jouni Malinen [Tue, 27 Dec 2016 10:00:26 +0000 (12:00 +0200)] 
hostapd: Do not update rejected wep_key_len_broadcast

Previously, update command with invalid value got rejected, but the
actual configuration data was updated anyway.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Do not update eapol_version with rejected value
Jouni Malinen [Tue, 27 Dec 2016 09:46:04 +0000 (11:46 +0200)] 
hostapd: Do not update eapol_version with rejected value

Previously, an invalid eapol_version update command was rejected, but
the actual configuration value was updated.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Reject invalid macaddr_acl value
Jouni Malinen [Tue, 27 Dec 2016 09:43:13 +0000 (11:43 +0200)] 
hostapd: Reject invalid macaddr_acl value

Previously, this was noted in error log, but the invalid value was
stored in the configuration without rejecting it.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Check driver parameter before replacing previous value
Jouni Malinen [Tue, 27 Dec 2016 09:33:35 +0000 (11:33 +0200)] 
hostapd: Check driver parameter before replacing previous value

This leaves the previously configured value in place if "SET driver ..."
command fails.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd configuration reload
Jouni Malinen [Mon, 26 Dec 2016 22:56:46 +0000 (00:56 +0200)] 
tests: hostapd configuration reload

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFix hostapd SIGHUP processing before interface is enabled
Jouni Malinen [Mon, 26 Dec 2016 22:55:32 +0000 (00:55 +0200)] 
Fix hostapd SIGHUP processing before interface is enabled

It was possible to try to do driver operations before the driver
interface had been initialized when processing a SIGHUP signal. This
would result in NULL pointer dereference. Fix this by skipping the steps
when SIGHUP is issued before the interface is enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: IEEE 802.1X connection using static WEP104
Jouni Malinen [Mon, 26 Dec 2016 22:21:01 +0000 (00:21 +0200)] 
tests: IEEE 802.1X connection using static WEP104

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Invalid TX queue params set (cwmin/cwmax)
Jouni Malinen [Mon, 26 Dec 2016 22:17:34 +0000 (00:17 +0200)] 
tests: Invalid TX queue params set (cwmin/cwmax)

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: MBO and WPA2 without PMF
Jouni Malinen [Mon, 26 Dec 2016 22:07:29 +0000 (00:07 +0200)] 
tests: MBO and WPA2 without PMF

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: WPS getting disabled due to conflicting parameters
Jouni Malinen [Mon, 26 Dec 2016 20:05:10 +0000 (22:05 +0200)] 
tests: WPS getting disabled due to conflicting parameters

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: VHT and TKIP
Jouni Malinen [Mon, 26 Dec 2016 19:59:02 +0000 (21:59 +0200)] 
tests: VHT and TKIP

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Duplicate BSSID
Jouni Malinen [Mon, 26 Dec 2016 19:54:57 +0000 (21:54 +0200)] 
tests: Duplicate BSSID

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: WPA2-PSK AP and no PSK configured
Jouni Malinen [Mon, 26 Dec 2016 19:21:10 +0000 (21:21 +0200)] 
tests: WPA2-PSK AP and no PSK configured

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Invalid VLAN ID from RADIUS server for ACL
Jouni Malinen [Mon, 26 Dec 2016 16:39:49 +0000 (18:39 +0200)] 
tests: Invalid VLAN ID from RADIUS server for ACL

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Cover both binary search branches in hostapd_maclist_found()
Jouni Malinen [Mon, 26 Dec 2016 16:28:40 +0000 (18:28 +0200)] 
tests: Cover both binary search branches in hostapd_maclist_found()

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Make hostapd_oom_wpa2_psk catch cases more robustly
Jouni Malinen [Mon, 26 Dec 2016 15:53:07 +0000 (17:53 +0200)] 
tests: Make hostapd_oom_wpa2_psk catch cases more robustly

For some reason, a potential OOM in hostapd_config_read_wpa_psk() and
hostapd_derive_psk() were missed in --codecov runs during the main
iteration loop. Cover these specific cases with separate instances to
avoid missing coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoRemove unnecessary NULL check from hostapd_config_read_wpa_psk() call
Jouni Malinen [Mon, 26 Dec 2016 15:42:41 +0000 (17:42 +0200)] 
Remove unnecessary NULL check from hostapd_config_read_wpa_psk() call

This function is already checking the fname argument against NULL, so
use that check on its own instead of duplicating the check in the only
caller.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: FILS SK authentication with SHA384
Jouni Malinen [Mon, 26 Dec 2016 12:50:28 +0000 (14:50 +0200)] 
tests: FILS SK authentication with SHA384

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: More ieee802_11_vendor_ie_concat() coverage
Jouni Malinen [Mon, 26 Dec 2016 12:44:44 +0000 (14:44 +0200)] 
tests: More ieee802_11_vendor_ie_concat() coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: VHT with 160 MHz channel width and HT40 disabled
Jouni Malinen [Mon, 26 Dec 2016 11:12:06 +0000 (13:12 +0200)] 
tests: VHT with 160 MHz channel width and HT40 disabled

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: VHT 160 MHz tests with all different HT primary channels
Jouni Malinen [Mon, 26 Dec 2016 10:43:06 +0000 (12:43 +0200)] 
tests: VHT 160 MHz tests with all different HT primary channels

This extends previous ap_vht160_no_dfs test case coverage by running the
same test case with each of the possible HT primary channel
alternatives.

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