summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-09-17 16:16:22 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-09-17 16:17:59 +0200
commita0274efd21f022d4416da03a5a19be5b61f225c1 (patch)
treef991bbcc881be85a3edf1d76295272c7de0bd1a4 /src/rule.c
parent86ef92a88776bcb8a6d3a403ee2bb0ea2e3eb937 (diff)
src: add nft_*_list_del
This allows us to delete object from the list, note that nft_chain_list_del already existed. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rule.c b/src/rule.c
index 555e724..2e7be6f 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -948,6 +948,12 @@ void nft_rule_list_add_tail(struct nft_rule *r, struct nft_rule_list *list)
}
EXPORT_SYMBOL(nft_rule_list_add_tail);
+void nft_rule_list_del(struct nft_rule *r)
+{
+ list_del(&r->head);
+}
+EXPORT_SYMBOL(nft_rule_list_del);
+
int nft_rule_list_foreach(struct nft_rule_list *rule_list,
int (*cb)(struct nft_rule *r, void *data),
void *data)