[nft PATCH 4/4] parser_json: Fix parser for list maps command

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

 



Wrong callback in json_parse_cmd_list() for "maps" key.

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

diff --git a/src/parser_json.c b/src/parser_json.c
index 01f340802bec9..5c00c9b003b60 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -3147,7 +3147,7 @@ static struct cmd *json_parse_cmd_list(struct json_ctx *ctx,
 		{ "set", CMD_OBJ_SET, json_parse_cmd_add_set },
 		{ "sets", CMD_OBJ_SETS, json_parse_cmd_list_multiple },
 		{ "map", CMD_OBJ_MAP, json_parse_cmd_add_set },
-		{ "maps", CMD_OBJ_MAPS, json_parse_cmd_add_set },
+		{ "maps", CMD_OBJ_MAPS, json_parse_cmd_list_multiple },
 		{ "counter", CMD_OBJ_COUNTER, json_parse_cmd_add_object },
 		{ "counters", CMD_OBJ_COUNTERS, json_parse_cmd_list_multiple },
 		{ "quota", CMD_OBJ_QUOTA, json_parse_cmd_add_object },
-- 
2.21.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux