From: Pablo Neira Ayuso Date: Wed, 10 Oct 2018 13:10:16 +0000 (+0200) Subject: src: remove netlink_flush_chain() X-Git-Tag: v0.9.1~239 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=738ec4f4f97480526e7b782b46e47cbaef9618d6;p=thirdparty%2Fnftables.git src: remove netlink_flush_chain() Signed-off-by: Pablo Neira Ayuso --- diff --git a/include/netlink.h b/include/netlink.h index e27d75ea..b7e2232f 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -108,7 +108,6 @@ extern struct rule *netlink_delinearize_rule(struct netlink_ctx *ctx, struct nftnl_rule *r); extern int netlink_list_chains(struct netlink_ctx *ctx, const struct handle *h); -extern int netlink_flush_chain(struct netlink_ctx *ctx, const struct cmd *cmd); extern struct chain *netlink_delinearize_chain(struct netlink_ctx *ctx, const struct nftnl_chain *nlc); diff --git a/src/netlink.c b/src/netlink.c index 60635054..b7638815 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -535,11 +535,6 @@ int netlink_list_chains(struct netlink_ctx *ctx, const struct handle *h) return 0; } -int netlink_flush_chain(struct netlink_ctx *ctx, const struct cmd *cmd) -{ - return mnl_nft_rule_del(ctx, cmd); -} - struct table *netlink_delinearize_table(struct netlink_ctx *ctx, const struct nftnl_table *nlt) { diff --git a/src/rule.c b/src/rule.c index 34ce7693..14a61a04 100644 --- a/src/rule.c +++ b/src/rule.c @@ -2259,9 +2259,8 @@ static int do_command_flush(struct netlink_ctx *ctx, struct cmd *cmd) { switch (cmd->obj) { case CMD_OBJ_TABLE: - return mnl_nft_rule_del(ctx, cmd); case CMD_OBJ_CHAIN: - return netlink_flush_chain(ctx, cmd); + return mnl_nft_rule_del(ctx, cmd); case CMD_OBJ_SET: case CMD_OBJ_MAP: case CMD_OBJ_METER: