Patchwork [libnftables] xml: expr: limit: fix wrong assignation when parsing

login
register
mail settings
Submitter Arturo Borrero
Date Aug. 12, 2013, 7:35 a.m.
Message ID <20130812073523.20663.74939.stgit@nfdev.cica.es>
Download mbox | patch
Permalink /patch/266446/
State Accepted
Headers show

Comments

Arturo Borrero - Aug. 12, 2013, 7:35 a.m.
This assignation was wrong.

Introduced at commit e13819c
(src: xml: consolidate common XML code via nft_mxml_num_parse).


Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 0 files changed


--
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
Pablo Neira - Aug. 12, 2013, 9:35 a.m.
On Mon, Aug 12, 2013 at 09:35:23AM +0200, Arturo Borrero Gonzalez wrote:
> This assignation was wrong.
> 
> Introduced at commit e13819c
> (src: xml: consolidate common XML code via nft_mxml_num_parse).

Applied, thanks.
--
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/limit.c b/src/expr/limit.c
index 9f20c38..336bdb0 100644
--- a/src/expr/limit.c
+++ b/src/expr/limit.c
@@ -130,7 +130,7 @@  static int nft_rule_expr_limit_xml_parse(struct nft_rule_expr *e, mxml_node_t *t
 	e->flags |= (1 << NFT_EXPR_LIMIT_RATE);
 
 	if (nft_mxml_num_parse(tree, "depth", MXML_DESCEND_FIRST, BASE_DEC,
-			       &limit->rate, NFT_TYPE_U64) != 0)
+			       &limit->depth, NFT_TYPE_U64) != 0)
 		return -1;
 
 	e->flags |= (1 << NFT_EXPR_LIMIT_DEPTH);