summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-01-23 13:02:16 -0600
committerDan Williams <dcbw@redhat.com>2014-01-23 16:06:01 -0600
commit13f4a00d4d490fb65f93c246d1c93ed56a47213f (patch)
treee8dcc7de160d0456c417439c21b9faa7d0599fa5 /src
parent6e8345d89b9a09326c31dd374d537e7f22389393 (diff)
core: only log about IPv6 Commit the first time
Since IPv6 configuration gets updated every time a router advertisement comes in, it can lead NM to continuously logging: NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) scheduled... NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) started... NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) complete. that's annoying. So after the initial configuration is done, make subsequent IPv6 Commit log messages debug instead of info.
Diffstat (limited to 'src')
-rw-r--r--src/devices/nm-device.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 035434e9ce..4684efe967 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -335,8 +335,6 @@ static gboolean nm_device_set_ip6_config (NMDevice *dev,
gboolean commit,
NMDeviceStateReason *reason);
-static gboolean nm_device_activate_ip6_config_commit (gpointer user_data);
-
static gboolean check_connection_available (NMDevice *device,
NMConnection *connection,
const char *specific_object);
@@ -4232,6 +4230,7 @@ nm_device_activate_ip6_config_commit (gpointer user_data)
{
NMDevice *self = NM_DEVICE (user_data);
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ guint level = (priv->ip6_state == IP_DONE) ? LOGL_DEBUG : LOGL_INFO;
NMActRequest *req;
const char *iface;
NMConnection *connection;
@@ -4241,8 +4240,7 @@ nm_device_activate_ip6_config_commit (gpointer user_data)
activation_source_clear (self, FALSE, AF_INET6);
iface = nm_device_get_iface (self);
- nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IPv6 Commit) started...",
- iface);
+ nm_log (LOGD_DEVICE, level, "Activation (%s) Stage 5 of 5 (IPv6 Commit) started...", iface);
req = nm_device_get_act_request (self);
g_assert (req);
@@ -4262,14 +4260,13 @@ nm_device_activate_ip6_config_commit (gpointer user_data)
if (nm_device_get_state (self) == NM_DEVICE_STATE_IP_CONFIG)
nm_device_state_changed (self, NM_DEVICE_STATE_IP_CHECK, NM_DEVICE_STATE_REASON_NONE);
} else {
- nm_log_info (LOGD_DEVICE | LOGD_IP6,
+ nm_log_warn (LOGD_DEVICE | LOGD_IP6,
"Activation (%s) Stage 5 of 5 (IPv6 Commit) failed",
iface);
nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
}
- nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IPv6 Commit) complete.",
- iface);
+ nm_log (LOGD_DEVICE, level, "Activation (%s) Stage 5 of 5 (IPv6 Commit) complete.", iface);
return FALSE;
}
@@ -4277,13 +4274,16 @@ nm_device_activate_ip6_config_commit (gpointer user_data)
void
nm_device_activate_schedule_ip6_config_result (NMDevice *self)
{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ guint level = (priv->ip6_state == IP_DONE) ? LOGL_DEBUG : LOGL_INFO;
+
g_return_if_fail (NM_IS_DEVICE (self));
activation_source_schedule (self, nm_device_activate_ip6_config_commit, AF_INET6);
- nm_log_info (LOGD_DEVICE | LOGD_IP6,
- "Activation (%s) Stage 5 of 5 (IPv6 Commit) scheduled...",
- nm_device_get_iface (self));
+ nm_log (LOGD_DEVICE | LOGD_IP6, level,
+ "Activation (%s) Stage 5 of 5 (IPv6 Commit) scheduled...",
+ nm_device_get_iface (self));
}
gboolean