From 0e52cab1e64ab8dc14d064115adce54fa05174e1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 19 Feb 2020 15:35:10 +0100 Subject: src: improve error reporting when remove rules # nft delete rule ip y z handle 7 Error: Could not process rule: No such file or directory delete rule ip y z handle 7 ^ # nft delete rule ip x z handle 7 Error: Could not process rule: No such file or directory delete rule ip x z handle 7 ^ # nft delete rule ip x x handle 7 Error: Could not process rule: No such file or directory delete rule ip x x handle 7 ^ # nft replace rule x y handle 10 ip saddr 1.1.1.2 counter Error: Could not process rule: No such file or directory replace rule x y handle 10 ip saddr 1.1.1.2 counter ^^ Signed-off-by: Pablo Neira Ayuso --- include/mnl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mnl.h b/include/mnl.h index 6d247cca..74b1b56f 100644 --- a/include/mnl.h +++ b/include/mnl.h @@ -31,8 +31,8 @@ int mnl_batch_talk(struct netlink_ctx *ctx, struct list_head *err_list, int mnl_nft_rule_add(struct netlink_ctx *ctx, struct cmd *cmd, unsigned int flags); -int mnl_nft_rule_del(struct netlink_ctx *ctx, const struct cmd *cmd); -int mnl_nft_rule_replace(struct netlink_ctx *ctx, const struct cmd *cmd); +int mnl_nft_rule_del(struct netlink_ctx *ctx, struct cmd *cmd); +int mnl_nft_rule_replace(struct netlink_ctx *ctx, struct cmd *cmd); struct nftnl_rule_list *mnl_nft_rule_dump(struct netlink_ctx *ctx, int family); -- cgit v1.2.3