netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft 3/3] payload: remove byteorder conversion
Date: Fri,  9 Sep 2016 14:43:16 +0200	[thread overview]
Message-ID: <1473424996-26957-4-git-send-email-fw@strlen.de> (raw)
In-Reply-To: <1473424996-26957-1-git-send-email-fw@strlen.de>

This is what made ether addresses get formatted correctly with
plain payload expression (ether saddr 00:11 ...) when listing
rules.  Not needed anymore since etheraddr_type is now BIG_ENDIAN.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 src/netlink_delinearize.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index cddbfa6..05edb01 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -1161,8 +1161,6 @@ static void payload_match_expand(struct rule_pp_ctx *ctx,
 	list_for_each_entry(left, &list, list) {
 		tmp = constant_expr_splice(right, left->len);
 		expr_set_type(tmp, left->dtype, left->byteorder);
-		if (tmp->byteorder == BYTEORDER_HOST_ENDIAN)
-			mpz_switch_byteorder(tmp->value, tmp->len / BITS_PER_BYTE);
 
 		nexpr = relational_expr_alloc(&expr->location, expr->op,
 					      left, tmp);
-- 
2.7.3


  parent reply	other threads:[~2016-09-09 12:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 12:43 [PATCH nft 0/3] fix ether address formatting Florian Westphal
2016-09-09 12:43 ` [PATCH nft 1/3] datatype: ll: use big endian byte ordering Florian Westphal
2016-09-09 13:33   ` Pablo Neira Ayuso
2016-09-09 12:43 ` [PATCH nft 2/3] tests: catch ordering issue w. ether set Florian Westphal
2016-09-09 13:33   ` Pablo Neira Ayuso
2016-09-09 12:43 ` Florian Westphal [this message]
2016-09-09 13:34   ` [PATCH nft 3/3] payload: remove byteorder conversion Pablo Neira Ayuso

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=1473424996-26957-4-git-send-email-fw@strlen.de \
    --to=fw@strlen.de \
    --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).