aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-11-28 18:44:47 (GMT)
committerJouni Malinen <j@w1.fi>2008-11-28 18:44:47 (GMT)
commit398cfbf6be43a926f72e07099fa15b8e08fb1271 (patch)
tree7e8fa845b5ffa07af28a29c32bb9ed2a1fe3d58e /src/eap_peer
parent116654ce24fea104bd0eeb66499948df4d4df3ce (diff)
downloadhostap-06-398cfbf6be43a926f72e07099fa15b8e08fb1271.zip
hostap-06-398cfbf6be43a926f72e07099fa15b8e08fb1271.tar.gz
hostap-06-398cfbf6be43a926f72e07099fa15b8e08fb1271.tar.bz2
WPS: Moved mac_addr and uuid configuration into wps_context
There is no need to complicate EAPOL and EAP interfaces with WPS specific parameters now that wps_context is passed through.
Diffstat (limited to 'src/eap_peer')
-rw-r--r--src/eap_peer/eap.c4
-rw-r--r--src/eap_peer/eap.h12
-rw-r--r--src/eap_peer/eap_i.h2
-rw-r--r--src/eap_peer/eap_wsc.c7
4 files changed, 2 insertions, 23 deletions
diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c
index 8f84434..88377b9 100644
--- a/src/eap_peer/eap.c
+++ b/src/eap_peer/eap.c
@@ -1178,10 +1178,6 @@ struct eap_sm * eap_peer_sm_init(void *eapol_ctx,
sm->eapol_cb = eapol_cb;
sm->msg_ctx = msg_ctx;
sm->ClientTimeout = 60;
- if (conf->mac_addr)
- os_memcpy(sm->mac_addr, conf->mac_addr, ETH_ALEN);
- if (conf->uuid)
- os_memcpy(sm->uuid, conf->uuid, 16);
sm->wps = conf->wps;
os_memset(&tlsconf, 0, sizeof(tlsconf));
diff --git a/src/eap_peer/eap.h b/src/eap_peer/eap.h
index c434498..d7a5628 100644
--- a/src/eap_peer/eap.h
+++ b/src/eap_peer/eap.h
@@ -246,18 +246,6 @@ struct eap_config {
*/
const char *pkcs11_module_path;
/**
- * mac_addr - MAC address of the peer
- *
- * This is only used by EAP-WSC and can be left %NULL if not available.
- */
- const u8 *mac_addr;
- /**
- * uuid - Device UUID
- *
- * This is only used by EAP-WSC and can be left %NULL if not available.
- */
- const u8 *uuid;
- /**
* wps - WPS context data
*
* This is only used by EAP-WSC and can be left %NULL if not available.
diff --git a/src/eap_peer/eap_i.h b/src/eap_peer/eap_i.h
index 9947276..73f3f83 100644
--- a/src/eap_peer/eap_i.h
+++ b/src/eap_peer/eap_i.h
@@ -333,8 +333,6 @@ struct eap_sm {
int num_rounds;
int force_disabled;
- u8 mac_addr[ETH_ALEN];
- u8 uuid[16];
struct wps_context *wps;
};
diff --git a/src/eap_peer/eap_wsc.c b/src/eap_peer/eap_wsc.c
index d4b0dc3..2cf52f8 100644
--- a/src/eap_peer/eap_wsc.c
+++ b/src/eap_peer/eap_wsc.c
@@ -162,7 +162,7 @@ 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 = sm->mac_addr;
+ cfg.enrollee_mac_addr = registrar ? NULL : wps->dev.mac_addr;
phase1 = eap_get_config_phase1(sm);
if (phase1 == NULL) {
@@ -192,10 +192,7 @@ static void * eap_wsc_init(struct eap_sm *sm)
return NULL;
}
- if (registrar && wps)
- os_memcpy(wps->uuid, sm->uuid, UUID_LEN);
- else
- cfg.uuid = sm->uuid;
+ cfg.uuid = registrar ? NULL : wps->uuid;
data->wps = wps_init(&cfg);
if (data->wps == NULL) {
os_free(data);