Skip to contentSkip to conversation

parser_json: default to unspecified l3proto for ct helper/timeout

PATCH Applied Eric Garver 3 participants 3 messages May 2, 2019 – May 3, 2019 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 src/parser_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/parser_json.c +1 -1
index 3fbb4457ddac..3dc3a5c5f93c 100644
@@ -2817,7 +2817,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;
Signature · 1 line
2.20.1
maintainer Applied
#2 lore raw
In reply to Eric Garver
Quoted 2 lines · Eric Garver

As per the man page, if the user does not specify the l3proto it should be derived from the table family.

Applied, thanks.