aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-11-29 11:38:03 (GMT)
committerJouni Malinen <j@w1.fi>2008-11-29 11:38:03 (GMT)
commitb01c18a8ef0c26e4390c05defc29123e82ca3b0a (patch)
treee0296d2c2fa5d4e131b47e16a399a4320fefc60a /src/wps
parentb8a8c299c8ec0f24ec387794c104aefbef68caf3 (diff)
downloadhostap-06-b01c18a8ef0c26e4390c05defc29123e82ca3b0a.zip
hostap-06-b01c18a8ef0c26e4390c05defc29123e82ca3b0a.tar.gz
hostap-06-b01c18a8ef0c26e4390c05defc29123e82ca3b0a.tar.bz2
WPS: Set Request Type properly into WPS IE in ProbeReq/AssocReq
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps.c8
-rw-r--r--src/wps/wps.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/wps/wps.c b/src/wps/wps.c
index ec20bb6..44cac3f 100644
--- a/src/wps/wps.c
+++ b/src/wps/wps.c
@@ -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) ||
diff --git a/src/wps/wps.h b/src/wps/wps.h
index 3cd20eb..ca6da58 100644
--- a/src/wps/wps.h
+++ b/src/wps/wps.h
@@ -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 {