diff options
author | Patrick McHardy <kaber@trash.net> | 2014-01-21 12:39:31 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2014-01-21 12:39:31 +0000 |
commit | 0e9a6ee6aa16d90633acc3cf60836a140f2c5d87 (patch) | |
tree | 3becbe32d7d5b3885b93362d034413c144218252 /include/netlink.h | |
parent | a085d80754af0be8e650724329187aa69e23630d (diff) |
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 <kaber@trash.net>
Diffstat (limited to 'include/netlink.h')
-rw-r--r-- | include/netlink.h | 4 |
1 files changed, 2 insertions, 2 deletions
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, |