From 88e823f8dcb24b5201f2fe4f4d5ec5d277bd24b2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 10 Nov 2014 13:57:54 +0100 Subject: expr: nat: use 'nat_type' instead of 'type' in the parser 'type' is already used from the expression. Signed-off-by: Pablo Neira Ayuso --- src/expr/nat.c | 2 +- tests/xmlfiles/32-rule-nat6.xml | 2 +- tests/xmlfiles/33-rule-nat4.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/expr/nat.c b/src/expr/nat.c index 811286c..60623a6 100644 --- a/src/expr/nat.c +++ b/src/expr/nat.c @@ -284,7 +284,7 @@ static int nft_rule_expr_nat_xml_parse(struct nft_rule_expr *e, mxml_node_t *tre uint32_t reg_addr_min, reg_addr_max; uint32_t reg_proto_min, reg_proto_max; - nat_type = nft_mxml_str_parse(tree, "type", MXML_DESCEND_FIRST, + nat_type = nft_mxml_str_parse(tree, "nat_type", MXML_DESCEND_FIRST, NFT_XML_MAND, err); if (nat_type == NULL) return -1; diff --git a/tests/xmlfiles/32-rule-nat6.xml b/tests/xmlfiles/32-rule-nat6.xml index f96b7d8..8fc52e8 100644 --- a/tests/xmlfiles/32-rule-nat6.xml +++ b/tests/xmlfiles/32-rule-nat6.xml @@ -1 +1 @@ -ip6nat
OUTPUT100snatip61234
+ip6nat
OUTPUT100snatip61234
diff --git a/tests/xmlfiles/33-rule-nat4.xml b/tests/xmlfiles/33-rule-nat4.xml index 233c44e..b7b6cb6 100644 --- a/tests/xmlfiles/33-rule-nat4.xml +++ b/tests/xmlfiles/33-rule-nat4.xml @@ -1 +1 @@ -ipfilter
INPUT100dnatip123412
+ipfilter
INPUT100dnatip123412
-- cgit v1.2.3