summary refs log tree commit diff
path: root/src/firewall-manager
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2014-04-26 20:55:09 +0200
committerSjoerd Simons <sjoerd@luon.net>2014-04-26 20:55:09 +0200
commit59c3714a494c3b3765657c0551ad82842d98a7d2 (patch)
treee4dcdf9791fc40581f02bfaf870c30b102b3133a /src/firewall-manager
parenta4256940da049f91bbbea5e53e469a59ea9c10f7 (diff)
Imported Upstream version 0.9.8.10 upstream/0.9.8.10
Diffstat (limited to 'src/firewall-manager')
-rw-r--r--src/firewall-manager/Makefile.am18
-rw-r--r--src/firewall-manager/Makefile.in18
-rw-r--r--src/firewall-manager/nm-firewall-manager.c19
3 files changed, 31 insertions, 24 deletions
diff --git a/src/firewall-manager/Makefile.am b/src/firewall-manager/Makefile.am
index 2cfe32d0..15bde51a 100644
--- a/src/firewall-manager/Makefile.am
+++ b/src/firewall-manager/Makefile.am
@@ -1,21 +1,19 @@
-INCLUDES = \
-	-I${top_srcdir}/src \
-	-I${top_srcdir}/src/logging \
-	-I${top_srcdir}/include \
-	-I${top_srcdir}/libnm-util
-
 noinst_LTLIBRARIES = libfirewall-manager.la
 
-libfirewall_manager_la_SOURCES = \
-	nm-firewall-manager.h \
-	nm-firewall-manager.c
-
 libfirewall_manager_la_CPPFLAGS = \
+	-I${top_srcdir}/src \
+	-I${top_srcdir}/src/logging \
+	-I${top_srcdir}/include \
+	-I${top_srcdir}/libnm-util \
 	$(DBUS_CFLAGS) \
 	$(GLIB_CFLAGS) \
 	-DNM_PKGDATADIR=\"$(pkgdatadir)\" \
 	-DNM_LOCALSTATEDIR=\"$(localstatedir)\"
 
+libfirewall_manager_la_SOURCES = \
+	nm-firewall-manager.h \
+	nm-firewall-manager.c
+
 libfirewall_manager_la_LIBADD = \
 	$(top_builddir)/src/logging/libnm-logging.la \
 	$(DBUS_LIBS) \
diff --git a/src/firewall-manager/Makefile.in b/src/firewall-manager/Makefile.in
index 6820a3ac..690f0b3d 100644
--- a/src/firewall-manager/Makefile.in
+++ b/src/firewall-manager/Makefile.in
@@ -205,6 +205,7 @@ DEPDIR = @DEPDIR@
 DHCLIENT_PATH = @DHCLIENT_PATH@
 DHCPCD_PATH = @DHCPCD_PATH@
 DLLTOOL = @DLLTOOL@
+DNSMASQ_PATH = @DNSMASQ_PATH@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -227,6 +228,7 @@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
 GNUTLS_LIBS = @GNUTLS_LIBS@
 GREP = @GREP@
 GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
 GTKDOC_MKPDF = @GTKDOC_MKPDF@
@@ -411,23 +413,21 @@ with_dhclient = @with_dhclient@
 with_dhcpcd = @with_dhcpcd@
 with_netconfig = @with_netconfig@
 with_resolvconf = @with_resolvconf@
-INCLUDES = \
+noinst_LTLIBRARIES = libfirewall-manager.la
+libfirewall_manager_la_CPPFLAGS = \
 	-I${top_srcdir}/src \
 	-I${top_srcdir}/src/logging \
 	-I${top_srcdir}/include \
-	-I${top_srcdir}/libnm-util
-
-noinst_LTLIBRARIES = libfirewall-manager.la
-libfirewall_manager_la_SOURCES = \
-	nm-firewall-manager.h \
-	nm-firewall-manager.c
-
-libfirewall_manager_la_CPPFLAGS = \
+	-I${top_srcdir}/libnm-util \
 	$(DBUS_CFLAGS) \
 	$(GLIB_CFLAGS) \
 	-DNM_PKGDATADIR=\"$(pkgdatadir)\" \
 	-DNM_LOCALSTATEDIR=\"$(localstatedir)\"
 
+libfirewall_manager_la_SOURCES = \
+	nm-firewall-manager.h \
+	nm-firewall-manager.c
+
 libfirewall_manager_la_LIBADD = \
 	$(top_builddir)/src/logging/libnm-logging.la \
 	$(DBUS_LIBS) \
diff --git a/src/firewall-manager/nm-firewall-manager.c b/src/firewall-manager/nm-firewall-manager.c
index c19be5e8..cdb2f3fa 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,
@@ -137,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);