[PATCH 1/2] device: Don't consider device with only LL address configured



LXC domains are given a veth interface that's up and has a LL address
upon their creation.
---
 src/devices/nm-device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index d2edef9..4419d90 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -332,6 +332,8 @@ static void _set_state_full (NMDevice *self,
 
 static void nm_device_update_hw_address (NMDevice *self);
 
+static gboolean have_ip6_address (const NMIP6Config *ip6_config, gboolean linklocal);
+
 /***********************************************************/
 
 static GQuark
@@ -1676,7 +1678,7 @@ device_has_config (NMDevice *self)
        /* Check for IP configuration. */
        if (priv->ip4_config && nm_ip4_config_get_num_addresses (priv->ip4_config))
                return TRUE;
-       if (priv->ip6_config && nm_ip6_config_get_num_addresses (priv->ip6_config))
+       if (have_ip6_address (priv->ip6_config, FALSE))
                return TRUE;
 
        /* The existence of a software device is good enough. */
-- 
1.9.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]