summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-04-30 16:49:43 +0200
committerLubomir Rintel <lkundrak@v3.sk>2016-05-30 16:32:07 +0200
commit6c018a283b3e0df01fd350d535e250dc5745192c (patch)
tree49b69b7c089a700c97ebea8480a00720135d924c
parent60e2a3ea76b9ac8bc5eea9a5589112c9ec1ad6f6 (diff)
downloadNetworkManager-6c018a283b3e0df01fd350d535e250dc5745192c.tar.gz
device: use the token set in platform when generating a connection
-rw-r--r--src/devices/nm-device.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 40f42e7f02..860721b77f 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -3061,6 +3061,7 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master)
gs_free char *uuid = NULL;
const char *ip4_method, *ip6_method;
GError *error = NULL;
+ const NMPlatformLink *pllink;
/* If update_connection() is not implemented, just fail. */
if (!klass->update_connection)
@@ -3107,6 +3108,15 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master)
s_ip6 = nm_ip6_config_create_setting (priv->ip6_config);
nm_connection_add_setting (connection, s_ip6);
+
+ pllink = nm_platform_link_get (NM_PLATFORM_GET, priv->ifindex);
+ if (pllink && pllink->inet6_token.id) {
+ _LOGD (LOGD_IP6, "IPv6 tokenized identifier present");
+ g_object_set (s_ip6,
+ NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE, NM_IN6_ADDR_GEN_MODE_EUI64,
+ NM_SETTING_IP6_CONFIG_TOKEN, nm_utils_inet6_interface_identifier_to_token (pllink->inet6_token, NULL),
+ NULL);
+ }
}
klass->update_connection (self, connection);