expr: remove alignment through XT_ALIGN in match and target
Pablo Neira Ayuso
maintainerPATCH 1/1 expr: remove alignment through XT_ALIGN in match and target
The info area that this gets via the setter should be already aligned. The caller has to care of this.
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- src/expr/match.c | 2 +- src/expr/target.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
src/expr/match.c +1 -1
@@ -124,7 +124,7 @@ nft_rule_expr_match_build(struct nlmsghdr *nlh, struct nft_rule_expr *e)if (e->flags & (1 <<NFT_EXPR_MT_REV ))mnl_attr_put_u32 (nlh,NFTA_MATCH_REV ,htonl (mt->rev));if (e->flags & (1 <<NFT_EXPR_MT_INFO )) -mnl_attr_put (nlh,NFTA_MATCH_INFO ,XT_ALIGN (mt->data_len), mt->data); +mnl_attr_put (nlh,NFTA_MATCH_INFO , mt->data_len, mt->data); }static int nft_rule_expr_match_parse (struct nft_rule_expr *e,struct nlattr *attr)
src/expr/target.c +1 -1
@@ -124,7 +124,7 @@ nft_rule_expr_target_build(struct nlmsghdr *nlh, struct nft_rule_expr *e)if (e->flags & (1 <<NFT_EXPR_TG_REV ))mnl_attr_put_u32 (nlh,NFTA_TARGET_REV ,htonl (tg->rev));if (e->flags & (1 <<NFT_EXPR_TG_INFO )) -mnl_attr_put (nlh,NFTA_TARGET_INFO ,XT_ALIGN (tg->data_len), tg->data); +mnl_attr_put (nlh,NFTA_TARGET_INFO , tg->data_len, tg->data); }static int nft_rule_expr_target_parse (struct nft_rule_expr *e,struct nlattr *attr)
Signature · 1 line
1.7.10.4