diff options
author | Thomas Haller <thaller@redhat.com> | 2014-12-19 17:40:30 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-01-11 18:30:00 +0100 |
commit | 53886904c32da588297846cf4250808761a95ab2 (patch) | |
tree | d905b33a0fcf1e427d98f31f164b2570ff39ba3c | |
parent | 13fa9a8eeb43869eb27b2b2c76f5471f14a7b23d (diff) | |
download | NetworkManager-th/route-fixes-bgo741871-v2.tar.gz |
device: log sysctl values in device constructor for debuggingth/route-fixes-bgo741871-v2
https://bugzilla.gnome.org/show_bug.cgi?id=741871
-rw-r--r-- | src/devices/nm-device.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 119d4a85c1..20a3b5971e 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -8079,6 +8079,21 @@ constructed (GObject *object) NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); int master; + if ( nm_logging_enabled (LOGL_DEBUG, LOGD_PLATFORM) + && priv->iface + && !device_has_capability (self, NM_DEVICE_CAP_IS_NON_KERNEL) + && nm_utils_iface_valid_name (priv->iface)) { + /* Fetch some sysctl values. In DEBUG mode this will log their values. */ + g_free (nm_platform_sysctl_get (nm_utils_ip6_property_path (priv->iface, "disable_ipv6"))); + g_free (nm_platform_sysctl_get (nm_utils_ip6_property_path (priv->iface, "accept_ra"))); + g_free (nm_platform_sysctl_get (nm_utils_ip6_property_path (priv->iface, "accept_ra_defrtr"))); + g_free (nm_platform_sysctl_get (nm_utils_ip6_property_path (priv->iface, "accept_ra_pinfo"))); + g_free (nm_platform_sysctl_get (nm_utils_ip6_property_path (priv->iface, "accept_ra_rtr_pref"))); + g_free (nm_platform_sysctl_get (nm_utils_ip6_property_path (priv->iface, "mtu"))); + g_free (nm_platform_sysctl_get (nm_utils_ip6_property_path (priv->iface, "hop_limit"))); + g_free (nm_platform_sysctl_get (nm_utils_ip6_property_path (priv->iface, "use_tempaddr"))); + } + nm_device_update_hw_address (self); if (NM_DEVICE_GET_CLASS (self)->update_permanent_hw_address) |