58 lines
2.1 KiB
Diff
58 lines
2.1 KiB
Diff
From 5e35e5d183773984bc69ff035e7f0c69cc99b282 Mon Sep 17 00:00:00 2001
|
|
From: Eric Garver <eric@garver.life>
|
|
Date: Mon, 11 May 2020 17:22:39 -0400
|
|
Subject: [PATCH 26/45] test(functions): use IndividualCalls if host doesn't
|
|
support nft rule index
|
|
|
|
(cherry picked from commit 5418d89006665e90f7f742bbdc9a551d9d9a1ca7)
|
|
(cherry picked from commit 4224d86814ac6aa80fbc58c2b6f8e53a89adcaba)
|
|
---
|
|
src/tests/dbus/firewalld.conf.at | 8 +++++++-
|
|
src/tests/functions.at | 4 ++++
|
|
2 files changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/tests/dbus/firewalld.conf.at b/src/tests/dbus/firewalld.conf.at
|
|
index 1c957957b3da..14d87767a267 100644
|
|
--- a/src/tests/dbus/firewalld.conf.at
|
|
+++ b/src/tests/dbus/firewalld.conf.at
|
|
@@ -7,6 +7,12 @@ IF_HOST_SUPPORTS_NFT_FIB([
|
|
EXPECTED_IPV6_RPFILTER_VALUE=no
|
|
])
|
|
|
|
+IF_HOST_SUPPORTS_NFT_RULE_INDEX([
|
|
+ EXPECTED_INDIVIDUAL_CALLS_VALUE=no
|
|
+], [
|
|
+ EXPECTED_INDIVIDUAL_CALLS_VALUE=yes
|
|
+])
|
|
+
|
|
dnl Verify defaults over dbus. Should be inline with default firewalld.conf.
|
|
DBUS_GETALL([config], [config], 0, [dnl
|
|
string "AllowZoneDrifting" : variant string "yes"
|
|
@@ -16,7 +22,7 @@ string "DefaultZone" : variant string "public"
|
|
string "FirewallBackend" : variant string "nftables"
|
|
string "FlushAllOnReload" : variant string "yes"
|
|
string "IPv6_rpfilter" : variant string m4_escape(["${EXPECTED_IPV6_RPFILTER_VALUE}"])
|
|
-string "IndividualCalls" : variant string "no"
|
|
+string "IndividualCalls" : variant string m4_escape(["${EXPECTED_INDIVIDUAL_CALLS_VALUE}"])
|
|
string "Lockdown" : variant string "no"
|
|
string "LogDenied" : variant string "off"
|
|
string "MinimalMark" : variant int32 100
|
|
diff --git a/src/tests/functions.at b/src/tests/functions.at
|
|
index f83720595d2f..1cde4997f920 100644
|
|
--- a/src/tests/functions.at
|
|
+++ b/src/tests/functions.at
|
|
@@ -221,6 +221,10 @@ m4_define([FWD_START_TEST], [
|
|
fi
|
|
echo "kill $DBUS_PID" >> ./cleanup_late
|
|
|
|
+ IF_HOST_SUPPORTS_NFT_RULE_INDEX([], [
|
|
+ AT_CHECK([sed -i 's/^IndividualCalls.*/IndividualCalls=yes/' ./firewalld.conf])
|
|
+ ])
|
|
+
|
|
FWD_START_FIREWALLD
|
|
])
|
|
])
|
|
--
|
|
2.27.0
|
|
|