summaryrefslogtreecommitdiffstats
path: root/include/netlink.h
diff options
context:
space:
mode:
authorCarlos Falgueras García <carlosfg@riseup.net>2015-10-27 12:58:07 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-11-02 12:51:31 +0100
commit0721fbbe7a951a1e879d120c7a722012c38af9a6 (patch)
treecdd25f3c37b7fbac14d6f172671676c88c66030f /include/netlink.h
parent44d7b90f6e473be3ce4425d41d80df43f319d951 (diff)
src: Add command "replace" for rules
Modify the parser and add necessary functions to provide the command "nft replace rule <ruleid_spec> <new_rule>" Example of use: # nft list ruleset -a table ip filter { chain output { ip daddr 8.8.8.7 counter packets 0 bytes 0 # handle 3 } } # nft replace rule filter output handle 3 ip daddr 8.8.8.8 counter # nft list ruleset -a table ip filter { chain output { ip daddr 8.8.8.8 counter packets 0 bytes 0 # handle 3 } } Signed-off-by: Carlos Falgueras García <carlosfg@riseup.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/netlink.h')
-rw-r--r--include/netlink.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/netlink.h b/include/netlink.h
index 7bf7ea0d..84447422 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -98,6 +98,10 @@ extern int netlink_add_rule_batch(struct netlink_ctx *ctx,
extern int netlink_del_rule_batch(struct netlink_ctx *ctx,
const struct handle *h,
const struct location *loc);
+extern int netlink_replace_rule_batch(struct netlink_ctx *ctx,
+ const struct handle *h,
+ const struct rule *rule,
+ const struct location *loc);
extern int netlink_add_chain(struct netlink_ctx *ctx, const struct handle *h,
const struct location *loc,