summaryrefslogtreecommitdiffstats
path: root/src/expr/match.c
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>2013-06-26 13:37:14 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-06-27 19:42:33 +0200
commitadf8c43fe9cf032a1499beca26e548e3a82f8d1c (patch)
tree2177657e0c54041876e7bb52c786528e8d2d56a4 /src/expr/match.c
parenta8b06b57a624e70aafff4115a6ab06b9ac047788 (diff)
target&match: xml: don't print rev number
The <rev> node is not printed/parsed anymore. It should not be exported, this is negotiated with the kernel. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/match.c')
-rw-r--r--src/expr/match.c18
1 files changed, 1 insertions, 17 deletions
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 <rev>. 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, "<name>%s</name><rev>%u</rev>",
- mt->name, mt->rev);
+ ret = snprintf(buf, len, "<name>%s</name>", mt->name);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
return offset;