summaryrefslogtreecommitdiffstats
path: root/iptables/tests
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2024-11-05 17:17:01 +0100
committerPhil Sutter <phil@nwl.cc>2024-11-05 23:58:03 +0100
commit36d87cd8092edc1f256a0505e260cc8d5ccacb33 (patch)
tree4433aeb042d4a00c46f8c7486b58e595a319eb74 /iptables/tests
parent664cada57d72b64bf3ad2335caaf49cd2d942046 (diff)
tests: shell: Test ebtables-restore deleting among matches
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>
Diffstat (limited to 'iptables/tests')
-rwxr-xr-xiptables/tests/shell/testcases/ebtables/0012-restore-delete-among_018
1 files changed, 18 insertions, 0 deletions
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 00000000..165745e1
--- /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
+