diff options
author | sam <sam@FreeBSD.org> | 2006-03-27 18:15:24 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-03-27 18:15:24 +0000 |
commit | 620bfba12034be7d2ad4a357063d609ff5b6e63a (patch) | |
tree | 95de519733c79dfd4eb1c592409eb069c33e9662 /contrib/hostapd/config.c | |
parent | 8d55057fb42bf9070fd379acbcb6fc4ef793d2a7 (diff) | |
download | FreeBSD-src-620bfba12034be7d2ad4a357063d609ff5b6e63a.zip FreeBSD-src-620bfba12034be7d2ad4a357063d609ff5b6e63a.tar.gz |
Add eapol_version config parameter so folks with clients that (bogusly)
require the authenticator announce EAPOL version 1 don't have to hack
the code to get a working setup.
Discussed with Jouni; he's committed a similar set of changes to
his devel branch and I sent him these changes so I'm committing
this on the vendor branch in the expectation it will appear in
the next import.
MFC after: 1 week
Diffstat (limited to 'contrib/hostapd/config.c')
-rw-r--r-- | contrib/hostapd/config.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/hostapd/config.c b/contrib/hostapd/config.c index 34e2256..016d9b9 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; |