From 8fbf4b86119638702c9508ac562f36a3606772d3 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 28 May 2018 18:50:56 +0200 Subject: objref: Use "ct helper" for NFT_OBJECT_CT_HELPER Change name of NFT_OBJECT_CT_HELPER in objref_type table to "ct helper" for consistency. Note that this is not used in regular nft output since objref_stmt_print() treats this object type separately. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- src/parser_json.c | 2 +- src/statement.c | 2 +- tests/py/ip/objects.t.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser_json.c b/src/parser_json.c index 88a69493..f872977f 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -2109,7 +2109,7 @@ static struct stmt *json_parse_stmt(struct json_ctx *ctx, json_t *root) { "reject", json_parse_reject_stmt }, { "set", json_parse_set_stmt }, { "log", json_parse_log_stmt }, - { "cthelper", json_parse_cthelper_stmt }, + { "ct helper", json_parse_cthelper_stmt }, { "meter", json_parse_meter_stmt }, { "queue", json_parse_queue_stmt }, }; diff --git a/src/statement.c b/src/statement.c index ac151737..ff4c8eb6 100644 --- a/src/statement.c +++ b/src/statement.c @@ -179,7 +179,7 @@ struct stmt *counter_stmt_alloc(const struct location *loc) static const char *objref_type[NFT_OBJECT_MAX + 1] = { [NFT_OBJECT_COUNTER] = "counter", [NFT_OBJECT_QUOTA] = "quota", - [NFT_OBJECT_CT_HELPER] = "cthelper", + [NFT_OBJECT_CT_HELPER] = "ct helper", [NFT_OBJECT_LIMIT] = "limit", }; diff --git a/tests/py/ip/objects.t.json b/tests/py/ip/objects.t.json index c83cc6a4..77c68868 100644 --- a/tests/py/ip/objects.t.json +++ b/tests/py/ip/objects.t.json @@ -101,14 +101,14 @@ # ct helper set "cthelp1" [ { - "cthelper": "cthelp1" + "ct helper": "cthelp1" } ] # ct helper set tcp dport map {21 : "cthelp1", 2121 : "cthelp1" } [ { - "cthelper": { + "ct helper": { "map": { "left": { "payload": { -- cgit v1.2.3