about summary refs log tree commit diff
path: root/src/supplicant-manager/nm-supplicant-config.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2016-08-26 02:18:32 +0200
committerMichael Biebl <biebl@debian.org>2016-08-26 02:18:32 +0200
commit7514efc2f38c9ace4557d4e69d68e7d380389030 (patch)
tree7fb00fda86cfcc2ca377f191633a7cfdbfea7ca3 /src/supplicant-manager/nm-supplicant-config.c
parentd6201f5d8daada3d64a0a3e0038e14eebec683ce (diff)
Imported Upstream version 1.4.0 upstream/1.4.0
Diffstat (limited to 'src/supplicant-manager/nm-supplicant-config.c')
-rw-r--r--src/supplicant-manager/nm-supplicant-config.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c
index 5ce8bb31..6283edd6 100644
--- a/src/supplicant-manager/nm-supplicant-config.c
+++ b/src/supplicant-manager/nm-supplicant-config.c
@@ -47,7 +47,6 @@ typedef struct
 	GHashTable *config;
 	GHashTable *blobs;
 	guint32    ap_scan;
-	NMSettingMacRandomization mac_randomization;
 	gboolean   fast_required;
 	gboolean   dispose_has_run;
 } NMSupplicantConfigPrivate;
@@ -85,7 +84,6 @@ nm_supplicant_config_init (NMSupplicantConfig * self)
 	                                     (GDestroyNotify) blob_free);
 
 	priv->ap_scan = 1;
-	priv->mac_randomization = NM_SETTING_MAC_RANDOMIZATION_DEFAULT;
 	priv->dispose_has_run = FALSE;
 }
 
@@ -272,32 +270,6 @@ nm_supplicant_config_get_ap_scan (NMSupplicantConfig * self)
 	return NM_SUPPLICANT_CONFIG_GET_PRIVATE (self)->ap_scan;
 }
 
-const char *
-nm_supplicant_config_get_mac_randomization (NMSupplicantConfig *self)
-{
-	g_return_val_if_fail (NM_IS_SUPPLICANT_CONFIG (self), 0);
-
-	/**
-	 * mac_addr - MAC address policy default
-	 *
-	 * 0 = use permanent MAC address
-	 * 1 = use random MAC address for each ESS connection
-	 * 2 = like 1, but maintain OUI (with local admin bit set)
-	 *
-	 * By default, permanent MAC address is used unless policy is changed by
-	 * the per-network mac_addr parameter.
-	 */
-
-	switch (NM_SUPPLICANT_CONFIG_GET_PRIVATE (self)->mac_randomization) {
-	case NM_SETTING_MAC_RANDOMIZATION_ALWAYS:
-		return "1";
-	case NM_SETTING_MAC_RANDOMIZATION_NEVER:
-	case NM_SETTING_MAC_RANDOMIZATION_DEFAULT:
-	default:
-		return "0";
-	}
-}
-
 gboolean
 nm_supplicant_config_fast_required (NMSupplicantConfig *self)
 {
@@ -385,8 +357,6 @@ gboolean
 nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self,
                                            NMSettingWireless * setting,
                                            guint32 fixed_freq,
-                                           NMSupplicantFeature mac_randomization_support,
-                                           NMSettingMacRandomization mac_randomization_fallback,
                                            GError **error)
 {
 	NMSupplicantConfigPrivate *priv;
@@ -477,23 +447,6 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self,
 		}
 	}
 
-	priv->mac_randomization = nm_setting_wireless_get_mac_address_randomization (setting);
-	if (priv->mac_randomization == NM_SETTING_MAC_RANDOMIZATION_DEFAULT) {
-		priv->mac_randomization = mac_randomization_fallback;
-		if (priv->mac_randomization == NM_SETTING_MAC_RANDOMIZATION_DEFAULT) {
-			/* Don't use randomization, unless explicitly enabled.
-			 * Randomization can work badly with captive portals. */
-			priv->mac_randomization = NM_SETTING_MAC_RANDOMIZATION_NEVER;
-		}
-	}
-
-	if (   priv->mac_randomization != NM_SETTING_MAC_RANDOMIZATION_NEVER
-	    && mac_randomization_support != NM_SUPPLICANT_FEATURE_YES) {
-		g_set_error (error, NM_SUPPLICANT_ERROR, NM_SUPPLICANT_ERROR_CONFIG,
-		             "cannot enable mac-randomization due to missing supplicant support");
-		return FALSE;
-	}
-
 	return TRUE;
 }