mech_eap.git
9 years agotests: Fix --codecov cases to find correct wpa_cli/hostapd_cli
Jouni Malinen [Mon, 29 Dec 2014 13:47:08 +0000 (15:47 +0200)]
tests: Fix --codecov cases to find correct wpa_cli/hostapd_cli

It was possible for the separate builds to not include
wpa_cli/hostapd_cli in the default location. Make sure hostapd_cli gets
built for --codecov cases and update both WPACLI and HAPDCLI paths to
match the alternative location.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Verify that hostapd-as-RADIUS-server started
Jouni Malinen [Thu, 25 Dec 2014 11:30:54 +0000 (13:30 +0200)]
tests: Verify that hostapd-as-RADIUS-server started

Large number of test cases will fail if hostapd fails to start as the
RADIUS server. To make this more obvious, verify that the RADIUS server
instance is running and do not even start test execution if the setup if
not work properly.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Limit number of failed test cases in the curses output
Jouni Malinen [Thu, 25 Dec 2014 11:20:42 +0000 (13:20 +0200)]
tests: Limit number of failed test cases in the curses output

It was possible for the scr.addstr() operations to fail and terminate
parallel-vm.py if the number of failed test cases increased beyond what
fits on the screen.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoAvoid -Wshadow warnings from older gcc versions
Jouni Malinen [Thu, 25 Dec 2014 11:02:29 +0000 (13:02 +0200)]
Avoid -Wshadow warnings from older gcc versions

It looks like gcc 4.8.2 would warn about these with -Wshadow, but 4.6.3
did.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoClean up debug prints to use wpa_printf()
Jouni Malinen [Wed, 24 Dec 2014 10:43:35 +0000 (12:43 +0200)]
Clean up debug prints to use wpa_printf()

This converts most of the remaining perror() and printf() calls from
hostapd and wpa_supplicant to use wpa_printf().

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoFix CONFIG_OS=none build
Jouni Malinen [Thu, 25 Dec 2014 09:31:27 +0000 (11:31 +0200)]
Fix CONFIG_OS=none build

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoFix CONFIG_OS=internal build
Jouni Malinen [Thu, 25 Dec 2014 09:29:08 +0000 (11:29 +0200)]
Fix CONFIG_OS=internal build

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoSupport private_key_passwd for GnuTLS (3.1.11+)
David Woodhouse [Thu, 18 Dec 2014 13:11:31 +0000 (13:11 +0000)]
Support private_key_passwd for GnuTLS (3.1.11+)

It's possible to jump through hoops to support it in older versions too,
but that seems a little unnecessary at this point.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
9 years agoGnuTLS: Get rid of warnings about deprecated typedef names
Jouni Malinen [Wed, 24 Dec 2014 18:46:07 +0000 (20:46 +0200)]
GnuTLS: Get rid of warnings about deprecated typedef names

'_t' suffix for gnutls_session and gnutls_transport_ptr was added in
GnuTLS 1.1.11 over ten years ago and the more recent versions of GnuTLS
have started forcing compiler warnings from the old names. Move to the
new names and don't bother about backwards compatibility with older
versions taken into account how long ago this change happened in GnuTLS.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoprivsep: Fix compilation due to associate() parameter updates
Jouni Malinen [Wed, 24 Dec 2014 18:10:23 +0000 (20:10 +0200)]
privsep: Fix compilation due to associate() parameter updates

struct wpa_driver_associate_params moved to using struct
hostapd_freq_params instead of just frequency. Need to update wpa_priv
to do same.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoP2P: Fix memory leak on GO startup failure path
Jouni Malinen [Wed, 24 Dec 2014 17:23:13 +0000 (19:23 +0200)]
P2P: Fix memory leak on GO startup failure path

Some of the struct hostapd_data variables get initialized with allocated
memory in the P2P GO case even before hapd->started has been set to 1.
As such, hostapd_free_hapd_data() needs to free these even if
!hapd->stated.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Clear active PBC mode from cfg80211 BSS table in p2p_channel
Jouni Malinen [Wed, 24 Dec 2014 17:05:06 +0000 (19:05 +0200)]
tests: Clear active PBC mode from cfg80211 BSS table in p2p_channel

