From f4befc129827632209779c71d804f6139ac03541 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Fri, 13 Sep 2013 14:05:51 +0200 Subject: src: xml: add parsing optional/mandatory flag Add an optional/mandatory flag to XML parsing. In some elements (ie regs), no flag is used because is always mandatory. DATA_NONE is created to indicate a non-parsed data_reg. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- src/expr/match.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/expr/match.c') diff --git a/src/expr/match.c b/src/expr/match.c index b18d594..9f98462 100644 --- a/src/expr/match.c +++ b/src/expr/match.c @@ -195,7 +195,8 @@ static int nft_rule_expr_match_xml_parse(struct nft_rule_expr *e, mxml_node_t *t struct nft_expr_match *mt = nft_expr_data(e); const char *name; - name = nft_mxml_str_parse(tree, "name", MXML_DESCEND_FIRST); + name = nft_mxml_str_parse(tree, "name", MXML_DESCEND_FIRST, + NFT_XML_MAND); if (name == NULL) return -1; -- cgit v1.2.3