Skip to contentSkip to conversation

netfilter: nf_tables: copy and paste bug in nf_tables_getflowtable()

PATCH In review Dan Carpenter 2 participants 2 messages Jan 10, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: nf_tables: copy and paste bug in nf_tables_getflowtable()

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

Fixes 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend")

---
The bug hasn't hit net-next yet, it's still in the netfilter tree.

net/netfilter/nf_tables_api.c +1 -1
index 336b81689ac9..40594bb57012 100644
@@ -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);
#1 lore raw
Quoted 1 line · Dan Carpenter

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

Your robot was too late, sorry :)

I'm taking the patch from Wei Yongjun.

Thank you.