From c0697eabe832d0aed974e7a72000c58b954dfe71 Mon Sep 17 00:00:00 2001 From: "Pablo M. Bermudo Garay" Date: Wed, 23 Aug 2017 22:42:56 +0200 Subject: src: add stateful object support for limit This patch adds support for a new type of stateful object: limit. Creation, deletion and listing operations are supported. Signed-off-by: Pablo M. Bermudo Garay Signed-off-by: Pablo Neira Ayuso --- src/statement.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/statement.c') diff --git a/src/statement.c b/src/statement.c index 58f8aaf6..0b2c28bc 100644 --- a/src/statement.c +++ b/src/statement.c @@ -175,6 +175,7 @@ static const char *objref_type[NFT_OBJECT_MAX + 1] = { [NFT_OBJECT_COUNTER] = "counter", [NFT_OBJECT_QUOTA] = "quota", [NFT_OBJECT_CT_HELPER] = "cthelper", + [NFT_OBJECT_LIMIT] = "limit", }; static const char *objref_type_name(uint32_t type) @@ -286,7 +287,7 @@ struct stmt *log_stmt_alloc(const struct location *loc) return stmt_alloc(loc, &log_stmt_ops); } -static const char *get_unit(uint64_t u) +const char *get_unit(uint64_t u) { switch (u) { case 1: return "second"; -- cgit v1.2.3