* [PATCH] netfilter: CT: improve error treatment
@ 2014-01-02 9:03 Eric Leblond
2014-01-03 22:54 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Eric Leblond @ 2014-01-02 9:03 UTC (permalink / raw)
To: -pablo; +Cc: netfilter-devel, Eric Leblond
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>
---
net/netfilter/xt_CT.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index da35ac0..5929be6 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);
--
1.8.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netfilter: CT: improve error treatment
2014-01-02 9:03 [PATCH] netfilter: CT: improve error treatment Eric Leblond
@ 2014-01-03 22:54 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-01-03 22:54 UTC (permalink / raw)
To: Eric Leblond; +Cc: pablo, netfilter-devel
On Thu, Jan 02, 2014 at 10:03:45AM +0100, Eric Leblond wrote:
> If setting event mask fails then we were returning 0 for success.
> This patch updates return code to -EINVAL in case of problem.
Applied to nf-next, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-03 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-02 9:03 [PATCH] netfilter: CT: improve error treatment Eric Leblond
2014-01-03 22:54 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).