From: Arturo Borrero Gonzalez Date: Thu, 27 Jun 2013 17:35:21 +0000 (+0200) Subject: nat: xml: rename node type to nat_type X-Git-Tag: libnftnl-1.0.0~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31e34c3;p=thirdparty%2Flibnftnl.git nat: xml: rename node type to nat_type This patch renames the node to a more explicit . This will prevent in the future from confusing other nodes from other exprs. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/expr/nat.c b/src/expr/nat.c index 89ab080a..506c0b1e 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 . Mandatory */ - node = mxmlFindElement(tree, tree, "type", NULL, NULL, + /* Get and set . 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, "snat"); + ret = snprintf(buf, len, "snat"); else if (nat->type == NFT_NAT_DNAT) - ret = snprintf(buf, len, "dnat"); + ret = snprintf(buf, len, "dnat"); else ret = snprintf(buf, len, "unknown");