From: Eric Garver Date: Thu, 2 May 2019 16:20:57 +0000 (-0400) Subject: parser_json: default to unspecified l3proto for ct helper/timeout X-Git-Tag: v0.9.1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87c05d2e112715db3607a80dca21defdf844bb72;p=thirdparty%2Fnftables.git 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 --- 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;