Patchwork [libnftables,21/21] exthdr: xml: rename type node to exthdr_type

login
register
mail settings
Submitter Arturo Borrero
Date June 26, 2013, 11:37 a.m.
Message ID <20130626113721.23511.76762.stgit@nfdev.cica.es>
Download mbox | patch
Permalink /patch/254716/
State Accepted
Headers show

Comments

Arturo Borrero - June 26, 2013, 11:37 a.m.
This patch renames the <type> node in the exthdr expr to <exthdr_type>.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 src/expr/exthdr.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
index 3cccc28..21b1d80 100644
--- a/src/expr/exthdr.c
+++ b/src/expr/exthdr.c
@@ -258,8 +258,9 @@  nft_rule_expr_exthdr_xml_parse(struct nft_rule_expr *e, char *xml)
 	exthdr->dreg = tmp;
 	e->flags |= (1 << NFT_EXPR_EXTHDR_DREG);
 
-	/* Get and set <type> */
-	node = mxmlFindElement(tree, tree, "type", NULL, NULL, MXML_DESCEND);
+	/* Get and set <exthdr_type> */
+	node = mxmlFindElement(tree, tree, "exthdr_type", NULL, NULL,
+			       MXML_DESCEND);
 	if (node == NULL) {
 		mxmlDelete(tree);
 		return -1;
@@ -323,7 +324,8 @@  nft_rule_expr_exthdr_snprintf(char *buf, size_t len, uint32_t type,
 	switch(type) {
 	case NFT_RULE_O_XML:
 		return snprintf(buf, len, "<dreg>%u</dreg>"
-					  "<type>%s</type><offset>%u</offset>"
+					  "<exthdr_type>%s</exthdr_type>"
+					  "<offset>%u</offset>"
 					  "<len>%u</len>",
 					exthdr->dreg,
 					exthdr_type2str(exthdr->type),