]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/wps/wps.c
WPS: Wait for EAPOL-Start unless WPS 2.0 station as workaround
[thirdparty/hostap.git] / src / wps / wps.c
index 5c8c25fea61dfa7742f7140035b0617b4452d43d..101ae1d0b94eb4b19b2b3a5e9e6dfed7dce41492 100644 (file)
@@ -354,6 +354,19 @@ const u8 * wps_get_uuid_e(const struct wpabuf *msg)
 }
 
 
+/**
+ * wps_is_20 - Check whether WPS attributes claim support for WPS 2.0
+ */
+int wps_is_20(const struct wpabuf *msg)
+{
+       struct wps_parse_attr attr;
+
+       if (msg == NULL || wps_parse_msg(msg, &attr) < 0)
+               return 0;
+       return attr.version2 != NULL;
+}
+
+
 /**
  * wps_build_assoc_req_ie - Build WPS IE for (Re)Association Request
  * @req_type: Value for Request Type attribute