aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2005-06-25 16:00:37 (GMT)
committerJouni Malinen <j@w1.fi>2005-06-25 16:00:37 (GMT)
commite4e6a25f944eea5014c5930856847cca671d25be (patch)
tree9020085831357a4043972480767cdb4f859ef30a
parent45ff640254e10e2cb164b040c43f89c7c03009c6 (diff)
downloadhostap-history-e4e6a25f944eea5014c5930856847cca671d25be.zip
hostap-history-e4e6a25f944eea5014c5930856847cca671d25be.tar.gz
hostap-history-e4e6a25f944eea5014c5930856847cca671d25be.tar.bz2
Command line option for disabling the internal EAPOL state machine was
already removed, so no need to maintain disable_eapol parameter in the implementation anymore.
-rw-r--r--wpa_supplicant/wpa_supplicant.c51
1 files changed, 24 insertions, 27 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index c7dff17..c7bce60 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1686,36 +1686,34 @@ static int wpa_supplicant_init(struct wpa_supplicant *wpa_s,
static int wpa_supplicant_init2(struct wpa_supplicant *wpa_s,
- int disable_eapol, int wait_for_interface)
+ int wait_for_interface)
{
const char *ifname;
+ struct eapol_ctx *ctx;
wpa_printf(MSG_DEBUG, "Initializing interface (2) '%s'",
wpa_s->ifname);
- if (!disable_eapol) {
- struct eapol_ctx *ctx;
- ctx = malloc(sizeof(*ctx));
- if (ctx == NULL) {
- printf("Failed to allocate EAPOL context.\n");
- return -1;
- }
- memset(ctx, 0, sizeof(*ctx));
- ctx->ctx = wpa_s;
- ctx->msg_ctx = wpa_s;
- ctx->preauth = 0;
- ctx->eapol_done_cb = wpa_supplicant_notify_eapol_done;
- ctx->eapol_send = wpa_eapol_send;
- ctx->set_wep_key = wpa_eapol_set_wep_key;
- ctx->opensc_engine_path = wpa_s->conf->opensc_engine_path;
- ctx->pkcs11_engine_path = wpa_s->conf->pkcs11_engine_path;
- ctx->pkcs11_module_path = wpa_s->conf->pkcs11_module_path;
- wpa_s->eapol = eapol_sm_init(ctx);
- if (wpa_s->eapol == NULL) {
- free(ctx);
- printf("Failed to initialize EAPOL state machines.\n");
- return -1;
- }
+ ctx = malloc(sizeof(*ctx));
+ if (ctx == NULL) {
+ printf("Failed to allocate EAPOL context.\n");
+ return -1;
+ }
+ memset(ctx, 0, sizeof(*ctx));
+ ctx->ctx = wpa_s;
+ ctx->msg_ctx = wpa_s;
+ ctx->preauth = 0;
+ ctx->eapol_done_cb = wpa_supplicant_notify_eapol_done;
+ ctx->eapol_send = wpa_eapol_send;
+ ctx->set_wep_key = wpa_eapol_set_wep_key;
+ ctx->opensc_engine_path = wpa_s->conf->opensc_engine_path;
+ ctx->pkcs11_engine_path = wpa_s->conf->pkcs11_engine_path;
+ ctx->pkcs11_module_path = wpa_s->conf->pkcs11_module_path;
+ wpa_s->eapol = eapol_sm_init(ctx);
+ if (wpa_s->eapol == NULL) {
+ free(ctx);
+ printf("Failed to initialize EAPOL state machines.\n");
+ return -1;
}
/* RSNA Supplicant Key Management - INITIALIZE */
@@ -1819,7 +1817,7 @@ static void wpa_supplicant_deinit(struct wpa_supplicant *wpa_s)
struct wpa_params {
- int daemonize, wait_for_interface, disable_eapol;
+ int daemonize, wait_for_interface;
int wait_for_monitor;
char *pid_file;
};
@@ -1860,8 +1858,7 @@ static int wpa_supplicant_run(struct wpa_params *params,
}
for (wpa_s = head; wpa_s; wpa_s = wpa_s->next) {
- if (wpa_supplicant_init2(wpa_s, params->disable_eapol,
- params->wait_for_interface)) {
+ if (wpa_supplicant_init2(wpa_s, params->wait_for_interface)) {
exitcode = -1;
goto cleanup;
}