From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Subject: [iptables PATCH 02/13] extensions: libebt_mark: Fix xlate test case
Date: Wed, 23 Nov 2022 17:43:39 +0100 [thread overview]
Message-ID: <20221123164350.10502-3-phil@nwl.cc> (raw)
In-Reply-To: <20221123164350.10502-1-phil@nwl.cc>
The false suffix effectively disabled this test file, but it also has
problems: Apart from brmark_xlate() printing 'meta mark' instead of just
'mark', target is printed in the wrong position (like with any other
target-possessing extension.
Fixes: e67c08880961f ("ebtables-translate: add initial test cases")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
extensions/libebt_mark.txlate | 11 +++++++++++
extensions/libebt_mark.xlate | 11 -----------
2 files changed, 11 insertions(+), 11 deletions(-)
create mode 100644 extensions/libebt_mark.txlate
delete mode 100644 extensions/libebt_mark.xlate
diff --git a/extensions/libebt_mark.txlate b/extensions/libebt_mark.txlate
new file mode 100644
index 0000000000000..7529302d9a444
--- /dev/null
+++ b/extensions/libebt_mark.txlate
@@ -0,0 +1,11 @@
+ebtables-translate -A INPUT --mark-set 42
+nft add rule bridge filter INPUT meta mark set 0x2a accept counter
+
+ebtables-translate -A INPUT --mark-or 42 --mark-target RETURN
+nft add rule bridge filter INPUT meta mark set meta mark or 0x2a return counter
+
+ebtables-translate -A INPUT --mark-and 42 --mark-target ACCEPT
+nft add rule bridge filter INPUT meta mark set meta mark and 0x2a accept counter
+
+ebtables-translate -A INPUT --mark-xor 42 --mark-target DROP
+nft add rule bridge filter INPUT meta mark set meta mark xor 0x2a drop counter
diff --git a/extensions/libebt_mark.xlate b/extensions/libebt_mark.xlate
deleted file mode 100644
index e0982a1e8ebd7..0000000000000
--- a/extensions/libebt_mark.xlate
+++ /dev/null
@@ -1,11 +0,0 @@
-ebtables-translate -A INPUT --mark-set 42
-nft add rule bridge filter INPUT mark set 0x2a counter
-
-ebtables-translate -A INPUT --mark-or 42 --mark-target RETURN
-nft add rule bridge filter INPUT mark set mark or 0x2a counter return
-
-ebtables-translate -A INPUT --mark-and 42 --mark-target ACCEPT
-nft add rule bridge filter INPUT mark set mark and 0x2a counter accept
-
-ebtables-translate -A INPUT --mark-xor 42 --mark-target DROP
-nft add rule bridge filter INPUT mark set mark xor 0x2a counter drop
--
2.38.0
next prev parent reply other threads:[~2022-11-23 16:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 16:43 [iptables PATCH 00/13] Extensions: Review xlate callbacks Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 01/13] extensions: libebt_mark: Fix mark target xlate Phil Sutter
2022-11-23 16:43 ` Phil Sutter [this message]
2022-11-23 16:43 ` [iptables PATCH 03/13] extensions: libebt_redirect: Fix xlate return code Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 04/13] extensions: libipt_ttl: Sanitize xlate callback Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 05/13] extensions: CONNMARK: Fix " Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 06/13] extensions: MARK: Sanitize MARK_xlate() Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 07/13] extensions: TCPMSS: Use xlate callback for IPv6, too Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 08/13] extensions: TOS: Fix v1 xlate callback Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 09/13] extensions: ecn: Sanitize " Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 10/13] extensions: tcp: Translate TCP option match Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 11/13] extensions: libebt_log: Add comment to clarify xlate callback Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 12/13] extensions: frag: " Phil Sutter
2022-11-23 16:43 ` [iptables PATCH 13/13] extensions: ipcomp: " Phil Sutter
2022-11-23 21:26 ` [iptables PATCH 00/13] Extensions: Review xlate callbacks Florian Westphal
2022-11-24 9:24 ` 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=20221123164350.10502-3-phil@nwl.cc \
--to=phil@nwl.cc \
--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).