summaryrefslogtreecommitdiff
path: root/src/devices/nm-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/nm-device.c')
-rw-r--r--src/devices/nm-device.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index a0cdb3d235..862eb60c7c 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -1268,6 +1268,8 @@ _get_stable_id (NMDevice *self,
gs_free char *generated = NULL;
NMUtilsStableType stable_type;
NMSettingConnection *s_con;
+ gboolean hwaddr_is_fake;
+ const char *hwaddr;
const char *stable_id;
const char *uuid;
@@ -1284,8 +1286,14 @@ _get_stable_id (NMDevice *self,
uuid = nm_connection_get_uuid (connection);
+ /* the cloned-mac-address may be generated based on the stable-id.
+ * Thus, at this point, we can only use the permanant MAC address
+ * as seed. */
+ hwaddr = nm_device_get_permanent_hw_address_full (self, TRUE, &hwaddr_is_fake);
+
stable_type = nm_utils_stable_id_parse (stable_id,
nm_device_get_ip_iface (self),
+ !hwaddr_is_fake ? hwaddr : NULL,
nm_utils_get_boot_id_str (),
uuid,
&generated);