From 0e9a6ee6aa16d90633acc3cf60836a140f2c5d87 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 21 Jan 2014 12:39:31 +0000 Subject: cmd: add create command for tables and chains We currently always use NLM_F_EXCL for add, which makes adding existing chains or tables fail. There's usually no reason why you would care about this, so change "add" to not use NLM_F_EXCL and add a new "create" command in case you do care. Signed-off-by: Patrick McHardy --- include/netlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/netlink.h') diff --git a/include/netlink.h b/include/netlink.h index fbaaaeba..3f8d465c 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -82,7 +82,7 @@ extern int netlink_del_rule_batch(struct netlink_ctx *ctx, extern int netlink_add_chain(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc, - const struct chain *chain); + const struct chain *chain, bool excl); extern int netlink_rename_chain(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc, const char *name); extern int netlink_delete_chain(struct netlink_ctx *ctx, const struct handle *h, @@ -98,7 +98,7 @@ extern int netlink_flush_chain(struct netlink_ctx *ctx, const struct handle *h, extern int netlink_add_table(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc, - const struct table *table); + const struct table *table, bool excl); extern int netlink_delete_table(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc); extern int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h, -- cgit v1.2.3