summaryrefslogtreecommitdiffstats
path: root/src/table.c
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>2013-08-06 12:52:45 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-08-07 11:54:50 +0200
commitfc7d496788b8abb3f009b73898508032eced0c6c (patch)
tree3943735856ca037e483843f93e4cf595ad68800c /src/table.c
parent7d3c279c62de52f7736d284f6ae0b08e2be09236 (diff)
src: xml: delete unneeded XML prefixes
This patch changes some XML nodes with prefixes, as the example below ilustrates. Before: <rule> <rule_flags/> <rule_family/> <rule> After: <rule> <flags> <family> </rule> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/table.c')
-rw-r--r--src/table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/table.c b/src/table.c
index baad801..85993eb 100644
--- a/src/table.c
+++ b/src/table.c
@@ -249,7 +249,7 @@ static int nft_table_xml_parse(struct nft_table *t, char *xml)
t->family = family;
t->flags |= (1 << NFT_TABLE_ATTR_FAMILY);
- if (nft_mxml_num_parse(tree, "table_flags", MXML_DESCEND, BASE_DEC,
+ if (nft_mxml_num_parse(tree, "flags", MXML_DESCEND, BASE_DEC,
&t->table_flags, NFT_TYPE_U32) != 0)
goto err;
@@ -349,7 +349,7 @@ static int nft_table_snprintf_json(char *buf, size_t size, struct nft_table *t)
static int nft_table_snprintf_xml(char *buf, size_t size, struct nft_table *t)
{
return snprintf(buf, size, "<table><name>%s</name><family>%s</family>"
- "<table_flags>%d</table_flags></table>",
+ "<flags>%d</flags></table>",
t->name, nft_family2str(t->family), t->table_flags);
}