]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
nat: xml: rename node type to nat_type
authorArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Thu, 27 Jun 2013 17:35:21 +0000 (19:35 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 27 Jun 2013 17:53:53 +0000 (19:53 +0200)
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>
src/expr/nat.c

index 89ab080ad4e71de2c258e73e0aa9ca07914b81a4..506c0b1e8ccf4f7b69309d1a907040993092a2c2 100644 (file)
@@ -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>");