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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Jouni Malinen [Tue, 16 Dec 2014 21:42:38 +0000 (23:42 +0200)]
tests: Dump monitor messages before hwsim_utils test
This may be needed in some corner cases where broadcast frames with two
associated stations are received by both devices.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 18 Dec 2014 14:18:54 +0000 (16:18 +0200)]
tests: Fix wifi_display_persistent_group event checks
The final invitation case in this test was verified incorrectly. The GO
was already operatign in that case, so there was not supposed to be a
new P2P-GROUP-STARTED message from GO. That happened to be show up in
the pending event messages from the last instance, but that was just by
accident and any additional dump_monitor() operation added here would
cause this test to fail. Fix this by handling the final invitation
separately and verifying that only the client side indicates
P2P-GROUP-STARTED.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 18 Dec 2014 14:00:25 +0000 (16:00 +0200)]
tests: Allow dump_monitor() to be used without global monitor interface
It is possible for WpaSupplicant instance to be used without the global
control socket, so allow dump_monitor() to handle this case cleanly.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 14 Dec 2014 23:32:01 +0000 (01:32 +0200)]
tests: Try to clear scan results after regulatory domain changes
It was possible for regulatory domain changes to "leak" into following
test cases in number of cases where the cfg80211 BSS table remained
after regulatory domain had been restored to world roaming. Try to make
this less likely to occur by explicitly clearing BSS table at the end of
test cases that use different regulatory domain. This makes P2P test
cases that verify channel selection based on world roaming rules more
robust.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 23:13:03 +0000 (01:13 +0200)]
tests: Make flush_scan_cache() more robust
It was possible for BSS entries on the scanned channel (2412 MHz) to be
left behind after flush_scan_cache() call. Use a less likely channel
2417 MHz as the default channel to scan. This will hopefully get rid of
most problematic BSS entries from previous test cases. For example,
ap_hs20_oen followed by ap_hs20_random_mac could fail due to
INTERWORKING_CONNECT seeing non-RSN scan result from the previous test
case.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 22:55:56 +0000 (00:55 +0200)]
Do not allow network block scan_freq override SCAN command frequencies
The manual scan operations with the SCAN command are supposed to have
independent set of scan frequencies, so do not allow scan_freq
parameters to override scanned frequencies for scans that were triggered
with a SCAN command.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 21:52:02 +0000 (23:52 +0200)]
SAE: Check Status Code in Authentication frames
While other authentication algorithms mark Status Code as being Reserved
in the case of the transaction number 1, SAE does not. Check that the
Status Code indicates success before creating SAE state. In addition,
fix the mesh anti-clogging token request parsing on big endian CPUs.
Transaction number 2 (confirm) can also have non-zero Status Code to
report an error. Those should be processed, but not replied to with yet
another error message. This could happen in mesh case. Avoid a loop of
error messages by dropping the non-success case without additional
response.
In addition, don't reply to unknown transaction numbers if the status
code is non-zero. This avoids a loop of error messages if an invalid
frame where to be injected (or unlikely corruption were to occur).
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 21:34:43 +0000 (23:34 +0200)]
tests: Use helper function for adding open mesh network
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 21:28:36 +0000 (23:28 +0200)]
tests: Mesh with dynamic interface
Signed-off-by: Jouni Malinen <j@w1.fi>
Masashi Honma [Sat, 15 Nov 2014 01:35:23 +0000 (10:35 +0900)]
mesh: Add mesh interface creation command for mesh gate
The mesh gate is used to bridge (or route) between mesh network and
another network. For example, mesh gate acts as router between mesh
network and IEEE 802.11 BSS network.
This command makes a virtual mesh interface to be used for mesh gate.
This command expects to be used like this.
wpa_cli -i wlan0 MESH_INTERFACE_ADD ifname=mesh0
wpa_cli -i mesh0 add_network
wpa_cli -i mesh0 set_network 0 ssid '"commell_2X_mmm"'
wpa_cli -i mesh0 set_network 0 mode 5
wpa_cli -i mesh0 set_network 0 frequency 2412
wpa_cli -i mesh0 set_network 0 key_mgmt SAE
wpa_cli -i mesh0 set_network 0 psk '"
01234567"'
wpa_cli -i mesh0 mesh_group_add 0
wpa_cli -i wlan0 mesh_group_remove mesh0
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Jouni Malinen [Sun, 14 Dec 2014 18:13:22 +0000 (20:13 +0200)]
SAE: Add sae_group to AP/mesh mode STA ctrl_iface data
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 18:03:54 +0000 (20:03 +0200)]
Extend wpa_supplicant STA* ctrl_iface commands for mesh
Since mesh functionality uses struct hostapd_data to maintain peer
state, the existing STA* control interface commands can be used to
display information about the peers.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 17:15:48 +0000 (19:15 +0200)]
tests: Make pmksa_cache_opportunistic_connect more robust
Use scan_for_bss() instead of scan(freq) to avoid false positives due to
active scan failing under heavy load.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 17:01:25 +0000 (19:01 +0200)]
Remove unused find_first_bit()
This was used only for the VHT capability checks for determining bit
offset for right shift. That was replaced with a constant defines since
there is no need to calculate this at runtime.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 17:00:38 +0000 (19:00 +0200)]
Clean up VHT configuration validation
There is no need to use runtime call to find_first_bit() to determine
shift amount for a constant integer.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Dec 2014 16:44:10 +0000 (18:44 +0200)]
Clean up VHT override max A-MPDU override calculation
There is no need to use runtime call to find_first_bit() to determine
shift amount for a constant integer.
Signed-off-by: Jouni Malinen <j@w1.fi>
Led [Sun, 14 Dec 2014 15:19:57 +0000 (17:19 +0200)]
Fix bashisms in wps-ap-cli script
Option '-p' of 'read' command may be unsupported in some POSIX-complete
shells. So replace 'read -p' with 'echo -n'/'read' pair.
Signed-off-by: Oleksandr Chumachenko <ledest@gmail.com>
Jörg Krause [Wed, 3 Dec 2014 21:43:44 +0000 (22:43 +0100)]
wext: Fix musl build error
Building wpa_supplicant with the musl C library fails since musl does
not define type names such as '__uint32_t'. To support building
wpa_supplicant with the musl C library use the integer types declared in
the ISO C standard header file <stdint.h>.
Signed-off-by: Jörg Krause <jkrause@posteo.de>
Rafał Miłecki [Sat, 6 Dec 2014 15:06:35 +0000 (16:06 +0100)]
nl80211: Report new station / assoc event for the correct BSS
drv->ctx always points to the first BSS and we should report event using
BSS related to the interface we got NL80211_CMD_NEW_STATION from.
This fixes STA association for drivers using NL80211_CMD_NEW_STATION and
multiple virtual interfaces.
Before:
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0-1 (ifindex:7)
nl80211: New station 02:00:00:00:01:00
wlan0: STA 02:00:00:00:01:00 IEEE 802.11: associated
After:
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0-1 (ifindex:7)
nl80211: New station 02:00:00:00:01:00
wlan0-1: STA 02:00:00:00:01:00 IEEE 802.11: associated
This is not applicable to the cases where authentication (AP SME & MLME)
is in hostapd and hostapd_assoc_cb() instead of hostapd_notif_assoc()
handles BSS selection.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Arkadiusz (Arkq) Bokowy [Sat, 6 Dec 2014 16:05:09 +0000 (17:05 +0100)]
wpa_gui: Quiet mode - disable tray icon messages
If tray icon messages are perceived as disturbing, one can pass `-q`
parameter on the command line to disable them permanently.
Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
Arkadiusz (Arkq) Bokowy [Sat, 6 Dec 2014 16:02:18 +0000 (17:02 +0100)]
wpa_gui: More informative tray icon tool tip message
Show associated network SSID in the tool tip message of the
application's tray icon. When network is not associated, then simple
"(not-associated)" message is shown.
Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>