diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-27 23:34:53 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-01-03 14:21:53 +0100 |
commit | 4d38878b39be44ea3d6a146a7dd678c269a9804a (patch) | |
tree | 9eb1a2feeb21d5772c965dd49088a330e19db294 /src/evaluate.c | |
parent | 4756d92e517ae1f7d662c0ed083b54d8dc822e4a (diff) |
src: add/create/delete stateful objects
This patch allows you to add and to delete objects, eg.
# nft add quota filter test 1234567 bytes
# nft list quotas
table ip filter {
quota test {
1234567 bytes
}
}
# nft delete quota filter test
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index b3630c30..9bc3b7d6 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -2758,6 +2758,9 @@ static int cmd_evaluate_add(struct eval_ctx *ctx, struct cmd *cmd) return chain_evaluate(ctx, cmd->chain); case CMD_OBJ_TABLE: return table_evaluate(ctx, cmd->table); + case CMD_OBJ_COUNTER: + case CMD_OBJ_QUOTA: + return 0; default: BUG("invalid command object type %u\n", cmd->obj); } @@ -2778,6 +2781,8 @@ static int cmd_evaluate_delete(struct eval_ctx *ctx, struct cmd *cmd) case CMD_OBJ_RULE: case CMD_OBJ_CHAIN: case CMD_OBJ_TABLE: + case CMD_OBJ_COUNTER: + case CMD_OBJ_QUOTA: return 0; default: BUG("invalid command object type %u\n", cmd->obj); |