]> git.ipfire.org Git - thirdparty/nftables.git/commit
mnl: name is ignored when deleting a table
authorFlorian Westphal <fw@strlen.de>
Wed, 16 Jan 2019 12:54:13 +0000 (13:54 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 18 Jan 2019 22:01:20 +0000 (23:01 +0100)
commitf30e5fe55f252558f6b78c436595051b0506b8c6
tree0a4dd6fa91f4e5a549822e8342d9ade42ffb0f33
parentce2651222911f09ca838fbdd29b5b2e0ff5f262f
mnl: name is ignored when deleting a table

nlt is reallocated, leaking first allocation and also removing
the table name/handle that was set on nlt object.

Add a test case for this as well, the batch is supposed to fail
when trying to delete a non-existant table, rather than wiping
all tables in the same address family.

Fixes: 12c362e2214a0 ("mnl: remove alloc_nftnl_table()")
Reported-by: Mikhail Morfikov <mmorfikov@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
src/mnl.c
tests/shell/testcases/transactions/0003table_0