aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/eap_peer/eap_wsc.c2
-rw-r--r--src/wps/wps.c10
-rw-r--r--src/wps/wps.h2
-rw-r--r--src/wps/wps_registrar.c1
4 files changed, 5 insertions, 10 deletions
diff --git a/src/eap_peer/eap_wsc.c b/src/eap_peer/eap_wsc.c
index 5521371..680d747 100644
--- a/src/eap_peer/eap_wsc.c
+++ b/src/eap_peer/eap_wsc.c
@@ -162,7 +162,6 @@ static void * eap_wsc_init(struct eap_sm *sm)
cfg.authenticator = 0;
cfg.wps = wps;
cfg.registrar = registrar ? data->wps_ctx->registrar : NULL;
- cfg.enrollee_mac_addr = registrar ? NULL : wps->dev.mac_addr;
phase1 = eap_get_config_phase1(sm);
if (phase1 == NULL) {
@@ -192,7 +191,6 @@ static void * eap_wsc_init(struct eap_sm *sm)
return NULL;
}
- cfg.uuid = registrar ? NULL : wps->uuid;
data->wps = wps_init(&cfg);
if (data->wps == NULL) {
os_free(data);
diff --git a/src/wps/wps.c b/src/wps/wps.c
index c042fca..d1148ac 100644
--- a/src/wps/wps.c
+++ b/src/wps/wps.c
@@ -28,11 +28,11 @@ struct wps_data * wps_init(const struct wps_config *cfg)
data->authenticator = cfg->authenticator;
data->wps = cfg->wps;
data->registrar = cfg->registrar;
- if (cfg->enrollee_mac_addr)
- os_memcpy(data->mac_addr_e, cfg->enrollee_mac_addr, ETH_ALEN);
- if (cfg->uuid) {
- os_memcpy(cfg->registrar ? data->uuid_r : data->uuid_e,
- cfg->uuid, WPS_UUID_LEN);
+ if (cfg->registrar) {
+ os_memcpy(data->uuid_r, cfg->wps->uuid, WPS_UUID_LEN);
+ } else {
+ os_memcpy(data->mac_addr_e, cfg->wps->dev.mac_addr, ETH_ALEN);
+ os_memcpy(data->uuid_e, cfg->wps->uuid, WPS_UUID_LEN);
}
if (cfg->pin) {
data->dev_pw_id = DEV_PW_DEFAULT;
diff --git a/src/wps/wps.h b/src/wps/wps.h
index 7d78a53..0e69814 100644
--- a/src/wps/wps.h
+++ b/src/wps/wps.h
@@ -55,11 +55,9 @@ struct wps_config {
int authenticator;
struct wps_context *wps;
struct wps_registrar *registrar; /* NULL for Enrollee */
- const u8 *enrollee_mac_addr; /* NULL for Registrar */
const u8 *pin; /* Enrollee Device Password (NULL for Registrar or PBC)
*/
size_t pin_len;
- const u8 *uuid; /* 128-bit Enrollee UUID (NULL for Registrar) */
int pbc;
const struct wpabuf *assoc_wps_ie; /* (Re)AssocReq WPS IE (in AP) */
};
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index 4d5e0c3..21d914c 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -980,7 +980,6 @@ static struct wpabuf * wps_build_m2(struct wps_data *wps)
return NULL;
wpa_hexdump(MSG_DEBUG, "WPS: Registrar Nonce",
wps->nonce_r, WPS_NONCE_LEN);
- os_memcpy(wps->uuid_r, wps->wps->uuid, WPS_UUID_LEN);
wpa_hexdump(MSG_DEBUG, "WPS: UUID-R", wps->uuid_r, WPS_UUID_LEN);
wpa_printf(MSG_DEBUG, "WPS: Building Message M2");