render / rpms / libvirt

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