From 87c05d2e112715db3607a80dca21defdf844bb72 Mon Sep 17 00:00:00 2001 From: Eric Garver Date: Thu, 2 May 2019 12:20:57 -0400 Subject: 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 Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- src/parser_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3