From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Subject: [iptables PATCH 3/3] tests: shell: Test ebtables-restore deleting among matches
Date: Tue, 5 Nov 2024 21:35:43 +0100 [thread overview]
Message-ID: <20241105203543.10545-3-phil@nwl.cc> (raw)
In-Reply-To: <20241105203543.10545-1-phil@nwl.cc>
Rules containing among match would spuriously fail to compare if there
was a previous rule with larger among match payload.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
.../ebtables/0012-restore-delete-among_0 | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100755 iptables/tests/shell/testcases/ebtables/0012-restore-delete-among_0
diff --git a/iptables/tests/shell/testcases/ebtables/0012-restore-delete-among_0 b/iptables/tests/shell/testcases/ebtables/0012-restore-delete-among_0
new file mode 100755
index 0000000000000..165745e169f89
--- /dev/null
+++ b/iptables/tests/shell/testcases/ebtables/0012-restore-delete-among_0
@@ -0,0 +1,18 @@
+#!/bin/bash -e
+
+case "$XT_MULTI" in
+*xtables-nft-multi)
+ ;;
+*)
+ echo "skip $XT_MULTI"
+ exit 0
+ ;;
+esac
+
+RULESET='*filter
+-A FORWARD --among-dst de:ad:0:be:ee:ff,c0:ff:ee:0:ba:be
+-A FORWARD --among-dst de:ad:0:be:ee:ff'
+
+$XT_MULTI ebtables-restore <<< "$RULESET"
+echo "$RULESET" | sed -e 's/-A/-D/' | $XT_MULTI ebtables-restore --noflush
+
--
2.47.0
next prev parent reply other threads:[~2024-11-05 20:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 20:35 [iptables PATCH 1/3] ebtables: Clone extensions before modifying them Phil Sutter
2024-11-05 20:35 ` [iptables PATCH 2/3] ebtables: Simplify ebt_add_{match,watcher} Phil Sutter
2024-11-05 20:35 ` Phil Sutter [this message]
2024-11-05 22:03 ` [iptables PATCH 1/3] ebtables: Clone extensions before modifying them Florian Westphal
2024-11-05 23:03 ` 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=20241105203543.10545-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