about summary refs log tree commit diff
path: root/libnm-core/nm-setting-connection.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-06-04 00:08:31 +0200
committerMichael Biebl <biebl@debian.org>2018-06-04 00:08:31 +0200
commit0dd9df69fdbd475c48a0c8d5b0a1882550fe7321 (patch)
tree249cf25643b1fe408e10679bb61613bc6540e894 /libnm-core/nm-setting-connection.c
parent2e94a3b93171ab3fb95bf689aab1664d23988809 (diff)
parent04bc9e1cd3544445d883ad29ea108c1645c8e7b7 (diff)
Update upstream source from tag 'upstream/1.11.4'
Update to upstream version '1.11.4'
with Debian dir d0638aa2e32d5bae4e8daa021b9a66b7c4d6647e
Diffstat (limited to 'libnm-core/nm-setting-connection.c')
-rw-r--r--libnm-core/nm-setting-connection.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c
index 40153c0f..f8f1b017 100644
--- a/libnm-core/nm-setting-connection.c
+++ b/libnm-core/nm-setting-connection.c
@@ -288,7 +288,6 @@ nm_setting_connection_get_connection_type (NMSettingConnection *setting)
 	return NM_SETTING_CONNECTION_GET_PRIVATE (setting)->type;
 }
 
-
 /**
  * nm_setting_connection_get_num_permissions:
  * @setting: the #NMSettingConnection
@@ -1077,7 +1076,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
 	}
 
 	if (   priv->mdns < NM_SETTING_CONNECTION_MDNS_DEFAULT
-	    || priv->mdns > NM_SETTING_CONNECTION_MDNS_RESOLVE) {
+	    || priv->mdns > NM_SETTING_CONNECTION_MDNS_YES) {
 		g_set_error (error,
 		             NM_CONNECTION_ERROR,
 		             NM_CONNECTION_ERROR_INVALID_PROPERTY,
@@ -1536,7 +1535,10 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class)
 	/**
 	 * NMSettingConnection:stable-id:
 	 *
-	 * Token to generate stable IDs for the connection.
+	 * This represents the identity of the connection used for various purposes.
+	 * It allows to configure multiple profiles to share the identity. Also,
+	 * the stable-id can contain placeholders that are substituted dynamically and
+	 * deterministically depending on the context.
 	 *
 	 * The stable-id is used for generating IPv6 stable private addresses
 	 * with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the
@@ -1544,26 +1546,28 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class)
 	 * and wifi.cloned-mac-address=stable. It is also used as DHCP client
 	 * identifier with ipv4.dhcp-client-id=stable.
 	 *
-	 * Note that also the interface name of the activating connection and a
-	 * per-host secret key is included into the address generation so that the
-	 * same stable-id on different hosts/devices yields different addresses.
-	 *
-	 * If the value is unset, an ID unique for the connection is used.
-	 * Specifying a stable-id allows multiple connections to generate the
-	 * same addresses. Another use is to generate IDs at runtime via
-	 * dynamic substitutions.
+	 * Note that depending on the context where it is used, other parameters are
+	 * also seeded into the generation algorithm. For example, a per-host key
+	 * is commonly also included, so that different systems end up generating
+	 * different IDs. Or with ipv6.addr-gen-mode=stable-privacy, also the device's
+	 * name is included, so that different interfaces yield different addresses.
 	 *
 	 * The '$' character is treated special to perform dynamic substitutions
-	 * at runtime. Currently supported are "${CONNECTION}", "${BOOT}", "${RANDOM}".
-	 * These effectively create unique IDs per-connection, per-boot, or every time.
+	 * at runtime. Currently supported are "${CONNECTION}", "${DEVICE}",
+	 * "${BOOT}", "${RANDOM}".
+	 * These effectively create unique IDs per-connection, per-device, per-boot,
+	 * or every time. Note that "${DEVICE}" corresponds the the interface name of the
+	 * device.
 	 * Any unrecognized patterns following '$' are treated verbatim, however
 	 * are reserved for future use. You are thus advised to avoid '$' or
 	 * escape it as "$$".
-	 * For example, set it to "${CONNECTION}/${BOOT}" to create a unique id for
-	 * this connection that changes with every reboot.
+	 * For example, set it to "${CONNECTION}-${BOOT}-${DEVICE}" to create a unique id for
+	 * this connection that changes with every reboot and differs depending on the
+	 * interface where the profile activates.
 	 *
-	 * Note that two connections only use the same effective id if
-	 * their stable-id is also identical before performing dynamic substitutions.
+	 * If the value is unset, a global connection default is consulted. If the
+	 * value is still unset, the default is similar to "${CONNECTION}" and uses
+	 * a unique, fixed ID for the connection.
 	 *
 	 * Since: 1.4
 	 **/
@@ -1731,7 +1735,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class)
 	                       NM_SETTING_PARAM_FUZZY_IGNORE |
 	                       G_PARAM_STATIC_STRINGS));
 
-
 	/**
 	 * NMSettingConnection:autoconnect-retries:
 	 *