netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: nf_tables: copy and paste bug in nf_tables_getflowtable()
@ 2018-01-10  9:47 Dan Carpenter
  2018-01-10 14:20 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-01-10  9:47 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Jozsef Kadlecsik, Florian Westphal, netfilter-devel, coreteam,
	kernel-janitors

We should be testing "flowtable" instead of "table".

Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
The bug hasn't hit net-next yet, it's still in the netfilter tree.

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 336b81689ac9..40594bb57012 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -5420,7 +5420,7 @@ static int nf_tables_getflowtable(struct net *net, struct sock *nlsk,
 
 	flowtable = nf_tables_flowtable_lookup(table, nla[NFTA_FLOWTABLE_NAME],
 					       genmask);
-	if (IS_ERR(table))
+	if (IS_ERR(flowtable))
 		return PTR_ERR(flowtable);
 
 	skb2 = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] netfilter: nf_tables: copy and paste bug in nf_tables_getflowtable()
  2018-01-10  9:47 [PATCH] netfilter: nf_tables: copy and paste bug in nf_tables_getflowtable() Dan Carpenter
@ 2018-01-10 14:20 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2018-01-10 14:20 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jozsef Kadlecsik, Florian Westphal, netfilter-devel, coreteam,
	kernel-janitors

On Wed, Jan 10, 2018 at 12:47:35PM +0300, Dan Carpenter wrote:
> We should be testing "flowtable" instead of "table".

Your robot was too late, sorry :)

I'm taking the patch from Wei Yongjun.

Thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-10 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10  9:47 [PATCH] netfilter: nf_tables: copy and paste bug in nf_tables_getflowtable() Dan Carpenter
2018-01-10 14:20 ` 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).