aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-11-04 16:17:00 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-04 16:17:00 (GMT)
commitccb7e5ee599249d840037a2616222f5c9678f994 (patch)
tree98d12a19c0cce6e0a6aaefd57766e336dd15bce8
parent4a64a51b632adb37a2acb62b09f256e1375f61c3 (diff)
downloadhostap-ccb7e5ee599249d840037a2616222f5c9678f994.zip
hostap-ccb7e5ee599249d840037a2616222f5c9678f994.tar.gz
hostap-ccb7e5ee599249d840037a2616222f5c9678f994.tar.bz2
WPS: Send WSC_NACK if message without Message Type is received
-rw-r--r--src/wps/wps_enrollee.c3
-rw-r--r--src/wps/wps_registrar.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c
index b25b700..162a350 100644
--- a/src/wps/wps_enrollee.c
+++ b/src/wps/wps_enrollee.c
@@ -1099,7 +1099,8 @@ static enum wps_process_res wps_process_wsc_msg(struct wps_data *wps,
if (attr.msg_type == NULL) {
wpa_printf(MSG_DEBUG, "WPS: No Message Type attribute");
- return WPS_FAILURE;
+ wps->state = SEND_WSC_NACK;
+ return WPS_CONTINUE;
}
switch (*attr.msg_type) {
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index b2c6f00..21fc35d 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -2558,7 +2558,8 @@ static enum wps_process_res wps_process_wsc_msg(struct wps_data *wps,
if (attr.msg_type == NULL) {
wpa_printf(MSG_DEBUG, "WPS: No Message Type attribute");
- return WPS_FAILURE;
+ wps->state = SEND_WSC_NACK;
+ return WPS_CONTINUE;
}
if (*attr.msg_type != WPS_M1 &&