aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/config_file.c
diff options
context:
space:
mode:
authorMatthias May <matthias.may@neratec.com>2015-10-26 10:45:21 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-28 18:53:15 (GMT)
commit95be79f1f8fcf70f7dd9b607ac98973d7b78d497 (patch)
tree8dd8cf01f8f1688945dec374168a427f6f995687 /hostapd/config_file.c
parentbc50bb0ada40329fb3c1e606d86bd4b625b689af (diff)
downloadhostap-95be79f1f8fcf70f7dd9b607ac98973d7b78d497.zip
hostap-95be79f1f8fcf70f7dd9b607ac98973d7b78d497.tar.gz
hostap-95be79f1f8fcf70f7dd9b607ac98973d7b78d497.tar.bz2
Allow -1 as value to disable frag_threshold
To be consistent with the internal representation of how to disable framentation, allow -1 as a value to disable it in configuration. Signed-off-by: Matthias May <matthias.may@neratec.com>
Diffstat (limited to 'hostapd/config_file.c')
-rw-r--r--hostapd/config_file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index e11a41d..2ee4620 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2700,8 +2700,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
}
} else if (os_strcmp(buf, "fragm_threshold") == 0) {
conf->fragm_threshold = atoi(pos);
- if (conf->fragm_threshold < 256 ||
- conf->fragm_threshold > 2346) {
+ if (conf->fragm_threshold == -1) {
+ /* allow a value of -1 */
+ } else if (conf->fragm_threshold < 256 ||
+ conf->fragm_threshold > 2346) {
wpa_printf(MSG_ERROR,
"Line %d: invalid fragm_threshold %d",
line, conf->fragm_threshold);