Blame SOURCES/firewalld-0.7-0031-tests-firewall-cmd-remove-redundant-checks-for-TESTI.patch

21c891
From c2803dba3beb1cfd8f0d19f6eb622c55977e77cb Mon Sep 17 00:00:00 2001
21c891
From: Eric Garver <e@erig.me>
21c891
Date: Wed, 5 Dec 2018 09:38:26 -0500
21c891
Subject: [PATCH 31/34] tests/firewall-cmd: remove redundant checks for
21c891
 TESTING_FIREWALL_OFFLINE_CMD
21c891
21c891
These checks are now part of the list macros.
21c891
21c891
(cherry picked from commit 158e5db21e99c48bdd4992de46cc92162d3ba626)
21c891
---
21c891
 src/tests/firewall-cmd.at | 50 ++++++++++++++++-----------------------
21c891
 1 file changed, 21 insertions(+), 29 deletions(-)
21c891
21c891
diff --git a/src/tests/firewall-cmd.at b/src/tests/firewall-cmd.at
21c891
index 82ffa9f52b47..3cb3e8a96ca7 100644
21c891
--- a/src/tests/firewall-cmd.at
21c891
+++ b/src/tests/firewall-cmd.at
21c891
@@ -731,36 +731,30 @@ FWD_START_TEST([direct ebtables])
21c891
     FWD_CHECK([--direct --get-chains eb filter | grep mychain], 0, ignore)
21c891
     FWD_CHECK([--direct --add-rule eb filter mychain 1 -p 0x86dd -j DROP], 0, ignore)
21c891
     FWD_CHECK([--direct --add-rule eb filter mychain 999 -p IPv6 --ip6-protocol UDP --ip6-source-port ! 12345 -j DROP], 0, ignore)
21c891
-m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [
21c891
     EBTABLES_LIST_RULES([filter], [mychain], 0, [dnl
21c891
--p IPv6 -j DROP
21c891
--p IPv6 --ip6-proto udp --ip6-sport ! 12345 -j DROP
21c891
--j RETURN
21c891
-])
21c891
-])
21c891
+        -p IPv6 -j DROP
21c891
+        -p IPv6 --ip6-proto udp --ip6-sport ! 12345 -j DROP
21c891
+        -j RETURN
21c891
+    ])
21c891
     FWD_CHECK([--direct --remove-rule eb filter mychain 1 -p 0x86dd -j DROP], 0, ignore)
21c891
-m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [
21c891
     EBTABLES_LIST_RULES([filter], [mychain], 0, [dnl
21c891
--p IPv6 --ip6-proto udp --ip6-sport ! 12345 -j DROP
21c891
--j RETURN
21c891
-])
21c891
-])
21c891
+        -p IPv6 --ip6-proto udp --ip6-sport ! 12345 -j DROP
21c891
+        -j RETURN
21c891
+    ])
21c891
 
21c891
     FWD_CHECK([--direct --add-rule eb filter INPUT 1 -p 0x86dd -j DROP], 0, ignore)
21c891
     FWD_CHECK([--direct --add-rule eb filter INPUT_direct 1 -p 0x86dd -j DROP], 0, ignore)
21c891
-m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [dnl
21c891
-m4_if(nftables, FIREWALL_BACKEND, [dnl
21c891
-    EBTABLES_LIST_RULES([filter], [INPUT], 0, [dnl
21c891
--p IPv6 -j DROP
21c891
--p IPv6 -j DROP
21c891
-])], [dnl
21c891
-    EBTABLES_LIST_RULES([filter], [INPUT_direct], 0, [dnl
21c891
--p IPv6 -j DROP
21c891
--p IPv6 -j DROP
21c891
--j RETURN
21c891
-])
21c891
-])
21c891
-])
21c891
+    m4_if(nftables, FIREWALL_BACKEND, [dnl
21c891
+        EBTABLES_LIST_RULES([filter], [INPUT], 0, [dnl
21c891
+            -p IPv6 -j DROP
21c891
+            -p IPv6 -j DROP
21c891
+        ])], [dnl
21c891
+        EBTABLES_LIST_RULES([filter], [INPUT_direct], 0, [dnl
21c891
+            -p IPv6 -j DROP
21c891
+            -p IPv6 -j DROP
21c891
+            -j RETURN
21c891
+        ])
21c891
+    ])
21c891
 
21c891
     FWD_CHECK([--direct --remove-rules eb filter INPUT], 0, ignore)
21c891
     FWD_CHECK([--direct --remove-rules eb filter mychain], 0, ignore)
21c891
@@ -769,12 +763,10 @@ m4_if(nftables, FIREWALL_BACKEND, [dnl
21c891
     FWD_CHECK([--permanent --direct --get-chains eb filter | grep mychain], 0, ignore)
21c891
     FWD_CHECK([--permanent --direct --add-rule eb filter mychain 1 -p 0x86dd -j DROP], 0, ignore)
21c891
     FWD_RELOAD
21c891
-m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [
21c891
     EBTABLES_LIST_RULES([filter], [mychain], 0, [dnl
21c891
--p IPv6 -j DROP
21c891
--j RETURN
21c891
-])
21c891
-])
21c891
+        -p IPv6 -j DROP
21c891
+        -j RETURN
21c891
+    ])
21c891
 FWD_END_TEST
21c891
 
21c891
 FWD_START_TEST([lockdown])
21c891
-- 
21c891
2.18.0
21c891