aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-05-28 06:59:55 (GMT)
committerJouni Malinen <j@w1.fi>2008-05-28 06:59:55 (GMT)
commit3c724cc564911f9ef217f24dac1fa2b2d8f7d31c (patch)
treee3a0aa17e7179befaa21fb32e487756bea3cdfb2
parent34f564dbd5168626da55a7119b04832e98793160 (diff)
downloadhostap-06-3c724cc564911f9ef217f24dac1fa2b2d8f7d31c.zip
hostap-06-3c724cc564911f9ef217f24dac1fa2b2d8f7d31c.tar.gz
hostap-06-3c724cc564911f9ef217f24dac1fa2b2d8f7d31c.tar.bz2
Do not refer to Flags::Version field as 'PEAP version'
This field is also used for EAP-TTLS and EAP-FAST, so it is clearer to use a more generic term for it.
-rw-r--r--src/eap_server/eap_fast.c2
-rw-r--r--src/eap_server/eap_peap.c2
-rw-r--r--src/eap_server/eap_tls_common.c8
-rw-r--r--src/eap_server/eap_tls_common.h8
-rw-r--r--src/eap_server/eap_ttls.c2
5 files changed, 10 insertions, 12 deletions
diff --git a/src/eap_server/eap_fast.c b/src/eap_server/eap_fast.c
index 6bcfabc..fa3c6e5 100644
--- a/src/eap_server/eap_fast.c
+++ b/src/eap_server/eap_fast.c
@@ -1435,7 +1435,7 @@ static void eap_fast_process(struct eap_sm *sm, void *priv,
"Flags 0x%02x", (unsigned long) wpabuf_len(respData),
flags);
- if (eap_fast_process_version(data, flags & EAP_PEAP_VERSION_MASK))
+ if (eap_fast_process_version(data, flags & EAP_TLS_VERSION_MASK))
return;
ret = eap_server_tls_reassemble(&data->ssl, flags, &pos, &left);
diff --git a/src/eap_server/eap_peap.c b/src/eap_server/eap_peap.c
index 4f0248c..55a580a 100644
--- a/src/eap_server/eap_peap.c
+++ b/src/eap_server/eap_peap.c
@@ -1351,7 +1351,7 @@ static void eap_peap_process(struct eap_sm *sm, void *priv,
wpa_printf(MSG_DEBUG, "EAP-PEAP: Received packet(len=%lu) - "
"Flags 0x%02x", (unsigned long) wpabuf_len(respData),
flags);
- data->recv_version = peer_version = flags & EAP_PEAP_VERSION_MASK;
+ data->recv_version = peer_version = flags & EAP_TLS_VERSION_MASK;
if (data->force_version >= 0 && peer_version != data->force_version) {
wpa_printf(MSG_INFO, "EAP-PEAP: peer did not select the forced"
" version (forced=%d peer=%d) - reject",
diff --git a/src/eap_server/eap_tls_common.c b/src/eap_server/eap_tls_common.c
index 7cd1d03..894b27f 100644
--- a/src/eap_server/eap_tls_common.c
+++ b/src/eap_server/eap_tls_common.c
@@ -107,7 +107,7 @@ fail:
struct wpabuf * eap_server_tls_build_msg(struct eap_ssl_data *data,
- int eap_type, int peap_version, u8 id)
+ int eap_type, int version, u8 id)
{
struct wpabuf *req;
u8 flags;
@@ -115,7 +115,7 @@ struct wpabuf * eap_server_tls_build_msg(struct eap_ssl_data *data,
wpa_printf(MSG_DEBUG, "SSL: Generating Request");
- flags = peap_version;
+ flags = version;
send_len = wpabuf_len(data->out_buf) - data->out_used;
if (1 + send_len > data->tls_out_limit) {
send_len = data->tls_out_limit - 1;
@@ -163,7 +163,7 @@ struct wpabuf * eap_server_tls_build_msg(struct eap_ssl_data *data,
}
-struct wpabuf * eap_server_tls_build_ack(u8 id, int eap_type, int peap_version)
+struct wpabuf * eap_server_tls_build_ack(u8 id, int eap_type, int version)
{
struct wpabuf *req;
@@ -172,7 +172,7 @@ struct wpabuf * eap_server_tls_build_ack(u8 id, int eap_type, int peap_version)
if (req == NULL)
return NULL;
wpa_printf(MSG_DEBUG, "SSL: Building ACK");
- wpabuf_put_u8(req, peap_version); /* Flags */
+ wpabuf_put_u8(req, version); /* Flags */
return req;
}
diff --git a/src/eap_server/eap_tls_common.h b/src/eap_server/eap_tls_common.h
index 4d89f77..424925c 100644
--- a/src/eap_server/eap_tls_common.h
+++ b/src/eap_server/eap_tls_common.h
@@ -36,7 +36,7 @@ struct eap_ssl_data {
#define EAP_TLS_FLAGS_LENGTH_INCLUDED 0x80
#define EAP_TLS_FLAGS_MORE_FRAGMENTS 0x40
#define EAP_TLS_FLAGS_START 0x20
-#define EAP_PEAP_VERSION_MASK 0x07
+#define EAP_TLS_VERSION_MASK 0x07
/* could be up to 128 bytes, but only the first 64 bytes are used */
#define EAP_TLS_KEY_LEN 64
@@ -48,10 +48,8 @@ void eap_server_tls_ssl_deinit(struct eap_sm *sm, struct eap_ssl_data *data);
u8 * eap_server_tls_derive_key(struct eap_sm *sm, struct eap_ssl_data *data,
char *label, size_t len);
struct wpabuf * eap_server_tls_build_msg(struct eap_ssl_data *data,
- int eap_type, int peap_version,
- u8 id);
-struct wpabuf * eap_server_tls_build_ack(u8 id, int eap_type,
- int peap_version);
+ int eap_type, int version, u8 id);
+struct wpabuf * eap_server_tls_build_ack(u8 id, int eap_type, int version);
int eap_server_tls_phase1(struct eap_sm *sm, struct eap_ssl_data *data);
int eap_server_tls_reassemble(struct eap_ssl_data *data, u8 flags,
const u8 **pos, size_t *left);
diff --git a/src/eap_server/eap_ttls.c b/src/eap_server/eap_ttls.c
index dab1b26..3e35a31 100644
--- a/src/eap_server/eap_ttls.c
+++ b/src/eap_server/eap_ttls.c
@@ -1314,7 +1314,7 @@ static void eap_ttls_process(struct eap_sm *sm, void *priv,
"Flags 0x%02x", (unsigned long) wpabuf_len(respData),
flags);
- eap_ttls_process_version(sm, data, flags & EAP_PEAP_VERSION_MASK);
+ eap_ttls_process_version(sm, data, flags & EAP_TLS_VERSION_MASK);
ret = eap_server_tls_reassemble(&data->ssl, flags, &pos, &left);
if (ret < 0) {