Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14abfa16 authored by Eric Leblond's avatar Eric Leblond Committed by Pablo Neira Ayuso
Browse files

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: default avatarEric Leblond <eric@regit.org>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent dcd93ed4
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -211,8 +211,10 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par,
	ret = 0;
	ret = 0;
	if ((info->ct_events || info->exp_events) &&
	if ((info->ct_events || info->exp_events) &&
	    !nf_ct_ecache_ext_add(ct, 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;
		goto err3;
	}


	if (info->helper[0]) {
	if (info->helper[0]) {
		ret = xt_ct_set_helper(ct, info->helper, par);
		ret = xt_ct_set_helper(ct, info->helper, par);