path: root/extensions
diff options
authorFlorian Westphal <>2018-11-02 16:24:24 +0100
committerFlorian Westphal <>2018-11-03 20:35:22 +0100
commitcd90cef0c18a996f499c9e31fff7ee0554fe39f9 (patch)
tree225135e843d91e321e5de74af0c97e4765204188 /extensions
parentfd95f1f0223f8e2ecf91aa8d1a4ba84576861082 (diff)
ebtables: relax -t table restriction, add snat/dnat test cases
Its artificial and prevents test cases that need to add rules to a different table from working. The test script generates: -A PREROUTING -t nat ... which works fine for iptables and ip6tables. Just accept it for ebtables too and add test cases for snat and dnat. Signed-off-by: Florian Westphal <>
Diffstat (limited to 'extensions')
2 files changed, 9 insertions, 0 deletions
diff --git a/extensions/libebt_dnat.t b/extensions/libebt_dnat.t
new file mode 100644
index 00000000..42f9bff2
--- /dev/null
+++ b/extensions/libebt_dnat.t
@@ -0,0 +1,5 @@
+-i someport -j dnat --to-dst de:ad:0:be:ee:ff;-i someport -j dnat --to-dst de:ad:0:be:ee:ff --dnat-target ACCEPT;OK
+-j dnat --to-dst de:ad:0:be:ee:ff --dnat-target ACCEPT;=;OK
+-j dnat --to-dst de:ad:0:be:ee:ff --dnat-target CONTINUE;=;OK
diff --git a/extensions/libebt_snat.t b/extensions/libebt_snat.t
new file mode 100644
index 00000000..bb42e758
--- /dev/null
+++ b/extensions/libebt_snat.t
@@ -0,0 +1,4 @@
+-o someport -j snat --to-source a:b:c:d:e:f;-o someport -j snat --to-src a:b:c:d:e:f --snat-target ACCEPT;OK
+-o someport+ -j snat --to-src de:ad:0:be:ee:ff --snat-target CONTINUE;=;OK