render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
7548c0
From 3a0200ee7544307a9708a6e876603425647bad34 Mon Sep 17 00:00:00 2001
7548c0
Message-Id: <3a0200ee7544307a9708a6e876603425647bad34@dist-git>
7548c0
From: Laine Stump <laine@redhat.com>
7548c0
Date: Fri, 15 Jan 2021 22:51:48 -0500
7548c0
Subject: [PATCH] network: be more verbose about the reason for a firewall
7548c0
 reload
7548c0
7548c0
https://bugzilla.redhat.com/1607929
7548c0
7548c0
Signed-off-by: Laine Stump <laine@redhat.com>
7548c0
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
7548c0
(cherry picked from commit c102bbd3efc358fb44fa2bb37fb0bcbeaaab72a5)
7548c0
7548c0
Conflicts: src/network/bridge_driver.c:
7548c0
    some minor things due to upstream switch to using glib for DBus
7548c0
Signed-off-by: Laine Stump <laine@redhat.com>
7548c0
Message-Id: <20210116035151.1066734-6-laine@redhat.com>
7548c0
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
7548c0
---
7548c0
 src/network/bridge_driver.c | 10 ++++++----
7548c0
 1 file changed, 6 insertions(+), 4 deletions(-)
7548c0
7548c0
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
7548c0
index c9c45df758..5995396f78 100644
7548c0
--- a/src/network/bridge_driver.c
7548c0
+++ b/src/network/bridge_driver.c
7548c0
@@ -665,6 +665,7 @@ firewalld_dbus_filter_bridge(DBusConnection *connection G_GNUC_UNUSED,
7548c0
     if (dbus_message_is_signal(message,
7548c0
                                "org.fedoraproject.FirewallD1", "Reloaded")) {
7548c0
         reload = true;
7548c0
+        VIR_DEBUG("Reload in bridge_driver because of 'Reloaded' signal");
7548c0
 
7548c0
     } else if (dbus_message_is_signal(message,
7548c0
                                       DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
7548c0
@@ -681,14 +682,15 @@ firewalld_dbus_filter_bridge(DBusConnection *connection G_GNUC_UNUSED,
7548c0
          * if new_owner is empty, firewalld is shutting down. If it is
7548c0
          * non-empty, then it is starting
7548c0
          */
7548c0
-        if (new_owner && *new_owner)
7548c0
+        if (new_owner && *new_owner) {
7548c0
+            VIR_DEBUG("Reload in bridge_driver because of 'NameOwnerChanged' signal, new owner is: '%s'",
7548c0
+                      new_owner);
7548c0
             reload = true;
7548c0
+        }
7548c0
     }
7548c0
 
7548c0
-    if (reload) {
7548c0
-        VIR_DEBUG("Reload in bridge_driver because of firewalld.");
7548c0
+    if (reload)
7548c0
         networkReloadFirewallRules(driver, false);
7548c0
-    }
7548c0
 
7548c0
     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
7548c0
 }
7548c0
-- 
7548c0
2.30.0
7548c0