summaryrefslogtreecommitdiff
path: root/libnm-core
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-11-02 12:07:09 +0100
committerThomas Haller <thaller@redhat.com>2018-11-13 19:09:34 +0100
commit7ffbf7127603a935236785f6a59a104583194df4 (patch)
tree082e275a7469ffeac7e81da9b9eaefbfe33a3dc0 /libnm-core
parentab314065b8928c12347b40b25f200020c59fcbda (diff)
all: add "${MAC}" substituion for "connection.stable-id"
We already had "${DEVICE}" which uses the interface name. In times of predictable interface naming, that works well. It allows the user to generate IDs per device which don't change when the hardware is replaced. "${MAC}" is similar, except that is uses the permanent MAC address of the device. The substitution results in the empty word, if the device has no permanent MAC address (like software devices). The per-device substitutions "${DEVICE}" and "${MAC}" are especially interesting with "connection.multi-connect=multiple".
Diffstat (limited to 'libnm-core')
-rw-r--r--libnm-core/nm-setting-connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c
index 1731afa66..3c3a4dcee 100644
--- a/libnm-core/nm-setting-connection.c
+++ b/libnm-core/nm-setting-connection.c
@@ -1626,11 +1626,11 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass)
* 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}", "${DEVICE}",
+ * at runtime. Currently supported are "${CONNECTION}", "${DEVICE}", "${MAC}",
* "${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.
+ * device and "${MAC}" is the permanent MAC address 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 "$$".