summaryrefslogtreecommitdiffstats
path: root/src/statement.c
diff options
context:
space:
mode:
authorPablo M. Bermudo Garay <pablombg@gmail.com>2017-08-23 22:42:56 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-09-04 22:29:19 +0200
commitc0697eabe832d0aed974e7a72000c58b954dfe71 (patch)
tree085f3dbb32866ce3c7f8f44a3b6ed8a0d300ee40 /src/statement.c
parent4b8cfe020c9adc71dad857106b915aae01348df4 (diff)
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 <pablombg@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/statement.c')
-rw-r--r--src/statement.c3
1 files changed, 2 insertions, 1 deletions
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";