[libvirt] [PATCH 05/14] nwfilter: remove obsolete code related to firewalld

Daniel P. Berrangé posted 14 patches 6 years, 7 months ago
There is a newer version of this series
[libvirt] [PATCH 05/14] nwfilter: remove obsolete code related to firewalld
Posted by Daniel P. Berrangé 6 years, 7 months ago
There is a bunch of left over code in the nwfilter driver related to
monitoring firewalld over dbus, that is no longer used since the
conversion to use virFirewall APIs.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/conf/virnwfilterobj.h      |  1 -
 src/nwfilter/nwfilter_driver.c | 18 ------------------
 src/nwfilter/nwfilter_driver.h |  2 --
 3 files changed, 21 deletions(-)

diff --git a/src/conf/virnwfilterobj.h b/src/conf/virnwfilterobj.h
index 8e79518ed3..433b0402d0 100644
--- a/src/conf/virnwfilterobj.h
+++ b/src/conf/virnwfilterobj.h
@@ -38,7 +38,6 @@ struct _virNWFilterDriverState {
     virNWFilterObjListPtr nwfilters;
 
     char *configDir;
-    bool watchingFirewallD;
 };
 
 virNWFilterDefPtr
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 542de03596..fef3aa272b 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -186,8 +186,6 @@ nwfilterStateInitialize(bool privileged,
     if (virMutexInit(&driver->lock) < 0)
         goto err_free_driverstate;
 
-    /* remember that we are going to use firewalld */
-    driver->watchingFirewallD = (sysbus != NULL);
     driver->privileged = privileged;
     if (!(driver->nwfilters = virNWFilterObjListNew()))
         goto error;
@@ -311,22 +309,6 @@ nwfilterStateReload(void)
 }
 
 
-/**
- * virNWFilterIsWatchingFirewallD:
- *
- * Checks if the nwfilter has the DBus watches for FirewallD installed.
- *
- * Returns true if it is watching firewalld, false otherwise
- */
-bool
-virNWFilterDriverIsWatchingFirewallD(void)
-{
-    if (!driver)
-        return false;
-
-    return driver->watchingFirewallD;
-}
-
 /**
  * nwfilterStateCleanup:
  *
diff --git a/src/nwfilter/nwfilter_driver.h b/src/nwfilter/nwfilter_driver.h
index 06d7572d21..ad56e7bb2f 100644
--- a/src/nwfilter/nwfilter_driver.h
+++ b/src/nwfilter/nwfilter_driver.h
@@ -33,6 +33,4 @@
 
 int nwfilterRegister(void);
 
-bool virNWFilterDriverIsWatchingFirewallD(void);
-
 #endif /* __VIR_NWFILTER_DRIVER_H__ */
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 05/14] nwfilter: remove obsolete code related to firewalld
Posted by Jiri Denemark 6 years, 7 months ago
On Fri, Apr 27, 2018 at 16:25:04 +0100, Daniel P. Berrangé wrote:
> There is a bunch of left over code in the nwfilter driver related to
> monitoring firewalld over dbus, that is no longer used since the
> conversion to use virFirewall APIs.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/conf/virnwfilterobj.h      |  1 -
>  src/nwfilter/nwfilter_driver.c | 18 ------------------
>  src/nwfilter/nwfilter_driver.h |  2 --
>  3 files changed, 21 deletions(-)

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list