aboutsummaryrefslogtreecommitdiff
path: root/contrib/hostapd/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/hostapd/config.c')
-rw-r--r--contrib/hostapd/config.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/hostapd/config.c b/contrib/hostapd/config.c
index 34e2256aa6b5..016d9b9c959d 100644
--- a/contrib/hostapd/config.c
+++ b/contrib/hostapd/config.c
@@ -29,6 +29,7 @@
#include "sha1.h"
#include "eap.h"
#include "radius_client.h"
+#include "ieee802_1x.h" /* XXX for EAPOL_VERSION */
static struct hostapd_config *hostapd_config_defaults(void)
@@ -60,6 +61,7 @@ static struct hostapd_config *hostapd_config_defaults(void)
conf->logger_stdout = (unsigned int) -1;
conf->auth_algs = HOSTAPD_AUTH_OPEN | HOSTAPD_AUTH_SHARED_KEY;
+ conf->eapol_version = EAPOL_VERSION; /* NB: default version */
conf->wpa_group_rekey = 600;
conf->wpa_gmk_rekey = 86400;
@@ -855,6 +857,17 @@ struct hostapd_config * hostapd_config_read(const char *fname)
}
} else if (strcmp(buf, "eapol_key_index_workaround") == 0) {
conf->eapol_key_index_workaround = atoi(pos);
+ } else if (strcmp(buf, "eapol_version") == 0) {
+ conf->eapol_version = atoi(pos);
+ if (conf->eapol_version < 1 ||
+ conf->eapol_version > 2) {
+ printf("Line %d: invalid EAPOL "
+ "version (%d): '%s'.\n",
+ line, conf->eapol_version, pos);
+ errors++;
+ } else
+ wpa_printf(MSG_DEBUG, "eapol_version=%d",
+ conf->eapol_version);
#ifdef CONFIG_IAPP
} else if (strcmp(buf, "iapp_interface") == 0) {
conf->ieee802_11f = 1;