diff options
author | Ana Rey <anarey@gmail.com> | 2013-11-19 18:54:14 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-11-19 21:06:47 +0100 |
commit | e55c7afcf999e51546335f2e2112c044bba690af (patch) | |
tree | adc49883695d7a4af1d50444670129c63a427f8f /src/expr | |
parent | 2b690deea3a9e43f9f73372b3d712f55365c2379 (diff) |
expr: target: fix wrong info length in nft_rule_expr_target_parse
If I run my automatic unit test of libnftable, It shows:
ERROR: Expr NFT_EXPR_TG_INFO size mismatches size a: 32 b: 36
The problem was in nft_rule_expr_target_parse function. With the
attached patch, we use mnl_attr_get_payload_len() in instead of
mnl_attr_get_len().
Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr')
-rw-r--r-- | src/expr/target.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr/target.c b/src/expr/target.c index 20bf2af..23dff3a 100644 --- a/src/expr/target.c +++ b/src/expr/target.c @@ -149,7 +149,7 @@ static int nft_rule_expr_target_parse(struct nft_rule_expr *e, struct nlattr *at } if (tb[NFTA_TARGET_INFO]) { - uint32_t len = mnl_attr_get_len(tb[NFTA_TARGET_INFO]); + uint32_t len = mnl_attr_get_payload_len(tb[NFTA_TARGET_INFO]); void *target_data; if (target->data) |