fuzzy: fix bogus comparison logic leftover from move to new 1.4.3 API

This commit is contained in:
Jan Engelhardt
2009-04-05 10:36:16 +02:00
parent c288ecdb9c
commit 4997b326f6
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
- fuzzy: fix bogus comparison logic leftover from move to new 1.4.3 API
Xtables-addons 1.14 (March 31 2009)
===================================
- fuzzy: need to account for kernel-level modified variables in .userspacesize

View File

@@ -58,7 +58,7 @@ static int fuzzy_mt_parse(int c, char **argv, int invert, unsigned int *flags,
xtables_error(PARAMETER_PROBLEM,"Can't specify ! --lower-limit");
if (*flags & IPT_FUZZY_OPT_MINIMUM)
xtables_error(PARAMETER_PROBLEM,"Can't specify --lower-limit twice");
if (!xtables_strtoui(optarg, NULL, &num, 1, FUZZY_MAX_RATE) == -1 || num < 1)
if (!xtables_strtoui(optarg, NULL, &num, 1, FUZZY_MAX_RATE) || num < 1)
xtables_error(PARAMETER_PROBLEM,"BAD --lower-limit");
info->minimum_rate = num;
*flags |= IPT_FUZZY_OPT_MINIMUM;
@@ -69,7 +69,7 @@ static int fuzzy_mt_parse(int c, char **argv, int invert, unsigned int *flags,
xtables_error(PARAMETER_PROBLEM,"Can't specify ! --upper-limit");
if (*flags & IPT_FUZZY_OPT_MAXIMUM)
xtables_error(PARAMETER_PROBLEM,"Can't specify --upper-limit twice");
if (!xtables_strtoui(optarg, NULL, &num, 1, FUZZY_MAX_RATE) == -1 || num < 1)
if (!xtables_strtoui(optarg, NULL, &num, 1, FUZZY_MAX_RATE) || num < 1)
xtables_error(PARAMETER_PROBLEM,"BAD --upper-limit");
info->maximum_rate = num;
*flags |= IPT_FUZZY_OPT_MAXIMUM;