From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [iptables-nft RFC 5/5] generic.xlate: make one replay test case work
Date: Mon, 21 Nov 2022 12:19:32 +0100 [thread overview]
Message-ID: <20221121111932.18222-6-fw@strlen.de> (raw)
In-Reply-To: <20221121111932.18222-1-fw@strlen.de>
This is just to demonstrate yet another problem.
For the rule itself it doesn't matter if '-i' or '-s' is passed first,
but the test script has no deeper understanding for the rules and will
do a simple textual comparision, this will fail because as-is the output
is different than the input (options are written out in different
order).
We either need to sanoitize the input or update the test script to
split lines and re-order the options or similar.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
extensions/generic.txlate | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extensions/generic.txlate b/extensions/generic.txlate
index 6779d6f86dec..e95432552ef8 100644
--- a/extensions/generic.txlate
+++ b/extensions/generic.txlate
@@ -4,7 +4,7 @@ nft insert rule ip filter OUTPUT ip protocol udp ip daddr 8.8.8.8 counter accept
iptables-translate -F -t nat
nft flush table ip nat
-iptables-translate -I INPUT -i iifname -s 10.0.0.0/8
+iptables-translate -I INPUT -s 10.0.0.0/8 -i iifname
nft insert rule ip filter INPUT iifname "iifname" ip saddr 10.0.0.0/8 counter
iptables-translate -A INPUT -i iif+ ! -d 10.0.0.0/8
--
2.37.4
next prev parent reply other threads:[~2022-11-21 11:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 11:19 [iptables-nft RFC 0/5] update iptables-nft dissector Florian Westphal
2022-11-21 11:19 ` [iptables-nft RFC 1/5] nft-shared: dump errors on stdout to garble output Florian Westphal
2022-11-22 17:55 ` Phil Sutter
2022-11-23 12:50 ` Florian Westphal
2022-11-23 13:13 ` Phil Sutter
2022-11-23 13:27 ` Florian Westphal
2022-11-23 13:34 ` Phil Sutter
2022-11-21 11:19 ` [iptables-nft RFC 2/5] iptables-nft: do not refuse to decode table with unsupported expressions Florian Westphal
2022-11-21 11:19 ` [iptables-nft RFC 3/5] nft: check for unknown meta keys Florian Westphal
2022-11-21 11:19 ` [iptables-nft RFC 4/5] xlate-test: extra-escape of '"' for replay mode Florian Westphal
2022-11-22 15:51 ` Phil Sutter
2022-11-22 16:01 ` Florian Westphal
2022-11-22 16:22 ` Phil Sutter
2022-11-23 9:31 ` Florian Westphal
2022-11-23 9:57 ` Phil Sutter
2022-11-21 11:19 ` Florian Westphal [this message]
2022-11-22 16:16 ` [iptables-nft RFC 5/5] generic.xlate: make one replay test case work Phil Sutter
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=20221121111932.18222-6-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).