NetworkManager/src/tests
Thomas Haller f0d40525df device: support dynamic "connection.stable-id" in form of text-substitution
Usecase: when connecting to a public Wi-Fi with MAC address randomization
("wifi.cloned-mac-address=random") you get on every re-connect a new
IP address due to the changing MAC address.
"wifi.cloned-mac-address=stable" is the solution for that. But that
means, every time when reconnecting to this network, the same ID will
be reused. We want an ID that is stable for a while, but at a later
point a new ID should e generated when revisiting the Wi-Fi network.

Extend the stable-id to become dynamic and support templates/substitutions.
Currently supported is "${CONNECTION}", "${BOOT}" and "${RANDOM}".
Any unrecognized pattern is treated verbaim/untranslated.

"$$" is treated special to allow escaping the '$' character. This allows
the user to still embed verbatim '$' characters with the guarantee that
future versions of NetworkManager will still generate the same ID.
Of course, a user could just avoid '$' in the stable-id unless using
it for dynamic substitutions.

Later we might want to add more recognized substitutions. For example, it
could be useful to generate new IDs based on the current time. The ${} syntax
is extendable to support arguments like "${PERIODIC:weekly}".

Also allow "connection.stable-id" to be set as global default value.
Previously that made no sense because the stable-id was static
and is anyway strongly tied to the identity of the connection profile.
Now, with dynamic stable-ids it gets much more useful to specify
a global default.

Note that pre-existing stable-ids don't change and still generate
the same addresses -- unless they contain one of the new ${} patterns.
2017-01-09 14:50:33 +01:00
..
config config: drop nm_config_get_dhcp_client() and access config directly 2016-11-25 18:02:38 +01:00
test-dcb.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
test-general-with-expect.c all: use O_CLOEXEC for file descriptors 2016-12-13 11:26:59 +01:00
test-general.c device: support dynamic "connection.stable-id" in form of text-substitution 2017-01-09 14:50:33 +01:00
test-ip4-config.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
test-ip6-config.c ip6-config: add nm_ip6_config_set_privacy() 2016-12-05 10:56:51 +01:00
test-resolvconf-capture.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
test-route-manager.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
test-secret-agent.py python: make test-secret-agent.py python3 ready 2016-12-14 19:00:42 +01:00
test-systemd.c build: don't add systemd path the include search path 2016-09-27 14:13:21 +02:00
test-utils.c core: add assertions for network_id/stable_type 2017-01-09 14:50:33 +01:00
test-wired-defname.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00