aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-12-27 09:46:04 (GMT)
committerJouni Malinen <j@w1.fi>2016-12-27 09:46:04 (GMT)
commite0ba7efe52ffbd764c15ccd551c8a335cff2684a (patch)
tree5cbcf0b01f5ee3cf0b2bcbc773a9d93865fbf6f7 /hostapd
parent9266d00bf991aa833285ad074d3ce6dc228d8321 (diff)
downloadhostap-e0ba7efe52ffbd764c15ccd551c8a335cff2684a.zip
hostap-e0ba7efe52ffbd764c15ccd551c8a335cff2684a.tar.gz
hostap-e0ba7efe52ffbd764c15ccd551c8a335cff2684a.tar.bz2
hostapd: Do not update eapol_version with rejected value
Previously, an invalid eapol_version update command was rejected, but the actual configuration value was updated. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 6077dc9..34409ae 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2158,13 +2158,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "ieee8021x") == 0) {
bss->ieee802_1x = atoi(pos);
} else if (os_strcmp(buf, "eapol_version") == 0) {
- bss->eapol_version = atoi(pos);
- if (bss->eapol_version < 1 || bss->eapol_version > 2) {
+ int eapol_version = atoi(pos);
+
+ if (eapol_version < 1 || eapol_version > 2) {
wpa_printf(MSG_ERROR,
"Line %d: invalid EAPOL version (%d): '%s'.",
- line, bss->eapol_version, pos);
+ line, eapol_version, pos);
return 1;
}
+ bss->eapol_version = eapol_version;
wpa_printf(MSG_DEBUG, "eapol_version=%d", bss->eapol_version);
#ifdef EAP_SERVER
} else if (os_strcmp(buf, "eap_authenticator") == 0) {