From cab63901fa6fb8aba591efad0df5ae3ecbb6ff62 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 7 Jul 2016 16:29:25 +0200 Subject: [PATCH] device: allow ipv6ll address to be set for disconnected devices Commit f85941ee9101 ("device: don't try to generate ipv6ll address for disconnected devices") disabled the generation of IPv6 link-local addresses for disconnected devices to fix a crash. However that broke the following: $ ip a f dev eth0 $ systemctl start NetworkManager $ nmcli d DEVICE TYPE STATE CONNECTION eth0 ethernet disconnected eth0 $ ip a a dev eth0 2001::42/64 $ ip a show eth0 4: eth0: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 52:52:00:61:32:81 brd ff:ff:ff:ff:ff:ff inet6 2001::42/64 scope global valid_lft forever preferred_lft forever (no link-local address) Revert that change. Fixes: f85941ee91017079f30afac80e7b39c44cb04c81 (cherry picked from commit 75406d1760c06424d824c9afaabbef970257e0fd) --- src/devices/nm-device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 415b986368..62259bc4ae 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -9099,8 +9099,7 @@ queued_ip6_config_change (gpointer user_data) g_object_ref (self); update_ip6_config (self, FALSE); - if ( priv->state > NM_DEVICE_STATE_DISCONNECTED - && priv->state < NM_DEVICE_STATE_DEACTIVATING + if ( priv->state < NM_DEVICE_STATE_DEACTIVATING && nm_platform_link_get (NM_PLATFORM_GET, priv->ifindex)) { /* Handle DAD failures */ for (iter = priv->dad6_failed_addrs; iter; iter = g_slist_next (iter)) {