Commit 14abfa161d256c60f3ea6ba494704ac634b94f63

Authored by Eric Leblond
Committed by Pablo Neira Ayuso
1 parent dcd93ed4cd

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>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

net/netfilter/xt_CT.c
... ... @@ -211,8 +211,10 @@
211 211 ret = 0;
212 212 if ((info->ct_events || info->exp_events) &&
213 213 !nf_ct_ecache_ext_add(ct, info->ct_events, info->exp_events,
214   - GFP_KERNEL))
  214 + GFP_KERNEL)) {
  215 + ret = -EINVAL;
215 216 goto err3;
  217 + }
216 218  
217 219 if (info->helper[0]) {
218 220 ret = xt_ct_set_helper(ct, info->helper, par);