diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-10 23:03:26 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-10 23:03:26 -0700 |
commit | d250fe91ae129bff0968e685cc9c466d3a5e3482 (patch) | |
tree | e38b7628a5c6afb80c22341759f392585e558cb1 /net/netfilter/xt_statistic.c | |
parent | 1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (diff) | |
parent | b56f2d55c6c22b0c5774b3b22e336fb6cc5f4094 (diff) | |
download | linux-d250fe91ae129bff0968e685cc9c466d3a5e3482.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'net/netfilter/xt_statistic.c')
-rw-r--r-- | net/netfilter/xt_statistic.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c index 937ce0633e99..5aeca1d023d8 100644 --- a/net/netfilter/xt_statistic.c +++ b/net/netfilter/xt_statistic.c @@ -53,22 +53,20 @@ statistic_mt(const struct sk_buff *skb, const struct xt_match_param *par) return ret; } -static bool statistic_mt_check(const struct xt_mtchk_param *par) +static int statistic_mt_check(const struct xt_mtchk_param *par) { struct xt_statistic_info *info = par->matchinfo; if (info->mode > XT_STATISTIC_MODE_MAX || info->flags & ~XT_STATISTIC_MASK) - return false; + return -EINVAL; info->master = kzalloc(sizeof(*info->master), GFP_KERNEL); - if (info->master == NULL) { - printk(KERN_ERR KBUILD_MODNAME ": Out of memory\n"); - return false; - } + if (info->master == NULL) + return -ENOMEM; info->master->count = info->u.nth.count; - return true; + return 0; } static void statistic_mt_destroy(const struct xt_mtdtor_param *par) |