From 8bd599c66b05c4b8bba2564b3f4cd77e719a660c Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Thu, 3 Oct 2013 01:08:08 +0200 Subject: netlink: fix nft flush operation nft_netlink function is already calling mnl_batch_end and mnl_batch_begin so it is not necessary to do it in the netlink_flush_rules function. Doing this result in a invalid netlink message which is discarded by the kernel. Signed-off-by: Eric Leblond Signed-off-by: Pablo Neira Ayuso --- src/netlink.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/netlink.c b/src/netlink.c index f75cef76..a62c3572 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -456,10 +456,8 @@ static int netlink_flush_rules(struct netlink_ctx *ctx, const struct handle *h, strerror(errno)); ctx->data = h; - mnl_batch_begin(); nft_rule_list_foreach(rule_cache, flush_rule_cb, ctx); nft_rule_list_free(rule_cache); - mnl_batch_end(); return 0; } -- cgit v1.2.3