From: Jason Ish Date: Mon, 10 Feb 2014 20:47:43 +0000 (-0600) Subject: Promote nodes set with --set to sequence nodes as needed. X-Git-Tag: suricata-2.0rc1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F839%2Fhead;p=thirdparty%2Fsuricata.git Promote nodes set with --set to sequence nodes as needed. A node isn't known to be a sequence node until the YAML is parsed. If a node sequence node was set on the command line, promote it to a sequence node when it is discovered by YAML to be a sequence node. Fixes comment #18 in issue 921. --- diff --git a/src/conf-yaml-loader.c b/src/conf-yaml-loader.c index 500e3de6f4..8e87307943 100644 --- a/src/conf-yaml-loader.c +++ b/src/conf-yaml-loader.c @@ -340,8 +340,8 @@ ConfYamlParse(yaml_parser_t *parser, ConfNode *parent, int inseq) SCFree(seq_node); return -1; } - seq_node->is_seq = 1; } + seq_node->is_seq = 1; TAILQ_INSERT_TAIL(&node->head, seq_node, next); if (ConfYamlParse(parser, seq_node, 0) != 0) goto fail;