WPS: Set Request Type properly into WPS IE in ProbeReq/AssocReq
This commit is contained in:
parent
b8a8c299c8
commit
b01c18a8ef
6 changed files with 26 additions and 15 deletions
|
@ -174,7 +174,7 @@ const u8 * wps_get_uuid_e(const u8 *buf, size_t len)
|
|||
}
|
||||
|
||||
|
||||
struct wpabuf * wps_build_assoc_req_ie(void)
|
||||
struct wpabuf * wps_build_assoc_req_ie(u8 req_type)
|
||||
{
|
||||
struct wpabuf *ie;
|
||||
u8 *len;
|
||||
|
@ -190,7 +190,7 @@ struct wpabuf * wps_build_assoc_req_ie(void)
|
|||
wpabuf_put_be32(ie, WPS_DEV_OUI_WFA);
|
||||
|
||||
if (wps_build_version(ie) ||
|
||||
wps_build_req_type(ie, WPS_REQ_ENROLLEE)) {
|
||||
wps_build_req_type(ie, req_type)) {
|
||||
wpabuf_free(ie);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ struct wpabuf * wps_build_assoc_req_ie(void)
|
|||
|
||||
|
||||
struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev,
|
||||
const u8 *uuid)
|
||||
const u8 *uuid, u8 req_type)
|
||||
{
|
||||
struct wpabuf *ie;
|
||||
u8 *len;
|
||||
|
@ -225,7 +225,7 @@ struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev,
|
|||
WPS_CONFIG_KEYPAD;
|
||||
|
||||
if (wps_build_version(ie) ||
|
||||
wps_build_req_type(ie, WPS_REQ_ENROLLEE) ||
|
||||
wps_build_req_type(ie, req_type) ||
|
||||
wps_build_config_methods(ie, methods) ||
|
||||
wps_build_uuid_e(ie, uuid) ||
|
||||
wps_build_primary_dev_type(dev, ie) ||
|
||||
|
|
|
@ -79,9 +79,9 @@ struct wpabuf * wps_get_msg(struct wps_data *wps, u8 *op_code);
|
|||
int wps_is_selected_pbc_registrar(const u8 *buf, size_t len);
|
||||
int wps_is_selected_pin_registrar(const u8 *buf, size_t len);
|
||||
const u8 * wps_get_uuid_e(const u8 *buf, size_t len);
|
||||
struct wpabuf * wps_build_assoc_req_ie(void);
|
||||
struct wpabuf * wps_build_assoc_req_ie(u8 req_type);
|
||||
struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev,
|
||||
const u8 *uuid);
|
||||
const u8 *uuid, u8 req_type);
|
||||
|
||||
|
||||
struct wps_registrar_config {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue