wifi: disable mac-address-randomization by default
authorThomas Haller <thaller@redhat.com>
Wed, 18 Nov 2015 16:46:25 +0000 (17:46 +0100)
committerThomas Haller <thaller@redhat.com>
Wed, 18 Nov 2015 16:54:11 +0000 (17:54 +0100)
Enabling it by default can be bad. For example for captive portals.
Effectively revert commit 4f6c91d6962cc031f07e52bb31adde560ad70fac
to again disable it by default.

https://bugzilla.gnome.org/show_bug.cgi?id=734081

man/NetworkManager.conf.xml.in
src/supplicant-manager/nm-supplicant-config.c

index 51d4c4c..b7e228a 100644 (file)
@@ -612,7 +612,7 @@ ipv6.ip6-privacy=1
       </varlistentry>
       <varlistentry>
         <term><varname>wifi.mac-address-randomization</varname></term>
-        <listitem><para>If left unspecified, MAC address randomization is used supported.</para></listitem>
+        <listitem><para>If left unspecified, MAC address randomization is disabled.</para></listitem>
       </varlistentry>
     </para>
   </refsect1>
index 521a261..47b98cd 100644 (file)
@@ -465,10 +465,9 @@ 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) {
-                       /* use randomization if supported. */
-                       priv->mac_randomization = (mac_randomization_support == NM_SUPPLICANT_FEATURE_YES)
-                                                 ? NM_SETTING_MAC_RANDOMIZATION_ALWAYS
-                                                 : NM_SETTING_MAC_RANDOMIZATION_NEVER;
+                       /* Don't use randomization, unless explicitly enabled.
+                        * Randomization can work badly with captive portals. */
+                       priv->mac_randomization = NM_SETTING_MAC_RANDOMIZATION_NEVER;
                }
        }