All other test cases seem to work, but radius_das_disconnect_time_window
is still failing due to incorrect authenticator or Message-Authenticator
in Disconnect-Request.
Signed-off-by: Jouni Malinen <j@w1.fi>
Sending UTF-8 encoded data to logger file is currently not working
properly, so create a separate binary file with a copy of
sigma_dut-ap.conf instead to work with both python2 and python3.
Signed-off-by: Jouni Malinen <j@w1.fi>
Use struct.unpack() to get a list of int and then generate a list of
hexstr octets from it for ':'.join() to get consistent behavior for both
python2 and python3.
Signed-off-by: Jouni Malinen <j@w1.fi>
WPSAPHTTPServer class needs to explicitly decode the read value from
a bytes object to a str object.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Use ET.tostring() to avoid implicit bytes/str conversion issues within
ET implementation. Add XML declaration separately to match previous
behavior.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This is needed for python3 since the two argument version of
str.translate() is not available for unicode. Furthermore, these cases
of delete colons from the string are simple enough for replace.
Signed-off-by: Jouni Malinen <j@w1.fi>
Only python3 warns to this bug.
TypeError: '>' not supported between instances of 'type' and 'int'
Exception: '>' not supported between instances of 'type' and 'int'
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Need to do this to avoid issues with following operations that assume
the output to be a str object.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Avoid implicit conversion errors when constructing bytes objects or
passing a str object to a function that needs a bytes object.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
The wpas_config_file_key_mgmt fails with this error if wpa_supplicant is
built without CONFIG_SUITEB192=y:
Exception: SET_NETWORK failed
Exception: SET_NETWORK failed
Skip the WPA-EAP-SUITE-B-192 case if it is not supported in
wpa_supplicant so that the rest of the key_mgmt test coverage is
included.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This is needed in cases the hexlify() output is used to concatenate with
a string or used in string comparisons.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
This patch is made by using 2to3 command with some modifications.
$ find . -name *.py | xargs 2to3 -f imports -w -n
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
These were not used at all and caused unnecessary operations and in some
cases, compatibility issues with python3.
Signed-off-by: Jouni Malinen <j@w1.fi>
This code is identical to the wait_event() code, except for the
mon/global_mon instance. Create a _wait_event() function that
encapsulates this, and use it for both.
While at it, fix the bug in wait_global_event() where in the case
of not having a global_mon it always returns None.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This is useful when running a test multiple times, looking at
log output etc. to not have to pick out the right directory
each and every time.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
The wnm_sleep_mode_proto test case was already covering number of
invalid WNM-Sleep Mode Request frame cases, but it was missing the
shortest possible case with a missing Dialog Token field. Add that as a
regression test case for bounds checking in
ieee802_11_rx_wnmsleep_req().
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Since 3bdc651a62, start.sh creates the logs/current symlink even if
LOGDIR was set in the environment, as is the case when using run-all.sh.
However, run-all.sh and start.sh use a separate 'date' invocation so the
resulting string may be different. Usually it is the same because the
two invocations immediately follow each other, *except* if run-all.sh
also does a build. In addition, if the user sets LOGDIR to something
else, the symlink is completely bogus.
Fix this by not relying on the 'date' invocation for creating the
symlink. Instead, use the basename of LOGDIR. To keep things consistent
with current behavior, only create the symlink if LOGDIR points to a
subdirectory of DIR/logs.
The following use cases now work reliably:
* run-all.sh with or without the -B option;
* manually calling start.sh followed by run-tests.py without setting
LOGDIR.
* manually calling start.sh with LOGDIR set to a subdirectory of logs
and calling run-tests.py without --logdir option (which makes it
default to logs/current).
* run-all.sh with LOGDIR set to a subdirectory of logs.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This is in preparation for an implementation change that results in this
unreachable server case not incrementing radiusAuthClientAccessRequests.
Signed-off-by: Jouni Malinen <j@w1.fi>
These checks were repeated in almost every test case, so use helper
functions to get rid of duplicated (copy-pasted) code.
Signed-off-by: Jouni Malinen <j@w1.fi>
Add even more workarounds for cfg80211 regulatory state clearing since
these DFS test cases seem to be the most likely ones to fail due to
country=98 issues.
Signed-off-by: Jouni Malinen <j@w1.fi>
Add even more workarounds for cfg80211 regulatory state clearing since
these DFS test cases seem to be the most likely ones to fail due to
country=98 issues.
Signed-off-by: Jouni Malinen <j@w1.fi>
Add even more workarounds for cfg80211 regulatory state clearing since
these WNM test cases seem to be the most likely ones to fail due to
country=98 issues.
Signed-off-by: Jouni Malinen <j@w1.fi>
In addition, add even more workarounds for cfg80211 regulatory state
clearing since this test case seems to be the most likely one to fail
due to country=98 issues.
Signed-off-by: Jouni Malinen <j@w1.fi>
This is a regression test case for FT-over-DS that got broken on
mac80211-based drivers when the extra key reinstallation checks were
added.
Signed-off-by: Jouni Malinen <j@w1.fi>
ap_ft_oom seemed to depend on undesired wpa_supplicant behavior of
trying to do FT protocol even without being ready for reassociation.
This is going to be fixed in wpa_supplicant which would make this test
case fail, so split it into separate test cases for each failure item to
be able to avoid incorrect test failures.
Signed-off-by: Jouni Malinen <j@w1.fi>
The previous roam() and roam_over_ds() checks would have ignored failing
association rejection if a consecutive attempt to connect succeeds
within the initial time limit. This can miss incorrect behavior, so
check explicitly for association rejection.
Signed-off-by: Jouni Malinen <j@w1.fi>
The number of direct allocation within wpa_supplicant_mesh_init()
has been reduced due to RSN init function is factored out.
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
Verify that the beacon report contains the last beacon report
indication subelement when requested in the beacon request.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Verify that when the frame body subelement causes the
measurement report element to exceed the maximum element size,
the beacon report is fragmented and the frame body fragment ID
subelement is added with the correct fragment number.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Verify that not updating GTK (i.e., only update PTK) in the driver does
not break connectivity. This case is different after the check for
"already in-use GTK" and rejection of GTK reinstallation.
Signed-off-by: Jouni Malinen <j@w1.fi>
Use of country=00 (world roaming) seemed to not work anymore with the
current cfg80211 regulatory implementation since the existing channel is
left enabled when moving to country=00. Use a specific country code that
does enforce the selected channel from being used anymore to make this
test case pass again.
The change in cfg80211 behavior is from the kernel commit 113f3aaa81bd
("cfg80211: Prevent regulatory restore during STA disconnect in
concurrent interfaces").
Signed-off-by: Jouni Malinen <j@w1.fi>
With this command, RSSI signal can be controlled. Due to restrictions in
kernel, only values in the range of [-30, -50] can be used. The command
is implemented by changing the TX power.
Signed-off-by: Beni Lev <beni.lev@intel.com>