mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 05:58:01 +02:00
Install a configuration snippet on Fedora 40+, that sets the default for
"wifi.cloned-mac-address" to "stable-ssid" (otherwise, the built-in default
is "preserve").
This will mean, that on Wi-Fi profiles that don't explicitly override
the property "wifi.cloned-mac-address", a stable address is generated.
The benefit is, that Fedora will randomize the MAC address by default.
Note that this also affects all pre-existing Wi-Fi profiles, that don't
explicitly configure the property in the profile. Depending on how you
see it, this is desirable. Randomization should be done, unless the user
opts-out (not the other way around).
Note that setting "wifi.cloned-mac-address=stable-ssid" is similar to
setting a stable ID "${NETWORK_SSID}" and "wifi.cloned-mac-address=stable".
The difference is that the latter also affects other properties, like
- "ipv6.addr-gen-mode=stable-privacy"
- "{ethernet,wifi}.cloned-mac-address=stable"
- "ipv4.dhcp-client-id=stable"
- "ipv6.dhcp-duid=stable-{llt,ll,uuid}"
- "{ipv4,ipv6}.iaid=stable"
Especially with "ipv6.addr-gen-mode=stable", changing the stable ID
would mean that also all IPv6 addresses change. We want to avoid that by
only changing the cloned-mac-address to "stable-ssid".
This means, after upgrade to F40, different MAC addresses will be used
on most users' Wi-Fi. This means, DHCP might hand out different IP
addresses, sessions might expire, and configuration that depended on the
previous MAC address will be affected.
https://pagure.io/fedora-workstation/issue/350
31 lines
1.2 KiB
Text
31 lines
1.2 KiB
Text
# This sets defaults for Wi-Fi profiles to set a generated, stable MAC address.
|
|
#
|
|
# Do not modify this file. You can hide/overwrite this file by placing a file
|
|
# to "/etc/NetworkManager/conf.d/22-wifi-mac-addr.conf". You can also add
|
|
# configuration snippets with higher priority that override this setting (see
|
|
# `man 5 NetworkManager.conf`). Most importantly, this snippet only sets
|
|
# default values for the profile. You can explicitly set the value for each
|
|
# profile, so that this default value is not used.
|
|
#
|
|
# For example, on a particular profile/network set
|
|
#
|
|
# $ nmcli connection modify "$PROFILE" wifi.cloned-mac-address permanent
|
|
#
|
|
# to use the hardware MAC address. This prevents the default from this file
|
|
# to take effect.
|
|
#
|
|
# Or
|
|
#
|
|
# $ nmcli connection modify "$PROFILE" wifi.cloned-mac-address stable connection.stable-id '${NETWORK_SSID}/${BOOT}'
|
|
#
|
|
# to get a generated MAC address that changes on each boot. Note how setting
|
|
# "connection.stable-id" also affects other aspects of the profile.
|
|
#
|
|
# See `man 5 nm-settings` for "wifi.cloned-mac-address" and "connection.stable-id".
|
|
|
|
[connection.22-wifi-mac-addr]
|
|
match-device=type:wifi
|
|
wifi.cloned-mac-address=stable-ssid
|
|
|
|
[.config]
|
|
enable=nm-version-min:1.45
|