Whenever wpa_supplication is using Request Type Enrollee, it is trying
to enroll into a network. Indicate this with the explicit inclusion of
Request to Enroll attribute with value TRUE.
wps_build_config_error(ie, WPS_CFG_NO_ERROR) ||
wps_build_dev_password_id(ie, pbc ? DEV_PW_PUSHBUTTON :
DEV_PW_DEFAULT) ||
- wps_build_version2(ie)) {
+ wps_build_version2(ie) ||
+ (req_type == WPS_REQ_ENROLLEE &&
+ wps_build_req_to_enroll(ie))) {
wpabuf_free(ie);
return NULL;
}
return 0;
}
#endif /* CONFIG_WPS_OOB */
+
+
+int wps_build_req_to_enroll(struct wpabuf *msg)
+{
+ wpa_printf(MSG_DEBUG, "WPS: * Request to Enroll (1)");
+ wpabuf_put_be16(msg, ATTR_REQUEST_TO_ENROLL);
+ wpabuf_put_be16(msg, 1);
+ wpabuf_put_u8(msg, 1);
+ return 0;
+}
int wps_build_conn_type_flags(struct wps_data *wps, struct wpabuf *msg);
int wps_build_assoc_state(struct wps_data *wps, struct wpabuf *msg);
int wps_build_oob_dev_password(struct wpabuf *msg, struct wps_context *wps);
+int wps_build_req_to_enroll(struct wpabuf *msg);
/* wps_attr_process.c */
int wps_process_authenticator(struct wps_data *wps, const u8 *authenticator,