diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 4e9ace1d8..f1e84b7c9 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -2854,14 +2854,15 @@ static int hostapd_config_fill(struct hostapd_config *conf, } bss->dtim_period = val; } else if (os_strcmp(buf, "bss_load_update_period") == 0) { - bss->bss_load_update_period = atoi(pos); - if (bss->bss_load_update_period < 0 || - bss->bss_load_update_period > 100) { + int val = atoi(pos); + + if (val < 0 || val > 100) { wpa_printf(MSG_ERROR, "Line %d: invalid bss_load_update_period %d", - line, bss->bss_load_update_period); + line, val); return 1; } + bss->bss_load_update_period = val; } else if (os_strcmp(buf, "rts_threshold") == 0) { conf->rts_threshold = atoi(pos); if (conf->rts_threshold < -1 || conf->rts_threshold > 65535) { diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index caf2e3295..fa99d3750 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -248,7 +248,7 @@ struct hostapd_bss_config { int max_num_sta; /* maximum number of STAs in station table */ int dtim_period; - int bss_load_update_period; + unsigned int bss_load_update_period; int ieee802_1x; /* use IEEE 802.1X */ int eapol_version;