summaryrefslogtreecommitdiff
path: root/net/netfilter/xt_rateest.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-09-16 01:09:02 -0400
committerDavid S. Miller <davem@davemloft.net>2011-09-16 01:09:02 -0400
commit52b9aca7ae8726d1fb41b97dd1d243d107fef11b (patch)
tree7acee111840bd25183513e9bde08e939ffd57be8 /net/netfilter/xt_rateest.c
parent7756332f5b64c9c1535712b9679792e8bd4f0019 (diff)
parente2faeec2de9e2c73958e6ea6065dde1e8cd6f3a2 (diff)
Merge branch 'master' of ../netdev/
Diffstat (limited to 'net/netfilter/xt_rateest.c')
-rw-r--r--net/netfilter/xt_rateest.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/netfilter/xt_rateest.c b/net/netfilter/xt_rateest.c
index 76a083184d8e..ed0db15ab00e 100644
--- a/net/netfilter/xt_rateest.c
+++ b/net/netfilter/xt_rateest.c
@@ -78,7 +78,7 @@ static int xt_rateest_mt_checkentry(const struct xt_mtchk_param *par)
{
struct xt_rateest_match_info *info = par->matchinfo;
struct xt_rateest *est1, *est2;
- int ret = false;
+ int ret = -EINVAL;
if (hweight32(info->flags & (XT_RATEEST_MATCH_ABS |
XT_RATEEST_MATCH_REL)) != 1)
@@ -101,13 +101,12 @@ static int xt_rateest_mt_checkentry(const struct xt_mtchk_param *par)
if (!est1)
goto err1;
+ est2 = NULL;
if (info->flags & XT_RATEEST_MATCH_REL) {
est2 = xt_rateest_lookup(info->name2);
if (!est2)
goto err2;
- } else
- est2 = NULL;
-
+ }
info->est1 = est1;
info->est2 = est2;
@@ -116,7 +115,7 @@ static int xt_rateest_mt_checkentry(const struct xt_mtchk_param *par)
err2:
xt_rateest_put(est1);
err1:
- return -EINVAL;
+ return ret;
}
static void xt_rateest_mt_destroy(const struct xt_mtdtor_param *par)