[nft PATCH 5/5] parser_json: Respect base chain priority

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Priority value was parsed but not assigned to allocated chain object.

Fixes: 586ad210368b7 ("libnftables: Implement JSON parser")
Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 src/parser_json.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/parser_json.c b/src/parser_json.c
index c92113ba516c2..7b190bc78103e 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -2395,6 +2395,7 @@ static struct cmd *json_parse_cmd_add_chain(struct json_ctx *ctx, json_t *root,
 	chain = chain_alloc(NULL);
 	chain->flags |= CHAIN_F_BASECHAIN;
 	chain->type = xstrdup(type);
+	chain->priority.num = prio;
 	chain->hookstr = chain_hookname_lookup(hookstr);
 	if (!chain->hookstr) {
 		json_error(ctx, "Invalid chain hook '%s'.", hookstr);
-- 
2.20.1




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux