summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Garver <eric@garver.life>2019-05-02 12:20:57 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2019-05-03 17:33:01 +0200
commit87c05d2e112715db3607a80dca21defdf844bb72 (patch)
tree0a9d1f6290427857b7f6a7958ac3be18b8010913
parent99afd62d48f4c510bdb4076eb9d811c001ad1cac (diff)
parser_json: default to unspecified l3proto for ct helper/timeout
As per the man page, if the user does not specify the l3proto it should be derived from the table family. Fixes: 586ad210368b ("libnftables: Implement JSON parser") Signed-off-by: Eric Garver <eric@garver.life> Acked-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/parser_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index 5c00c9b0..72e712f3 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -2811,7 +2811,7 @@ static struct cmd *json_parse_cmd_add_object(struct json_ctx *ctx,
enum cmd_obj cmd_obj)
{
const char *family, *tmp, *rate_unit = "packets", *burst_unit = "bytes";
- uint32_t l3proto = NFPROTO_IPV4;
+ uint32_t l3proto = NFPROTO_UNSPEC;
struct handle h = { 0 };
struct obj *obj;
int inv = 0;