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 2/3] tests: catch ordering issue w. ether set
Date: Fri,  9 Sep 2016 14:43:15 +0200	[thread overview]
Message-ID: <1473424996-26957-3-git-send-email-fw@strlen.de> (raw)
In-Reply-To: <1473424996-26957-1-git-send-email-fw@strlen.de>

Before previous commit, ether set (payload statement) was reversed on
output:

ether daddr set 00:03:2d:2b:74:ec

would be shown as 'ec:74:2b:2d:03:00'.

With ff:ff:ff ... such bug doesn't appear so use something
where it will show up.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 tests/py/bridge/ether.t         | 2 +-
 tests/py/bridge/ether.t.payload | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/py/bridge/ether.t b/tests/py/bridge/ether.t
index 4a177ab..5c6766e 100644
--- a/tests/py/bridge/ether.t
+++ b/tests/py/bridge/ether.t
@@ -7,4 +7,4 @@ tcp dport 22 ip daddr 1.2.3.4 ether saddr 00:0f:54:0c:11:04;ok;tcp dport 22 ethe
 tcp dport 22 ether saddr 00:0f:54:0c:11:04 ip daddr 1.2.3.4;ok
 ether saddr 00:0f:54:0c:11:04 ip daddr 1.2.3.4 accept;ok
 
-ether daddr 00:01:02:03:04:05 ether saddr set ff:ff:ff:ff:ff:ff drop;ok
+ether daddr 00:01:02:03:04:05 ether saddr set ff:fe:dc:ba:98:76 drop;ok
diff --git a/tests/py/bridge/ether.t.payload b/tests/py/bridge/ether.t.payload
index c545d65..74956b6 100644
--- a/tests/py/bridge/ether.t.payload
+++ b/tests/py/bridge/ether.t.payload
@@ -42,11 +42,11 @@ bridge test-bridge input
   [ cmp eq reg 1 0x04030201 ]
   [ immediate reg 0 accept ]
 
-# ether daddr 00:01:02:03:04:05 ether saddr set ff:ff:ff:ff:ff:ff drop
+# ether daddr 00:01:02:03:04:05 ether saddr set ff:fe:dc:ba:98:76 drop
 bridge test-bridge input
   [ payload load 6b @ link header + 0 => reg 1 ]
   [ cmp eq reg 1 0x03020100 0x00000504 ]
-  [ immediate reg 1 0xffffffff 0x0000ffff ]
+  [ immediate reg 1 0xbadcfeff 0x00007698 ]
   [ payload write reg 1 => 6b @ link header + 6 csum_type 0 csum_off 0 ]
   [ immediate reg 0 drop ]
 
-- 
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 ` Florian Westphal [this message]
2016-09-09 13:33   ` [PATCH nft 2/3] tests: catch ordering issue w. ether set Pablo Neira Ayuso
2016-09-09 12:43 ` [PATCH nft 3/3] payload: remove byteorder conversion Florian Westphal
2016-09-09 13:34   ` 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-3-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).