diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-02-06 14:15:47 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-02-06 14:15:47 +0200 |
commit | f65cbff3a337888cd11a6fc1748709172c98b744 (patch) | |
tree | b461c9a565d8c94b20ba63ebb0317656f7ddf491 /src/wps/wps_enrollee.c | |
parent | fda90ab4b73b19d4638e8b7cd4c90458e51f9e3e (diff) | |
download | external_wpa_supplicant_8_ti-f65cbff3a337888cd11a6fc1748709172c98b744.zip external_wpa_supplicant_8_ti-f65cbff3a337888cd11a6fc1748709172c98b744.tar.gz external_wpa_supplicant_8_ti-f65cbff3a337888cd11a6fc1748709172c98b744.tar.bz2 |
WPS: Moved Version attribute validation into a shared function
Diffstat (limited to 'src/wps/wps_enrollee.c')
-rw-r--r-- | src/wps/wps_enrollee.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c index 6b6bc27..179f7db 100644 --- a/src/wps/wps_enrollee.c +++ b/src/wps/wps_enrollee.c @@ -956,7 +956,7 @@ static enum wps_process_res wps_process_wsc_msg(struct wps_data *wps, if (wps_parse_msg(msg, &attr) < 0) return WPS_FAILURE; - if (attr.version == NULL || *attr.version != WPS_VERSION) { + if (!wps_version_supported(attr.version)) { wpa_printf(MSG_DEBUG, "WPS: Unsupported message version 0x%x", attr.version ? *attr.version : 0); return WPS_FAILURE; @@ -1029,7 +1029,7 @@ static enum wps_process_res wps_process_wsc_ack(struct wps_data *wps, if (wps_parse_msg(msg, &attr) < 0) return WPS_FAILURE; - if (attr.version == NULL || *attr.version != WPS_VERSION) { + if (!wps_version_supported(attr.version)) { wpa_printf(MSG_DEBUG, "WPS: Unsupported message version 0x%x", attr.version ? *attr.version : 0); return WPS_FAILURE; @@ -1081,7 +1081,7 @@ static enum wps_process_res wps_process_wsc_nack(struct wps_data *wps, if (wps_parse_msg(msg, &attr) < 0) return WPS_FAILURE; - if (attr.version == NULL || *attr.version != WPS_VERSION) { + if (!wps_version_supported(attr.version)) { wpa_printf(MSG_DEBUG, "WPS: Unsupported message version 0x%x", attr.version ? *attr.version : 0); return WPS_FAILURE; |