diff options
author | Eric Leblond <eric@regit.org> | 2014-01-02 10:03:45 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-01-03 23:41:39 +0100 |
commit | 14abfa161d256c60f3ea6ba494704ac634b94f63 (patch) | |
tree | 11662ce50b62a988d41f2100cd4c7fdd5b785141 /net/netfilter | |
parent | dcd93ed4cd1669b2c1510e801fe5f1132390761c (diff) | |
download | linux-14abfa161d256c60f3ea6ba494704ac634b94f63.tar.bz2 |
netfilter: xt_CT: fix error value in xt_ct_tg_check()
If setting event mask fails then we were returning 0 for success.
This patch updates return code to -EINVAL in case of problem.
Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/xt_CT.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index da35ac06a975..5929be622c5c 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c @@ -211,8 +211,10 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par, ret = 0; if ((info->ct_events || info->exp_events) && !nf_ct_ecache_ext_add(ct, info->ct_events, info->exp_events, - GFP_KERNEL)) + GFP_KERNEL)) { + ret = -EINVAL; goto err3; + } if (info->helper[0]) { ret = xt_ct_set_helper(ct, info->helper, par); |