From nobody Tue Feb 10 01:58:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1548984316371986.6828152484715; Thu, 31 Jan 2019 17:25:16 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4006F7E446; Fri, 1 Feb 2019 01:25:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A5CFC1048127; Fri, 1 Feb 2019 01:25:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E240B3F7D0; Fri, 1 Feb 2019 01:25:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x111P7iF002408 for ; Thu, 31 Jan 2019 20:25:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 579E619742; Fri, 1 Feb 2019 01:25:07 +0000 (UTC) Received: from vhost2.laine.org (ovpn-117-140.phx2.redhat.com [10.3.117.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB56519741; Fri, 1 Feb 2019 01:25:06 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Thu, 31 Jan 2019 20:24:52 -0500 Message-Id: <20190201012458.25703-2-laine@laine.org> In-Reply-To: <20190201012458.25703-1-laine@laine.org> References: <20190201012458.25703-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Eric Garver Subject: [libvirt] [PATCH v2 1/7] configure: change HAVE_FIREWALLD to WITH_FIREWALLD X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 01 Feb 2019 01:25:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Daniel P. Berrang=C3=A9 --- New patch in V2 (NB, I already pushed patch 1 from V1, as it was ACKed, and not directly related to the rest of the series) 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" !=3D "xyes" ; then AC_MSG_ERROR([You must have dbus enabled for firewalld support]) fi - AC_DEFINE_UNQUOTED([HAVE_FIREWALLD], [1], [whether firewalld support i= s enabled]) + AC_DEFINE_UNQUOTED([WITH_FIREWALLD], [1], [whether firewalld support i= s enabled]) fi =20 - AM_CONDITIONAL([HAVE_FIREWALLD], [test "x$with_firewalld" !=3D "xno"]) + AM_CONDITIONAL([WITH_FIREWALLD], [test "x$with_firewalld" !=3D "xno"]) ]) =20 AC_DEFUN([LIBVIRT_RESULT_FIREWALLD], [ diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 20a0f65e65..238ea2e68e 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -536,7 +536,7 @@ networkAutostartConfig(virNetworkObjPtr obj, } =20 =20 -#if HAVE_FIREWALLD +#ifdef WITH_FIREWALLD static DBusHandlerResult firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED, DBusMessage *message, @@ -571,7 +571,7 @@ networkStateInitialize(bool privileged, int ret =3D -1; char *configdir =3D NULL; char *rundir =3D NULL; -#ifdef HAVE_FIREWALLD +#ifdef WITH_FIREWALLD DBusConnection *sysbus =3D NULL; #endif =20 @@ -662,7 +662,7 @@ networkStateInitialize(bool privileged, =20 network_driver->networkEventState =3D virObjectEventStateNew(); =20 -#ifdef HAVE_FIREWALLD +#ifdef WITH_FIREWALLD if (!(sysbus =3D 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 0e29d3e19e..fdfc6f48fa 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -76,7 +76,7 @@ static void nwfilterDriverUnlock(void) virMutexUnlock(&driver->lock); } =20 -#if HAVE_FIREWALLD +#ifdef WITH_FIREWALLD =20 static DBusHandlerResult nwfilterFirewalldDBusFilter(DBusConnection *connection ATTRIBUTE_UNUSED, @@ -145,7 +145,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus) return ret; } =20 -#else /* HAVE_FIREWALLD */ +#else /* WITH_FIREWALLD */ =20 static void nwfilterDriverRemoveDBusMatches(void) @@ -158,7 +158,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus= ATTRIBUTE_UNUSED) return 0; } =20 -#endif /* HAVE_FIREWALLD */ +#endif /* WITH_FIREWALLD */ =20 static int virNWFilterTriggerRebuildImpl(void *opaque) --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list