|
|
c8bceb |
From 2f7cb2d449a85bfb5433e5e44830024c3ee2d862 Mon Sep 17 00:00:00 2001
|
|
|
c8bceb |
From: Eric Garver <eric@garver.life>
|
|
|
c8bceb |
Date: Fri, 26 Jul 2019 08:26:50 -0400
|
|
|
c8bceb |
Subject: [PATCH 71/73] test: coverage for rhbz 1723610 and gh #385
|
|
|
c8bceb |
|
|
|
c8bceb |
(cherry picked from commit 75fc4876dbfbdb1de09a67c48630fa8503ed152d)
|
|
|
c8bceb |
(cherry picked from commit 9657d72ece2631aaab1aa1030658babe77c7f921)
|
|
|
c8bceb |
---
|
|
|
c8bceb |
src/tests/regression.at | 1 +
|
|
|
c8bceb |
src/tests/regression/rhbz1723610.at | 30 +++++++++++++++++++++++++++++
|
|
|
c8bceb |
2 files changed, 31 insertions(+)
|
|
|
c8bceb |
create mode 100644 src/tests/regression/rhbz1723610.at
|
|
|
c8bceb |
|
|
|
c8bceb |
diff --git a/src/tests/regression.at b/src/tests/regression.at
|
|
|
c8bceb |
index 3438c97f4633..919fc32f9bfb 100644
|
|
|
c8bceb |
--- a/src/tests/regression.at
|
|
|
c8bceb |
+++ b/src/tests/regression.at
|
|
|
c8bceb |
@@ -21,3 +21,4 @@ m4_include([regression/gh478.at])
|
|
|
c8bceb |
m4_include([regression/gh453.at])
|
|
|
c8bceb |
m4_include([regression/gh258.at])
|
|
|
c8bceb |
m4_include([regression/rhbz1715977.at])
|
|
|
c8bceb |
+m4_include([regression/rhbz1723610.at])
|
|
|
c8bceb |
diff --git a/src/tests/regression/rhbz1723610.at b/src/tests/regression/rhbz1723610.at
|
|
|
c8bceb |
new file mode 100644
|
|
|
c8bceb |
index 000000000000..f020141e1808
|
|
|
c8bceb |
--- /dev/null
|
|
|
c8bceb |
+++ b/src/tests/regression/rhbz1723610.at
|
|
|
c8bceb |
@@ -0,0 +1,30 @@
|
|
|
c8bceb |
+FWD_START_TEST([direct remove-rules per family])
|
|
|
c8bceb |
+AT_KEYWORDS(direct rhbz1723610 gh385)
|
|
|
c8bceb |
+
|
|
|
c8bceb |
+FWD_CHECK([-q --permanent --direct --add-rule ipv4 filter OUTPUT 0 -d 127.0.0.1 -p tcp --dport 22 -j ACCEPT])
|
|
|
c8bceb |
+FWD_CHECK([--permanent --direct --get-all-rules], 0, [dnl
|
|
|
c8bceb |
+ipv4 filter OUTPUT 0 -d 127.0.0.1 -p tcp --dport 22 -j ACCEPT
|
|
|
c8bceb |
+])
|
|
|
c8bceb |
+FWD_RELOAD
|
|
|
c8bceb |
+FWD_CHECK([--direct --get-all-rules], 0, [dnl
|
|
|
c8bceb |
+ipv4 filter OUTPUT 0 -d 127.0.0.1 -p tcp --dport 22 -j ACCEPT
|
|
|
c8bceb |
+])
|
|
|
c8bceb |
+
|
|
|
c8bceb |
+FWD_CHECK([-q --permanent --direct --remove-rules ipv6 filter input])
|
|
|
c8bceb |
+FWD_CHECK([-q --permanent --direct --remove-rules ipv4 filter INPUT])
|
|
|
c8bceb |
+FWD_CHECK([--permanent --direct --get-all-rules], 0, [dnl
|
|
|
c8bceb |
+ipv4 filter OUTPUT 0 -d 127.0.0.1 -p tcp --dport 22 -j ACCEPT
|
|
|
c8bceb |
+])
|
|
|
c8bceb |
+FWD_RELOAD
|
|
|
c8bceb |
+FWD_CHECK([--direct --get-all-rules], 0, [dnl
|
|
|
c8bceb |
+ipv4 filter OUTPUT 0 -d 127.0.0.1 -p tcp --dport 22 -j ACCEPT
|
|
|
c8bceb |
+])
|
|
|
c8bceb |
+FWD_CHECK([-q --direct --add-rule ipv4 filter INPUT 0 -p tcp --dport 22 -j ACCEPT])
|
|
|
c8bceb |
+FWD_CHECK([-q --direct --add-rule ipv6 filter INPUT 0 -p tcp --dport 22 -j ACCEPT])
|
|
|
c8bceb |
+FWD_CHECK([-q --direct --remove-rules ipv4 filter OUTPUT])
|
|
|
c8bceb |
+FWD_CHECK([--direct --get-all-rules], 0, [dnl
|
|
|
c8bceb |
+ipv4 filter INPUT 0 -p tcp --dport 22 -j ACCEPT
|
|
|
c8bceb |
+ipv6 filter INPUT 0 -p tcp --dport 22 -j ACCEPT
|
|
|
c8bceb |
+])
|
|
|
c8bceb |
+
|
|
|
c8bceb |
+FWD_END_TEST
|
|
|
c8bceb |
--
|
|
|
c8bceb |
2.20.1
|
|
|
c8bceb |
|