summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-02-13 12:32:58 +0100
committerThomas Haller <thaller@redhat.com>2014-02-13 12:43:44 +0100
commit71cce80f1f54da76766af4105211608bd50ab44d (patch)
tree21ea6ba28b7b71f528af4109f9d613d532d73226
parentc52decbfcb14dbf3fb2357742fb0df3c12486aa7 (diff)
downloadNetworkManager-71cce80f1f54da76766af4105211608bd50ab44d.tar.gz
core: suppress error message ZONE_ALREADY_SET when adding firewalld zone
See also https://bugzilla.redhat.com/show_bug.cgi?id=886432, where firewalld was changed, not to return ZONE_ALREADY_SET for 'changeZone'. However, 'addInterface' can still fail with this error. Suppress the following error lines: <debug> [1392290031.179280] [firewall-manager/nm-firewall-manager.c:117] nm_firewall_manager_add_or_change_zone(): (em1) firewall zone add -> (null) ... <warn> (em1) firewall zone add/change failed: (32) ZONE_ALREADY_SET Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/firewall-manager/nm-firewall-manager.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/firewall-manager/nm-firewall-manager.c b/src/firewall-manager/nm-firewall-manager.c
index d73069fca6..ffe0649a1e 100644
--- a/src/firewall-manager/nm-firewall-manager.c
+++ b/src/firewall-manager/nm-firewall-manager.c
@@ -82,8 +82,13 @@ add_or_change_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data
G_TYPE_STRING, &zone,
G_TYPE_INVALID)) {
g_assert (error);
- nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone add/change failed: (%d) %s",
- info->iface, error->code, error->message);
+ if (g_strcmp0 (error->message, "ZONE_ALREADY_SET") != 0) {
+ nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone add/change failed: (%d) %s",
+ info->iface, error->code, error->message);
+ } else {
+ nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone add/change failed: (%d) %s",
+ info->iface, error->code, error->message);
+ }
}
info->callback (error, info->user_data);
@@ -114,7 +119,8 @@ nm_firewall_manager_add_or_change_zone (NMFirewallManager *self,
info->callback = callback;
info->user_data = user_data;
- nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone %s -> %s", iface, add ? "add" : "change", zone);
+ nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone %s -> %s%s%s", iface, add ? "add" : "change",
+ zone?"\"":"", zone ? zone : "default", zone?"\"":"");
return dbus_g_proxy_begin_call_with_timeout (priv->proxy,
add ? "addInterface" : "changeZone",
add_or_change_cb,