summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>2013-06-27 19:35:21 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-06-27 19:53:53 +0200
commit31e34c36797b1edac7d6c8883161358f890c9581 (patch)
tree4067795d2afba9f76543bb47ca5fc12a45c17e1b
parent354ba1187f757b77aac69efb853fc93591a9510a (diff)
nat: xml: rename node type to nat_type
This patch renames the node <type> to a more explicit <nat_type>. This will prevent in the future from confusing other <type> nodes from other exprs. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/expr/nat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expr/nat.c b/src/expr/nat.c
index 89ab080..506c0b1 100644
--- a/src/expr/nat.c
+++ b/src/expr/nat.c
@@ -229,8 +229,8 @@ static int nft_rule_expr_nat_xml_parse(struct nft_rule_expr *e, char *xml)
return -1;
}
- /* Get and set <type>. Mandatory */
- node = mxmlFindElement(tree, tree, "type", NULL, NULL,
+ /* Get and set <nat_type>. Mandatory */
+ node = mxmlFindElement(tree, tree, "nat_type", NULL, NULL,
MXML_DESCEND_FIRST);
if (node == NULL) {
mxmlDelete(tree);
@@ -336,9 +336,9 @@ nft_rule_expr_nat_snprintf_xml(char *buf, size_t size,
/* Is a mandatory element. Provide a default, even empty */
if (nat->type == NFT_NAT_SNAT)
- ret = snprintf(buf, len, "<type>snat</type>");
+ ret = snprintf(buf, len, "<nat_type>snat</nat_type>");
else if (nat->type == NFT_NAT_DNAT)
- ret = snprintf(buf, len, "<type>dnat</type>");
+ ret = snprintf(buf, len, "<nat_type>dnat</nat_type>");
else
ret = snprintf(buf, len, "<type>unknown</type>");