diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index 10ae6efeb2..d1bdd806fc 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -54,6 +54,13 @@ static virMutex driverMutex = VIR_MUTEX_INITIALIZER; #ifdef WITH_FIREWALLD +static void nwfilterStateReloadThread(void *opaque G_GNUC_UNUSED) +{ + VIR_INFO("Reloading configuration on firewalld reload/restart"); + + nwfilterStateReload(); +} + static void nwfilterFirewalldDBusSignalCallback(GDBusConnection *connection G_GNUC_UNUSED, const char *senderName G_GNUC_UNUSED, @@ -63,7 +70,15 @@ nwfilterFirewalldDBusSignalCallback(GDBusConnection *connection G_GNUC_UNUSED, GVariant *parameters G_GNUC_UNUSED, gpointer user_data G_GNUC_UNUSED) { - nwfilterStateReload(); + virThread thr; + + if (virThreadCreateFull(&thr, false, nwfilterStateReloadThread, + "firewall-reload", false, NULL) < 0) { + /* + * Not much we can do on error here except log it. + */ + VIR_ERROR(_("Failed to create thread to handle firewall reload/restart")); + } } static unsigned int restartID;