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