aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-02-06 12:19:59 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-08 10:36:44 (GMT)
commit4000aa7aca335ef084c507d2c9e4f1a1e12f577d (patch)
tree0c567d8e2b7ad844b149c957a50767fbd0e0faa3 /src
parent3f25b3c602364cf75e0dd426e80b422b36eeb40f (diff)
downloadhostap-06-4000aa7aca335ef084c507d2c9e4f1a1e12f577d.zip
hostap-06-4000aa7aca335ef084c507d2c9e4f1a1e12f577d.tar.gz
hostap-06-4000aa7aca335ef084c507d2c9e4f1a1e12f577d.tar.bz2
WPS: Allow minor version differences in Version attribute check
Version attribute processing details are not described in the WPS spec, but it is safer to allow minor version to change and only refuse to process the message if major version is different from ours. This matches with the behavior used in the Intel reference implementation. (cherry picked from commit b93b6004e43931c189ce867613ba4237fb7ade2c)
Diffstat (limited to 'src')
-rw-r--r--src/wps/wps_i.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wps/wps_i.h b/src/wps/wps_i.h
index b5b1232..85adf28 100644
--- a/src/wps/wps_i.h
+++ b/src/wps/wps_i.h
@@ -241,7 +241,8 @@ enum wps_process_res wps_registrar_process_msg(struct wps_data *wps,
static inline int wps_version_supported(const u8 *version)
{
- return version && *version == WPS_VERSION;
+ /* Require major version match, but allow minor version differences */
+ return version && (*version & 0xf0) == (WPS_VERSION & 0xf0);
}
#endif /* WPS_I_H */