mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 18:00:18 +01:00
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>
This commit is contained in:
parent
c52decbfcb
commit
71cce80f1f
1 changed files with 9 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue