summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-10-08 13:08:59 +0200
committerThomas Haller <thaller@redhat.com>2015-11-18 15:37:42 +0100
commit4f6c91d6962cc031f07e52bb31adde560ad70fac (patch)
treeac064a84eded7d324373d48c4a113c61723bfecd /src
parent6a46dfca267f8bdb4ffc6539e168a39702bbb7c2 (diff)
downloadNetworkManager-4f6c91d6962cc031f07e52bb31adde560ad70fac.tar.gz
wifi: enable mac-address-randomization by default for new connections
But ensure that old keyfiles that did not yet understand the new key continue to have it disabled.
Diffstat (limited to 'src')
-rw-r--r--src/supplicant-manager/nm-supplicant-config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c
index 28047b62e8..521a26134e 100644
--- a/src/supplicant-manager/nm-supplicant-config.c
+++ b/src/supplicant-manager/nm-supplicant-config.c
@@ -465,8 +465,10 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self,
if (priv->mac_randomization == NM_SETTING_MAC_RANDOMIZATION_DEFAULT) {
priv->mac_randomization = mac_randomization_fallback;
if (priv->mac_randomization == NM_SETTING_MAC_RANDOMIZATION_DEFAULT) {
- /* the value is unconfigured. For now, that means we don't use randomization.*/
- priv->mac_randomization = NM_SETTING_MAC_RANDOMIZATION_NEVER;
+ /* use randomization if supported. */
+ priv->mac_randomization = (mac_randomization_support == NM_SUPPLICANT_FEATURE_YES)
+ ? NM_SETTING_MAC_RANDOMIZATION_ALWAYS
+ : NM_SETTING_MAC_RANDOMIZATION_NEVER;
}
}