Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- include/netlink.h | 1 - src/netlink.c | 5 ----- src/rule.c | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/netlink.h b/include/netlink.h index e27d75ead855..b7e2232f4bd9 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 6063505498df..b7638815a525 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 34ce76932169..14a61a04e940 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: -- 2.11.0