projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7047f9d
)
netfilter: nf_tables: prohibit deletion of a table with existing sets
author
Patrick McHardy
<kaber@trash.net>
Thu, 9 Jan 2014 18:42:41 +0000
(18:42 +0000)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Thu, 9 Jan 2014 19:17:16 +0000
(20:17 +0100)
We currently leak the set memory when deleting a table that still has
sets in it. Return EBUSY when attempting to delete a table with sets.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netfilter/nf_tables_api.c
b/net/netfilter/nf_tables_api.c
index c35261496c30b9e8d8f4c257641d173f58f78a9d..36add31e08e7345d23894004622f59fc618bb058 100644
(file)
--- a/
net/netfilter/nf_tables_api.c
+++ b/
net/netfilter/nf_tables_api.c
@@
-467,7
+467,7
@@
static int nf_tables_deltable(struct sock *nlsk, struct sk_buff *skb,
if (IS_ERR(table))
return PTR_ERR(table);
- if (
table->use
)
+ if (
!list_empty(&table->chains) || !list_empty(&table->sets)
)
return -EBUSY;
list_del(&table->list);