diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-07-07 16:04:09 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-07-07 18:50:38 +0200 |
commit | bb1692707f8029f14d17d6c6642c370fd9b58322 (patch) | |
tree | dd2dfa468801fea3f0a30c223ad6b2ec0224cda2 | |
parent | ce9d8e0817023265b615f9ef13b0d989de0ac340 (diff) | |
download | NetworkManager-bb1692707f8029f14d17d6c6642c370fd9b58322.tar.gz |
device: just get ip_iface in the place where it is needed
priv->iface could change in device_link_changed() which reacts on platform link
changes caused by nm_platform_link_set_user_ipv6ll_enabled(). (The variable could
change between obtaining and using its value, because emitting a glib signal runs
callbacks synchronously).
Actually, the problem is already fixed by commit 04caae735fabe00e19a05d49e065514114b59d40.
But still this is better.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1224366
-rw-r--r-- | src/devices/nm-device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 16d4c48c69..4c3b67364a 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4836,7 +4836,6 @@ set_nm_ipv6ll (NMDevice *self, gboolean enable) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); int ifindex = nm_device_get_ip_ifindex (self); - const char *iface = nm_device_get_ip_iface (self); char *value; if (!nm_platform_check_support_user_ipv6ll (NM_PLATFORM_GET)) @@ -4852,7 +4851,8 @@ set_nm_ipv6ll (NMDevice *self, gboolean enable) if (enable) { /* Bounce IPv6 to ensure the kernel stops IPv6LL address generation */ - value = nm_platform_sysctl_get (NM_PLATFORM_GET, nm_utils_ip6_property_path (iface, "disable_ipv6")); + value = nm_platform_sysctl_get (NM_PLATFORM_GET, + nm_utils_ip6_property_path (nm_device_get_ip_iface (self), "disable_ipv6")); if (g_strcmp0 (value, "0") == 0) nm_device_ipv6_sysctl_set (self, "disable_ipv6", "1"); g_free (value); |