This reduces number of test combinations in which PBC session overlap
could have been indicated incorrectly.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoWPS: Do not indicate PBC overlap for the same BSS
Jouni Malinen [Wed, 24 Dec 2014 16:40:25 +0000 (18:40 +0200)]
WPS: Do not indicate PBC overlap for the same BSS

Even if the UUID would have a mismatch, e.g., due to no UUID known for
the target in a new WPS PBC instance, do not indicate PBC session
overlap if the BSSID is same in the two entries. This should not really
happen in normal use cases, but can happen at least in some test
scenarios where the same BSSID is used in consecutive test cases and the
old BSS entry remains in cfg80211 cache.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Make p2p_channel test cases more robust
Jouni Malinen [Wed, 24 Dec 2014 16:32:15 +0000 (18:32 +0200)]
tests: Make p2p_channel test cases more robust

Wait for a CTRL-EVENT-REGDOM-CHANGE even before returning from
set_country() to avoid issues with test operations being executed before
all components have had chance to update their regulatory domain
information. Some of these test cases could fail under heavy load.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Maintain test result counters through the run
Jouni Malinen [Wed, 24 Dec 2014 15:34:29 +0000 (17:34 +0200)]
tests: Maintain test result counters through the run

This avoids having to go through the full output buffer from each
VM for each update during a test run.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Process VM stdout output in full lines
Jouni Malinen [Wed, 24 Dec 2014 14:06:37 +0000 (16:06 +0200)]
tests: Process VM stdout output in full lines

Merge partial lines together before processing them in parallel-vm.py.
This avoids issues in cases where the stdout read gets split into pieces
that do not include the full READY/PASS/FAIL/SKIP information. In
addition, strip unnecessary whitespace (mainly, '\r') from the log
lines.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Disable terminal echo for stdin control (-i)
Jouni Malinen [Wed, 24 Dec 2014 09:53:14 +0000 (11:53 +0200)]
tests: Disable terminal echo for stdin control (-i)

This makes vm-run.sh output cleaner to parse for parallel-vm.py.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Do not print to stdout during test execution
Jouni Malinen [Wed, 24 Dec 2014 11:06:25 +0000 (13:06 +0200)]
tests: Do not print to stdout during test execution

This cleans up vm-run.sh output and makes information more easily
available from the *.log files.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Add debug logging for parallel-vm.py
Jouni Malinen [Wed, 24 Dec 2014 09:40:03 +0000 (11:40 +0200)]
tests: Add debug logging for parallel-vm.py

parallel-vm.log is now written with details of test execution steps and
results. This makes it easier to debug if something goes wrong in VM
monitoring. The --debug option can be used to enable verbose debugging.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Retry failed cases automatically in parallel VM run
Jouni Malinen [Tue, 23 Dec 2014 20:25:29 +0000 (22:25 +0200)]
tests: Retry failed cases automatically in parallel VM run

parallel-vm.py is now retrying failed cases once at the end of the run.
If all the failed test cases passed on the second attempt, that is noted
in the summary output. Results are also indicated as the exit value from
the run: 0 = all cases passed on first run, 1 = some cases failed once,
but everything passed after one retry, 2 = some cases failed did not
succeed at all.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Add more long duration test cases to parallel-vm.py list
Jouni Malinen [Tue, 23 Dec 2014 18:34:13 +0000 (20:34 +0200)]
tests: Add more long duration test cases to parallel-vm.py list

This adds the remaining test cases that took more than 15 seconds to run
into the list of test cases to run at the beginning of the execution to
avoid these being left at the end when only some of the VMs may be
running.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Check if_indextoname() return value for bridge events
Jouni Malinen [Tue, 23 Dec 2014 17:35:34 +0000 (19:35 +0200)]
nl80211: Check if_indextoname() return value for bridge events

It would be at least theoretically possible for the bridge netdev to
have disappeared at the time hostapd processes the RTM newlink/dellink
message. As such, it is better to verify that if_indextoname() actually
returned success before printing the bridge ifname in debug. In
addition, there is not much point trying to add the bridge ifindex into
the list of own ifindexes in case the interface has already been
removed, so skip that part as well.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Optimize ap_qosmap test cases
Jouni Malinen [Tue, 23 Dec 2014 15:46:34 +0000 (17:46 +0200)]
tests: Optimize ap_qosmap test cases

