summaryrefslogtreecommitdiffstats
path: root/src/expr/nat.c
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2013-08-12 09:35:39 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-08-12 11:32:38 +0200
commit063da5bcaaf58e3ab6b86eacd6a4c958541a97bd (patch)
treef1275f504f58bb1503865343098fdb6fc19a9c32 /src/expr/nat.c
parent75a2b33dfb087f620a4778cb2a99fafa37d2a66e (diff)
nat: xml: fix wrong node name in snprintf
This patch renames all <nat_type> nodes to <type> in nat expr. A bug is fixed, since the default option in snprintf was already <type>. 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 <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/nat.c')
-rw-r--r--src/expr/nat.c6
1 files changed, 3 insertions, 3 deletions
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, "<nat_type>snat</nat_type>");
+ ret = snprintf(buf, len, "<type>snat</type>");
else if (nat->type == NFT_NAT_DNAT)
- ret = snprintf(buf, len, "<nat_type>dnat</nat_type>");
+ ret = snprintf(buf, len, "<type>dnat</type>");
else
ret = snprintf(buf, len, "<type>unknown</type>");