From adf8c43fe9cf032a1499beca26e548e3a82f8d1c Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Wed, 26 Jun 2013 13:37:14 +0200 Subject: target&match: xml: don't print rev number The node is not printed/parsed anymore. It should not be exported, this is negotiated with the kernel. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- src/expr/match.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/expr/match.c') diff --git a/src/expr/match.c b/src/expr/match.c index 165d24d..7b4377f 100644 --- a/src/expr/match.c +++ b/src/expr/match.c @@ -190,8 +190,6 @@ static int nft_rule_expr_match_xml_parse(struct nft_rule_expr *e, char *xml) struct nft_expr_match *mt = (struct nft_expr_match *)e->data; mxml_node_t *tree = NULL; mxml_node_t *node = NULL; - uint64_t tmp; - char *endptr; /* load the tree */ tree = mxmlLoadString(NULL, xml, MXML_OPAQUE_CALLBACK); @@ -218,19 +216,6 @@ static int nft_rule_expr_match_xml_parse(struct nft_rule_expr *e, char *xml) e->flags |= (1 << NFT_EXPR_MT_NAME); } - /* get and set . Not mandatory */ - node = mxmlFindElement(tree, tree, "rev", NULL, NULL, MXML_DESCEND); - if (node != NULL) { - tmp = strtoull(node->child->value.opaque, &endptr, 10); - if (tmp > UINT32_MAX || tmp < 0 || *endptr) { - mxmlDelete(tree); - return -1; - } - - mt->rev = (uint32_t)tmp; - e->flags |= (1 << NFT_EXPR_MT_REV); - } - /* mt->info is ignored until other solution is reached */ mxmlDelete(tree); @@ -247,8 +232,7 @@ static int nft_rule_expr_match_snprintf_xml(char *buf, size_t len, int ret, size=len; int offset = 0; - ret = snprintf(buf, len, "%s%u", - mt->name, mt->rev); + ret = snprintf(buf, len, "%s", mt->name); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); return offset; -- cgit v1.2.3