Avoid unnecessary DATA_TEST_CONFIG calls and wlantest_cli invocations to
speed up the test cases. This drops ap_qosmap execution time from about
14 seconds to under 3 seconds.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Optimize multi_check() waits in ap_bss_add* and ap_multi_bss*
Jouni Malinen [Tue, 23 Dec 2014 15:20:18 +0000 (17:20 +0200)]
tests: Optimize multi_check() waits in ap_bss_add* and ap_multi_bss*

There is no need to wait for the longer fixed duration for each STA when
an event message or an earlier wait for another STA can be used instead.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Make scan_hidden* more robust
Jouni Malinen [Tue, 23 Dec 2014 14:15:11 +0000 (16:15 +0200)]
tests: Make scan_hidden* more robust

Clear cfg80211 BSS table more carefully after the scan_hidden* test
cases. At least scan_hidden_many could have left behind a hidden SSID
entry that could cause problems for following scan_bss_operations test
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agomesh: Delay Authentication frame process with no_auto_peer
Jouni Malinen [Tue, 23 Dec 2014 11:44:38 +0000 (13:44 +0200)]
mesh: Delay Authentication frame process with no_auto_peer

There is a possible race condition between receiving the
NEW_PEER_CANDIDATE event and the Authentication frame from the peer.
Previously, if the Authentication frame RX event was indicated first,
that frame got dropped silently. Now, this frame is still dropped, but a
copy of it is stored and the frame gets processed on the following
NEW_PEER_CANDIDATE event if that is received for the same peer within
two seconds.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Fix mesh no_auto_peer=1 test cases to allow enough time for retry
Jouni Malinen [Tue, 23 Dec 2014 11:10:22 +0000 (13:10 +0200)]
tests: Fix mesh no_auto_peer=1 test cases to allow enough time for retry

If the initial Authentication frame was too early for the peer (i.e.,
NEW_PEER_CANDIDATE event arrived only after the Authentication frame),
wpas_mesh_open_no_auto and wpas_mesh_secure_no_auto test cases were
failing since they waited only for 10 seconds for the connection to be
completed while the retry timer was set to 10-20 seconds on the
authenticator side.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Fix wpas_ctrl_data_test with Linux 3.19-rc1
Jouni Malinen [Tue, 23 Dec 2014 10:27:14 +0000 (12:27 +0200)]
tests: Fix wpas_ctrl_data_test with Linux 3.19-rc1

The kernel commit 'packet: make packet_snd fail on len smaller than l2
header' started rejecting <= 14 octet raw packet socket transmission.
This test case was testing with 14 ocets and that is now rejected by the
kernel. While this may be a kernel side issue, use one octet longer test
data for now to avoid undesired FAIL cases in hwsim tests.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Fix ap_ht_40mhz_intolerant_ap
Jouni Malinen [Mon, 22 Dec 2014 20:07:54 +0000 (22:07 +0200)]
tests: Fix ap_ht_40mhz_intolerant_ap

The previous design did not actually break from the wait loop when the
AP changed back to 40 MHz channel and as such, ended up waiting the full
30 second time. Furthermore, the five second delay time for returning
back to 40 MHz was not sufficiently long to test behavior correctly
since the STA did not have any chances of returning the next coex report
before the AP had returned to 40 MHz. Increase the AP wait time to 15
seconds so that the once per 10 seconds OBSS scan from the STA gets in
before changing back to 40 MHz channel (after the 40 MHz intolerant AP
gets disabled).

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoSME: Optimize OBSS scanning
Jouni Malinen [Mon, 22 Dec 2014 20:07:03 +0000 (22:07 +0200)]
SME: Optimize OBSS scanning

Include only the potentially affected channel range in OBSS scans to
reduce the amount of offchannel time needed for scanning when requested
by the AP.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoHT: More robust 20/40 coex Action frame parsing
Jouni Malinen [Mon, 22 Dec 2014 19:54:11 +0000 (21:54 +0200)]
HT: More robust 20/40 coex Action frame parsing

