diff options
author | Dan Williams <dcbw@redhat.com> | 2014-02-25 13:51:29 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-02-25 17:22:08 -0600 |
commit | 037c67f471cfff92946c86cdefe6c35892d1a9ba (patch) | |
tree | acef64c21367231a4726c360e9ee532def5d8fa9 | |
parent | 37894121605014781810add19169ba8cbbe4394c (diff) | |
download | NetworkManager-037c67f471cfff92946c86cdefe6c35892d1a9ba.tar.gz |
firewall: ignore UNKNOWN_INTERFACE errors
If the firewall didn't know about the interface, don't log errors
about it because there's nothing NM can do. Also, sometimes NM
sends the not-IP interface, like when disconnecting WWAN when the
PPP interface is already gone.
-rw-r--r-- | src/firewall-manager/nm-firewall-manager.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/firewall-manager/nm-firewall-manager.c b/src/firewall-manager/nm-firewall-manager.c index ffe0649a1e..3bf2f241b7 100644 --- a/src/firewall-manager/nm-firewall-manager.c +++ b/src/firewall-manager/nm-firewall-manager.c @@ -143,8 +143,11 @@ remove_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 remove failed: (%d) %s", - info->iface, error->code, error->message); + /* ignore UNKNOWN_INTERFACE errors */ + if (error->message && !strstr (error->message, "UNKNOWN_INTERFACE")) { + nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone remove failed: (%d) %s", + info->iface, error->code, error->message); + } } g_free (zone); |