aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-28 16:35:30 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-29 08:00:32 (GMT)
commit75d1d0f7b635134bba536c7797a3bf4f362f4fc2 (patch)
tree21fcb46532e29db348628dfabd3129b2a3a9100f /src
parentd658205a895e0b39dbb0ed05068a51a80d849782 (diff)
downloadhostap-75d1d0f7b635134bba536c7797a3bf4f362f4fc2.zip
hostap-75d1d0f7b635134bba536c7797a3bf4f362f4fc2.tar.gz
hostap-75d1d0f7b635134bba536c7797a3bf4f362f4fc2.tar.bz2
WPS: Allow testing mode to disable 2.0 functionality
Previously, wps_version_number was used only to test extensibility to newer version numbers, but it can also be used to enable testing of older versions (1.0), e.g., to avoid hitting some 2.0 specific validation steps. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/wps/wps_attr_build.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wps/wps_attr_build.c b/src/wps/wps_attr_build.c
index b232754..336246e 100644
--- a/src/wps/wps_attr_build.c
+++ b/src/wps/wps_attr_build.c
@@ -201,6 +201,11 @@ int wps_build_wfa_ext(struct wpabuf *msg, int req_to_enroll,
#ifdef CONFIG_WPS2
u8 *len;
+#ifdef CONFIG_WPS_TESTING
+ if (WPS_VERSION == 0x10)
+ return 0;
+#endif /* CONFIG_WPS_TESTING */
+
if (wpabuf_tailroom(msg) <
7 + 3 + (req_to_enroll ? 3 : 0) +
(auth_macs ? 2 + auth_macs_count * ETH_ALEN : 0))