Commit 587d60d2b74190d58ddeb6a30ab338352af1186a ('Add AP mode support
for HT 20/40 co-ex Action frame') added processing of co-ex report, but
did not include proper bounds checking or IE type checking for the
payload. Furthermore, this was not ready for the possible extensibility
of the 20/40 BSS Coexistence element.

Fix these by checking IE ids for both elements and doing more
apprioriate bounds checking for the element lengths to avoid potentially
reading beyond the frame buffer. Though, the event receive buffer in
both libnl and driver_nl80211_monitor.c is sufficiently large to make it
very unlikely that the maximum read of about 260 bytes beyond the end of
the Action frame would really have any chances of hitting the end of the
memory buffer, so the practical effect of missing bounds checking would
have been possibly accepting an invalid report frame and moving to 20
MHz channel unnecessarily.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoHT: Fix 20/40 coex Action frame parsing
Jouni Malinen [Mon, 22 Dec 2014 18:41:19 +0000 (20:41 +0200)]
HT: Fix 20/40 coex Action frame parsing

Commit 5ce3ae4c8f2a07c28e0bbae1b68e5524ee034387 tried to clean up
fetching a pointer to the action code field, but it forgot to add
IEEE80211_HDRLEN to the pointer. This resulted in the coex report
elements being read from too early in the frame.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Optimize run-tests.py test case dict iteration
Jouni Malinen [Mon, 22 Dec 2014 18:08:11 +0000 (20:08 +0200)]
tests: Optimize run-tests.py test case dict iteration

Use a single iteration through the module dictionary rather than
iterating over the keys and separately fetching values to get the
function.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Optimize stop.sh wait times
Jouni Malinen [Mon, 22 Dec 2014 17:37:08 +0000 (19:37 +0200)]
tests: Optimize stop.sh wait times

There is no need to wait for fixed 0.5 seconds for the processes to
exit.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Optimize start.sh execution time
Jouni Malinen [Mon, 22 Dec 2014 17:22:42 +0000 (19:22 +0200)]
tests: Optimize start.sh execution time

There is no need to wait for one extra second to chown log files when
running as root which is always the case in VM execution.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Remove practically unused process_drv_event()
Jouni Malinen [Mon, 22 Dec 2014 14:12:11 +0000 (16:12 +0200)]
nl80211: Remove practically unused process_drv_event()

This was used in the past, but all the event processing is now either
through process_global_event() or process_bss_event().

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Merge grpform_cred_ready_timeout test cases into a single one
Jouni Malinen [Mon, 22 Dec 2014 13:53:12 +0000 (15:53 +0200)]
tests: Merge grpform_cred_ready_timeout test cases into a single one

These test cases had a long 120 seconds wait for the GO Negotiation
initiator to time out. This can be done using two devices in parallel to
save two minutes from total test execution time.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoAdd more debug prints for WPA/RSN selection issues for connection
Jouni Malinen [Mon, 22 Dec 2014 11:49:52 +0000 (13:49 +0200)]
Add more debug prints for WPA/RSN selection issues for connection

ap_ft_sae test case managed to hit a somewhat unclear error case which
resulted in "WPA: Failed to select WPA/RSN" print and not enough
information to figure out what exactly had went wrong.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Mesh max peering limit
Jouni Malinen [Mon, 22 Dec 2014 09:38:22 +0000 (11:38 +0200)]
tests: Mesh max peering limit

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Remove unnecessary wrap_wpas_mesh_test() complexity
Jouni Malinen [Mon, 22 Dec 2014 09:24:49 +0000 (11:24 +0200)]
tests: Remove unnecessary wrap_wpas_mesh_test() complexity

This function did not seem to do anything else apart from making it less
obvious that hwsim_utils.test_connectivity() is called.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agomesh: Fill Number of Peerings field in Mesh Formation Info
Masashi Honma [Fri, 19 Dec 2014 05:59:54 +0000 (14:59 +0900)]
mesh: Fill Number of Peerings field in Mesh Formation Info

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
9 years agomesh: Add debug message when peering limit is reached
Masashi Honma [Sat, 20 Dec 2014 23:57:15 +0000 (08:57 +0900)]
mesh: Add debug message when peering limit is reached

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
9 years agomesh: Make maximum number of peer links configurable
Masashi Honma [Fri, 19 Dec 2014 05:59:52 +0000 (14:59 +0900)]
mesh: Make maximum number of peer links configurable

Maximum number of peer links is maximum number of connecting mesh peers
at the same time. This value is 0..255 based on the
dot11MeshNumberOfPeerings range.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
9 years agotests: Mesh beacon_int parameter
Jouni Malinen [Sun, 21 Dec 2014 21:42:03 +0000 (23:42 +0200)]
tests: Mesh beacon_int parameter

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agomesh: Make beacon interval configurable
Masashi Honma [Tue, 16 Dec 2014 09:52:25 +0000 (18:52 +0900)]
mesh: Make beacon interval configurable

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
9 years agodoc: Remove error on document creation
Masashi Honma [Tue, 16 Dec 2014 03:31:45 +0000 (12:31 +0900)]
doc: Remove error on document creation

Unexpected trailing zero causes following error.

wpa_supplicant.sgml:472:53:E: character data is not allowed here

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
9 years agotests: Make parallel VM start a bit more resource friendly
Jouni Malinen [Sun, 21 Dec 2014 20:04:54 +0000 (22:04 +0200)]
tests: Make parallel VM start a bit more resource friendly

Wait one second between each kvm start to avoid hitting large number of
processes trying to start in parallel. This allows the VMs to be started
more efficiently for parallel-vm.py runs with large number of VMs.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Clear cfg80211 BSS table at the end of scan_hidden
Jouni Malinen [Sun, 21 Dec 2014 19:58:47 +0000 (21:58 +0200)]
tests: Clear cfg80211 BSS table at the end of scan_hidden

It was possible for the hidden SSID entry to leak into following test
cases and result in failures, e.g., in this sequence:

scan_hidden
scan_reqs_with_non_scan_radio_work
radius_auth_unreachable
wep_open_auth

BSS <BSSID> picked incorrect BSS entry within wpa_supplicant due to the
old zero-length SSID showing up from the earlier hidden SSID case.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Optimize test case execution order for multiple VMs
Jouni Malinen [Sun, 21 Dec 2014 16:20:15 +0000 (18:20 +0200)]
tests: Optimize test case execution order for multiple VMs

Move test cases with long duration to the beginning as an optimization
to avoid last part of the test execution running a long duration test
case on a single VM while all other VMs have already completed their
work.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoFlush WPS registrar state on wpa_supplicant FLUSH command
Jouni Malinen [Sun, 21 Dec 2014 15:32:35 +0000 (17:32 +0200)]
Flush WPS registrar state on wpa_supplicant FLUSH command

This helps hwsim test cases by avoiding undesired state from previously
executed test cases affecting following tests.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Do not mark proxyarp_open failed if ebtables is not available
Jouni Malinen [Sun, 21 Dec 2014 15:14:00 +0000 (17:14 +0200)]
tests: Do not mark proxyarp_open failed if ebtables is not available

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Use new scripts for vm-run.sh codecov
Jouni Malinen [Sun, 21 Dec 2014 14:41:59 +0000 (16:41 +0200)]
tests: Use new scripts for vm-run.sh codecov

Now there is only one set of commands to maintain. The separate reports
for individual components have not been of much use in the past, so they
are dropped for now.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: EAP-IKEv2 protocol tests
Jouni Malinen [Sat, 20 Dec 2014 23:09:21 +0000 (01:09 +0200)]
tests: EAP-IKEv2 protocol tests

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoEAP-IKEv2: Fix a typo in a debug message
Jouni Malinen [Sun, 21 Dec 2014 11:18:56 +0000 (13:18 +0200)]
EAP-IKEv2: Fix a typo in a debug message

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoEAP-IKEv2 peer: Fix fragmentation reassembly
Jouni Malinen [Sat, 20 Dec 2014 22:40:30 +0000 (00:40 +0200)]
EAP-IKEv2 peer: Fix fragmentation reassembly

ret->ignore needs to be cleared to FALSE when sending fragment ack
message to avoid ignoring the fragment.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoEAP-IKEv2: Add explicit limit for maximum message length
Jouni Malinen [Sat, 20 Dec 2014 22:25:16 +0000 (00:25 +0200)]
EAP-IKEv2: Add explicit limit for maximum message length

This avoids accepting unnecessarily large memory allocations.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: ERP with EAP-IKEv2
Jouni Malinen [Sat, 20 Dec 2014 21:48:53 +0000 (23:48 +0200)]
tests: ERP with EAP-IKEv2

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Mesh ht_mode options
Jouni Malinen [Sat, 20 Dec 2014 19:27:22 +0000 (21:27 +0200)]
tests: Mesh ht_mode options

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: wdev_id in STATUS-DRIVER
Jouni Malinen [Sat, 20 Dec 2014 19:18:26 +0000 (21:18 +0200)]
tests: wdev_id in STATUS-DRIVER

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: hostapd behavior with interface in different bridge
Jouni Malinen [Sat, 20 Dec 2014 19:01:31 +0000 (21:01 +0200)]
tests: hostapd behavior with interface in different bridge

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Fix interface-in-different-bridge case
Jouni Malinen [Sat, 20 Dec 2014 19:00:08 +0000 (21:00 +0200)]
nl80211: Fix interface-in-different-bridge case

The local ifindex list needs to be updated only if the current bridge
interface is the correct one. If hostapd is going to move the interface
to another bridge, the old bridge ifindex must not be added. In
addition, when removing the bridge interface on deinit, it may need to
be set down to allow bridge removal.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: bg_scan_period parameter configuration
Jouni Malinen [Sat, 20 Dec 2014 17:44:40 +0000 (19:44 +0200)]
tests: bg_scan_period parameter configuration

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: IBSS cfg80211 workarounds
Jouni Malinen [Sat, 20 Dec 2014 17:36:41 +0000 (19:36 +0200)]
tests: IBSS cfg80211 workarounds

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Fix cfg80211 workaround for IBSS join
Jouni Malinen [Sat, 20 Dec 2014 17:35:23 +0000 (19:35 +0200)]
nl80211: Fix cfg80211 workaround for IBSS join

The interface was incorrectly changed to station mode between the two
IBSS join requests and that made the second attempt fail. Remove that
undesired mode clearing from this special case of IBSS leave sequence.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Dynamic BSS add operation reusing existing interface
Jouni Malinen [Sat, 20 Dec 2014 17:04:18 +0000 (19:04 +0200)]
tests: Dynamic BSS add operation reusing existing interface

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: TDLS with VHT
Jouni Malinen [Sat, 20 Dec 2014 16:29:57 +0000 (18:29 +0200)]
tests: TDLS with VHT

This adds some more coverage, but the TDLS setup is not for VHT due to
missing support in mac80211.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: VHT and 40 MHz channel
Jouni Malinen [Sat, 20 Dec 2014 16:20:00 +0000 (18:20 +0200)]
tests: VHT and 40 MHz channel

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: SMPS AP configuration options
Jouni Malinen [Sat, 20 Dec 2014 16:16:57 +0000 (18:16 +0200)]
tests: SMPS AP configuration options

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: IEEE 802.1X with static WEP
Jouni Malinen [Sat, 20 Dec 2014 15:50:02 +0000 (17:50 +0200)]
tests: IEEE 802.1X with static WEP

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoFix wpa_key_mgmt and wpa_pairwise configuration for non-WPA
Jouni Malinen [Sat, 20 Dec 2014 15:45:03 +0000 (17:45 +0200)]
Fix wpa_key_mgmt and wpa_pairwise configuration for non-WPA

These hostapd configuration parameter was left at the default values
(WPA-PSK/TKIP) even for cases where WPA was disabled. While these
parameters are not really used much in non-WPA cases, they do get used
for one corner case in nl80211 configuration to disable encryption of
EAPOL frames in IEEE 802.1X WEP case.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Fix no-encrypt for IEEE 802.1X WEP EAPOL
Jouni Malinen [Sat, 20 Dec 2014 15:35:03 +0000 (17:35 +0200)]
nl80211: Fix no-encrypt for IEEE 802.1X WEP EAPOL

Commit 9f12614b8cad55e5ec0a50e04d9d3e090df666fd ('nl80211: Do not
encrypt IEEE 802.1X WEP EAPOL') tried to use
NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT to disable encryption of EAPOL
frames for WEP IEEE 802.1X. However, it used incorrect key management
suite (IEEE 802.1X with WPA/WPA2 while the non-WPA version is needed
here). Consequently, the no-encrypt flag was never set to the driver
(WPA/WPA2 cases do not meet the WEP as pairwise criteria).

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: cfg80211 scan-for-auth workaround with WEP keys
Jouni Malinen [Sat, 20 Dec 2014 15:28:53 +0000 (17:28 +0200)]
tests: cfg80211 scan-for-auth workaround with WEP keys

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: cfg80211 scan-for-auth workaround failing
Jouni Malinen [Sat, 20 Dec 2014 15:22:18 +0000 (17:22 +0200)]
tests: cfg80211 scan-for-auth workaround failing

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Large number of BSS add operations with hostapd
Jouni Malinen [Sat, 20 Dec 2014 15:13:00 +0000 (17:13 +0200)]
tests: Large number of BSS add operations with hostapd

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: rfkill block prior to wpa_supplicant start
Jouni Malinen [Sat, 20 Dec 2014 14:46:39 +0000 (16:46 +0200)]
tests: rfkill block prior to wpa_supplicant start

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Remove send_and_recv_msgs_global() wrapper
Jouni Malinen [Sat, 20 Dec 2014 13:45:28 +0000 (15:45 +0200)]
nl80211: Remove send_and_recv_msgs_global() wrapper

There was only a single user for this and calling send_and_recv()
directly is as simple as using this wrapper.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Remove unnecessary function declarations
Jouni Malinen [Sat, 20 Dec 2014 13:37:16 +0000 (15:37 +0200)]
nl80211: Remove unnecessary function declarations

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Radar detection on non-HT and on HT40- channels
Jouni Malinen [Sat, 20 Dec 2014 11:50:19 +0000 (13:50 +0200)]
tests: Radar detection on non-HT and on HT40- channels

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Report ROAM failure in pmksa_cache_opportunistic_multiple_sta
Jouni Malinen [Sat, 20 Dec 2014 11:37:08 +0000 (13:37 +0200)]
tests: Report ROAM failure in pmksa_cache_opportunistic_multiple_sta

There is no need to wait for the timeout if the ROAM command itself
failed. This could happen if an earlier test case had left hidden SSIDs
in the cfg80211 BSS table.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Clear cfg80211 scan results after wext_hidden
Jouni Malinen [Sat, 20 Dec 2014 11:36:01 +0000 (13:36 +0200)]
tests: Clear cfg80211 scan results after wext_hidden

Leaving hidden SSIDs in the cfg80211 BSS table can result in errors in
the following test cases, so use special care to clear all BSS entries
at the end of the wext_hidden test case.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Add wait_connected() and wait_disconnected() helpers
Jouni Malinen [Sat, 20 Dec 2014 09:51:30 +0000 (11:51 +0200)]
tests: Add wait_connected() and wait_disconnected() helpers

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Add --codecov support to parallel-vm.py
Jouni Malinen [Fri, 19 Dec 2014 22:51:55 +0000 (00:51 +0200)]
tests: Add --codecov support to parallel-vm.py

This allows code coverage report to be generated must faster with the
help of parallel VMs executing test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Connection with large number of scan_ssid=1 network blocks
Jouni Malinen [Fri, 19 Dec 2014 21:30:58 +0000 (23:30 +0200)]
tests: Connection with large number of scan_ssid=1 network blocks

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: P2P_LISTEN and scan
Jouni Malinen [Fri, 19 Dec 2014 21:17:06 +0000 (23:17 +0200)]
tests: P2P_LISTEN and scan

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: setband and scans
Jouni Malinen [Fri, 19 Dec 2014 21:08:10 +0000 (23:08 +0200)]
tests: setband and scans

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoAdd possibility to set the setband parameter
Jouni Malinen [Fri, 19 Dec 2014 20:56:41 +0000 (22:56 +0200)]
Add possibility to set the setband parameter

Commit faf9a8585d3e187074c7991e1cd7fb3792baf53e added mechanism for
selecting 2.4 or 5 GHz band for scan operation. However, no mechanism
for setting the setband value was added at that time. This commit adds a
new SET ctrl_iface parameter to allow the setband functionality to be
used. "SET setband <AUTO/5G/2G>" can be used to select all bands, 5 GHz
band only, or 2.4 GHz band only.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Additional coverage for filter_ssids=1
Jouni Malinen [Fri, 19 Dec 2014 18:26:07 +0000 (20:26 +0200)]
tests: Additional coverage for filter_ssids=1

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: AP_SCAN 2 operation
Jouni Malinen [Fri, 19 Dec 2014 18:08:58 +0000 (20:08 +0200)]
tests: AP_SCAN 2 operation

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoDo not trigger the scan during initialization on Android platforms
Sunil Dutt [Wed, 17 Dec 2014 07:17:10 +0000 (12:47 +0530)]
Do not trigger the scan during initialization on Android platforms

Android framework maintains a state to process the scan results after
the scan is issued. If wpa_supplicant issues the scan during the
initialization, the one issued by the framework may fail (with EBUSY) if
the host driver is already processing the scan. Thus, the scan results
returned for the first scan triggered by wpa_supplicant are not
processed for getting displayed resulting in delay for the display of
the first scan results after the Wi-Fi subsystem initialization. Thus,
trigger the scan only based on the framework request on Android.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: SCAN requests while in non-scan radio work
Jouni Malinen [Fri, 12 Dec 2014 10:07:09 +0000 (12:07 +0200)]
tests: SCAN requests while in non-scan radio work

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoReject new SCAN commands if there is a pending request
Jouni Malinen [Fri, 12 Dec 2014 10:11:14 +0000 (12:11 +0200)]
Reject new SCAN commands if there is a pending request

FAIL-BUSY was already returned for the case where a scan had been
started, but with the radio work design, it would have been possible to
schedule multiple scan requests if a non-scan radio work was in
progress. Multiple back-to-back scans are not usually very helpful, so
reject this type of cases where the SCAN command would be used to build
such a sequence.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agohostapd: Make install path configurable
Prashanth Bhatta [Fri, 6 Sep 2013 17:05:40 +0000 (10:05 -0700)]
hostapd: Make install path configurable

Makefile always installs to /usr/local/bin and on some platforms,
/usr/local/bin is not in default search path. Modify the Makefile such
that bin path can be configurable so that build system can pass
appropriate path for installation. If bin path is not specified then by
default binaries are installed in /usr/local/bin.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: P2P_LISTEN behavior with offchannel TX
Jouni Malinen [Thu, 18 Dec 2014 13:42:21 +0000 (15:42 +0200)]
tests: P2P_LISTEN behavior with offchannel TX

This verifies that offchannel TX (PD in this specific case) does not
stop ongoing long P2P_LISTEN operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoP2P: Avoid truncation of long listen operation due to offchan tx
Jithu Jance [Wed, 20 Aug 2014 16:25:06 +0000 (21:55 +0530)]
P2P: Avoid truncation of long listen operation due to offchan tx

On receiving the cancel remain on channel event, the pending_tx
is scheduled immediately and returned. This was preventing
the wpas_p2p_listen_start function from execution thereby resulting
in termination of the long listen operation.

Signed-off-by: Jithu Jance <jithu@broadcom.com>
9 years agotests: Fix proxyarp_open IPv4-from-bridge
Jouni Malinen [Tue, 16 Dec 2014 22:41:18 +0000 (00:41 +0200)]
tests: Fix proxyarp_open IPv4-from-bridge

There were couple of typos in the IP addresses and there was no coverage
for the normal unicast ARP response from the bridge (since non-wireless
device does not get proxied by the AP). In addition, it is better to
change the IP address used here to be unique to make the sniffer logs
easier to interpret.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Use send_ns() helper for the earlier proxyarp_open NS packets
Jouni Malinen [Tue, 16 Dec 2014 22:06:50 +0000 (00:06 +0200)]
tests: Use send_ns() helper for the earlier proxyarp_open NS packets

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Add traffic test to proxyarp_open
Jouni Malinen [Tue, 16 Dec 2014 21:46:19 +0000 (23:46 +0200)]
tests: Add traffic test to proxyarp_open

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: ProxyARP behavior with IPv6 frames
Jouni Malinen [Mon, 15 Dec 2014 20:54:21 +0000 (22:54 +0200)]
tests: ProxyARP behavior with IPv6 frames

This adds transmission of number of NS/NA frames to test ProxyARP
behavior. The actual validation of the AP behavior is still manual,
i.e., a separate inspectation of the capture files is needed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Add ebtables rules for ProxyARP
Jouni Malinen [Mon, 15 Dec 2014 22:41:52 +0000 (00:41 +0200)]
tests: Add ebtables rules for ProxyARP

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Use non-promiscuous mode and packet-buffered tcpdump capture
Jouni Malinen [Tue, 16 Dec 2014 21:44:52 +0000 (23:44 +0200)]
tests: Use non-promiscuous mode and packet-buffered tcpdump capture

This helps in avoiding truncated capture files in the proxyarp_open test
case.

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