From 063da5bcaaf58e3ab6b86eacd6a4c958541a97bd Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Mon, 12 Aug 2013 09:35:39 +0200 Subject: nat: xml: fix wrong node name in snprintf This patch renames all nodes to in nat expr. A bug is fixed, since the default option in snprintf was already . This follows the pattern of avoid prefixing XML nodes. Note that this is mostly reverting what was done at: 31e34c3 (nat: xml: rename node type to nat_type). Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- src/expr/nat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/expr/nat.c') diff --git a/src/expr/nat.c b/src/expr/nat.c index c81dc7f..e6866ec 100644 --- a/src/expr/nat.c +++ b/src/expr/nat.c @@ -204,7 +204,7 @@ static int nft_rule_expr_nat_xml_parse(struct nft_rule_expr *e, mxml_node_t *tre int32_t reg; int family, nat_type_value; - nat_type = nft_mxml_str_parse(tree, "nat_type", MXML_DESCEND_FIRST); + nat_type = nft_mxml_str_parse(tree, "type", MXML_DESCEND_FIRST); if (nat_type == NULL) return -1; @@ -306,9 +306,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"); -- cgit v1.2.3