netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH libnftnl] expr: remove alignment through XT_ALIGN in match and target
Date: Fri, 20 Jun 2014 12:12:22 +0200	[thread overview]
Message-ID: <1403259142-5911-1-git-send-email-pablo@netfilter.org> (raw)

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 <pablo@netfilter.org>
---
 src/expr/match.c  |    2 +-
 src/expr/target.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/expr/match.c b/src/expr/match.c
index a65d3e5..a78bd69 100644
--- a/src/expr/match.c
+++ b/src/expr/match.c
@@ -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)
diff --git a/src/expr/target.c b/src/expr/target.c
index ff0e56f..6a2b405 100644
--- a/src/expr/target.c
+++ b/src/expr/target.c
@@ -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)
-- 
1.7.10.4


                 reply	other threads:[~2014-06-20 10:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403259142-5911-1-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).