forked from rpms/libvirt
111 lines
3.7 KiB
Diff
111 lines
3.7 KiB
Diff
From 5b3cf2163da13ac79129ca2bb85ae1908922644c Mon Sep 17 00:00:00 2001
|
|
Message-Id: <5b3cf2163da13ac79129ca2bb85ae1908922644c@dist-git>
|
|
From: Laine Stump <laine@laine.org>
|
|
Date: Fri, 1 Feb 2019 20:29:27 -0500
|
|
Subject: [PATCH] configure: change HAVE_FIREWALLD to WITH_FIREWALLD
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Support for firewalld is a feature that can be selectively enabled or
|
|
disabled (using --with-firewalld/--without-firewalld), not merely
|
|
something that must be accounted for in the code if it is present with
|
|
no exceptions. It is more consistent with other usage in libvirt to
|
|
use WITH_FIREWALLD rather than HAVE_FIREWALLD.
|
|
|
|
Signed-off-by: Laine Stump <laine@laine.org>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
(cherry picked from commit 4bf0f390ed57307050a213f3f6364061f2717b00)
|
|
|
|
https://bugzilla.redhat.com/1650320
|
|
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
---
|
|
m4/virt-firewalld.m4 | 4 ++--
|
|
src/network/bridge_driver.c | 6 +++---
|
|
src/nwfilter/nwfilter_driver.c | 6 +++---
|
|
3 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/m4/virt-firewalld.m4 b/m4/virt-firewalld.m4
|
|
index 08d2ff83d6..89efa47589 100644
|
|
--- a/m4/virt-firewalld.m4
|
|
+++ b/m4/virt-firewalld.m4
|
|
@@ -32,10 +32,10 @@ AC_DEFUN([LIBVIRT_CHECK_FIREWALLD], [
|
|
if test "x$with_dbus" != "xyes" ; then
|
|
AC_MSG_ERROR([You must have dbus enabled for firewalld support])
|
|
fi
|
|
- AC_DEFINE_UNQUOTED([HAVE_FIREWALLD], [1], [whether firewalld support is enabled])
|
|
+ AC_DEFINE_UNQUOTED([WITH_FIREWALLD], [1], [whether firewalld support is enabled])
|
|
fi
|
|
|
|
- AM_CONDITIONAL([HAVE_FIREWALLD], [test "x$with_firewalld" != "xno"])
|
|
+ AM_CONDITIONAL([WITH_FIREWALLD], [test "x$with_firewalld" != "xno"])
|
|
])
|
|
|
|
AC_DEFUN([LIBVIRT_RESULT_FIREWALLD], [
|
|
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
|
|
index 1ad95d524c..d153a8cdb6 100644
|
|
--- a/src/network/bridge_driver.c
|
|
+++ b/src/network/bridge_driver.c
|
|
@@ -538,7 +538,7 @@ networkAutostartConfig(virNetworkObjPtr obj,
|
|
}
|
|
|
|
|
|
-#if HAVE_FIREWALLD
|
|
+#ifdef WITH_FIREWALLD
|
|
static DBusHandlerResult
|
|
firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
|
|
DBusMessage *message,
|
|
@@ -659,7 +659,7 @@ networkStateInitialize(bool privileged,
|
|
int ret = -1;
|
|
char *configdir = NULL;
|
|
char *rundir = NULL;
|
|
-#ifdef HAVE_FIREWALLD
|
|
+#ifdef WITH_FIREWALLD
|
|
DBusConnection *sysbus = NULL;
|
|
#endif
|
|
|
|
@@ -757,7 +757,7 @@ networkStateInitialize(bool privileged,
|
|
|
|
network_driver->networkEventState = virObjectEventStateNew();
|
|
|
|
-#ifdef HAVE_FIREWALLD
|
|
+#ifdef WITH_FIREWALLD
|
|
if (!(sysbus = virDBusGetSystemBus())) {
|
|
VIR_WARN("DBus not available, disabling firewalld support "
|
|
"in bridge_network_driver: %s", virGetLastErrorMessage());
|
|
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
|
|
index ed34586105..a657b750e6 100644
|
|
--- a/src/nwfilter/nwfilter_driver.c
|
|
+++ b/src/nwfilter/nwfilter_driver.c
|
|
@@ -79,7 +79,7 @@ static void nwfilterDriverUnlock(void)
|
|
virMutexUnlock(&driver->lock);
|
|
}
|
|
|
|
-#if HAVE_FIREWALLD
|
|
+#ifdef WITH_FIREWALLD
|
|
|
|
static DBusHandlerResult
|
|
nwfilterFirewalldDBusFilter(DBusConnection *connection ATTRIBUTE_UNUSED,
|
|
@@ -148,7 +148,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus)
|
|
return ret;
|
|
}
|
|
|
|
-#else /* HAVE_FIREWALLD */
|
|
+#else /* WITH_FIREWALLD */
|
|
|
|
static void
|
|
nwfilterDriverRemoveDBusMatches(void)
|
|
@@ -161,7 +161,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus ATTRIBUTE_UNUSED)
|
|
return 0;
|
|
}
|
|
|
|
-#endif /* HAVE_FIREWALLD */
|
|
+#endif /* WITH_FIREWALLD */
|
|
|
|
static int
|
|
virNWFilterTriggerRebuildImpl(void *opaque)
|
|
--
|
|
2.20.1
|
|
|