|
|
c8bceb |
From 5d6a4644993589429e39a3f54234dc9fe67e79f2 Mon Sep 17 00:00:00 2001
|
|
|
c8bceb |
From: Eric Garver <eric@garver.life>
|
|
|
c8bceb |
Date: Tue, 27 Aug 2019 12:49:22 -0400
|
|
|
c8bceb |
Subject: [PATCH 94/99] fix: tests/functions: add macro HOST_SUPPORTS_IPV6
|
|
|
c8bceb |
|
|
|
c8bceb |
Check for the ipv6 sysctls to see if IPv6 is available. While nftables
|
|
|
c8bceb |
allows addidng ip6 rules even if ipv6 is disabled, firewalld will also
|
|
|
c8bceb |
try to set some sysctls which fail.
|
|
|
c8bceb |
|
|
|
c8bceb |
(cherry picked from commit f9ede55708e3cb325c1052b7c68f3346c8c8c63f)
|
|
|
c8bceb |
(cherry picked from commit 49d9856b39be6b07aff4dcaa8682752cb8782de4)
|
|
|
c8bceb |
---
|
|
|
c8bceb |
src/tests/functions.at | 8 ++++++++
|
|
|
c8bceb |
1 file changed, 8 insertions(+)
|
|
|
c8bceb |
|
|
|
c8bceb |
diff --git a/src/tests/functions.at b/src/tests/functions.at
|
|
|
c8bceb |
index 571f780a007c..07ad3668ec5f 100644
|
|
|
c8bceb |
--- a/src/tests/functions.at
|
|
|
c8bceb |
+++ b/src/tests/functions.at
|
|
|
c8bceb |
@@ -421,6 +421,14 @@ m4_define([HOST_SUPPORTS_IP6TABLES], m4_esyscmd(
|
|
|
c8bceb |
fi
|
|
|
c8bceb |
))
|
|
|
c8bceb |
|
|
|
c8bceb |
+m4_define([HOST_SUPPORTS_IPV6], m4_esyscmd(
|
|
|
c8bceb |
+ if sysctl -a |grep -F "net.ipv6" >/dev/null 2>&1; then
|
|
|
c8bceb |
+ echo -n "yes"
|
|
|
c8bceb |
+ else
|
|
|
c8bceb |
+ echo -n "no"
|
|
|
c8bceb |
+ fi
|
|
|
c8bceb |
+))
|
|
|
c8bceb |
+
|
|
|
c8bceb |
m4_define([IF_IPV6_SUPPORTED], [
|
|
|
c8bceb |
m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [$1], [
|
|
|
c8bceb |
m4_if(nftables, FIREWALL_BACKEND, [$1], [
|
|
|
c8bceb |
--
|
|
|
c8bceb |
2.20.1
|
|
|
c8bceb |
|