mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
hostapd: Do not update invalid wep_key_len_unicast
Previously, the update command was rejected, but the configuration parameter value was updated anyway. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f78402acea
commit
a5861afcbd
@ -2304,14 +2304,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
|||||||
}
|
}
|
||||||
bss->default_wep_key_len = val;
|
bss->default_wep_key_len = val;
|
||||||
} else if (os_strcmp(buf, "wep_key_len_unicast") == 0) {
|
} else if (os_strcmp(buf, "wep_key_len_unicast") == 0) {
|
||||||
bss->individual_wep_key_len = atoi(pos);
|
int val = atoi(pos);
|
||||||
if (bss->individual_wep_key_len < 0 ||
|
|
||||||
bss->individual_wep_key_len > 13) {
|
if (val < 0 || val > 13) {
|
||||||
wpa_printf(MSG_ERROR, "Line %d: invalid WEP key len %d (= %d bits)",
|
wpa_printf(MSG_ERROR,
|
||||||
line, bss->individual_wep_key_len,
|
"Line %d: invalid WEP key len %d (= %d bits)",
|
||||||
bss->individual_wep_key_len * 8);
|
line, val, val * 8);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
bss->individual_wep_key_len = val;
|
||||||
} else if (os_strcmp(buf, "wep_rekey_period") == 0) {
|
} else if (os_strcmp(buf, "wep_rekey_period") == 0) {
|
||||||
bss->wep_rekeying_period = atoi(pos);
|
bss->wep_rekeying_period = atoi(pos);
|
||||||
if (bss->wep_rekeying_period < 0) {
|
if (bss->wep_rekeying_period < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user