diff options
author | Thomas Haller <thaller@redhat.com> | 2014-12-19 17:40:30 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-01-07 23:33:37 +0100 |
commit | 3b8d668b88bcff7647e56b3da9697d1cd2ecee37 (patch) | |
tree | 9ea1778af4e4073ae2df58ffb1d8ac32ac1ad51f | |
parent | b5e2946a9f4e878814e867df0ffb793955a8dc43 (diff) | |
download | NetworkManager-3b8d668b88bcff7647e56b3da9697d1cd2ecee37.tar.gz |
device: log sysctl values in device constructor for debugging
-rw-r--r-- | src/devices/nm-device.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index a9899535df..5834716b2e 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -8078,6 +8078,25 @@ constructed (GObject *object) NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); int master; + if ( nm_logging_enabled (LOGL_DEBUG, LOGD_PLATFORM) + && priv->iface + && nm_utils_iface_valid_name (priv->iface)) { +#define LOG_SYSCTL(sysctl_path) \ + G_STMT_START { \ + char *_systctl_value = nm_platform_sysctl_get (sysctl_path); \ + g_free (_systctl_value); \ + } G_STMT_END + /* Fetch some sysctl values. In DEBUG mode this will log their values. */ + LOG_SYSCTL (nm_utils_ip6_property_path (priv->iface, "disable_ipv6")); + LOG_SYSCTL (nm_utils_ip6_property_path (priv->iface, "accept_ra")); + LOG_SYSCTL (nm_utils_ip6_property_path (priv->iface, "accept_ra_defrtr")); + LOG_SYSCTL (nm_utils_ip6_property_path (priv->iface, "accept_ra_pinfo")); + LOG_SYSCTL (nm_utils_ip6_property_path (priv->iface, "accept_ra_rtr_pref")); + LOG_SYSCTL (nm_utils_ip6_property_path (priv->iface, "mtu")); + LOG_SYSCTL (nm_utils_ip6_property_path (priv->iface, "hop_limit")); + LOG_SYSCTL (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) |