Browse Source

WPS: Send WSC_NACK if message without Message Type is received

Jouni Malinen 14 years ago
parent
commit
ccb7e5ee59
2 changed files with 4 additions and 2 deletions
  1. 2 1
      src/wps/wps_enrollee.c
  2. 2 1
      src/wps/wps_registrar.c

+ 2 - 1
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) {

+ 2 - 1
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 &&