From 8b266a30b0287705a269bd3f03bc966d796e0e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bram=20Bonn=C3=A9?= Date: Mon, 15 Mar 2021 09:36:26 +0000 Subject: Revert "Use EUI64 IPv6 link-local address generation only when randomizing MAC" This reverts commit eac13f7677f5d48720eaa446001236436b2d5471. Reason for revert: Causing build failure (b/154114734#comment56) Bug: 154114734 Merged-In: Iefb027b17657031116e068bbccdb7b2231a65238 Merged-In: I4512b87459d036630925ca5ac5ea42179c42ea71 Change-Id: I5a145b9256b75000fd42c9db96e04155815817f4 --- .../com/android/server/wifi/WifiStateMachine.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 994b0d048..390a10238 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -4969,17 +4969,12 @@ public class WifiStateMachine extends StateMachine { final WifiConfiguration currentConfig = getCurrentWifiConfiguration(); final boolean isUsingStaticIp = (currentConfig.getIpAssignment() == IpConfiguration.IpAssignment.STATIC); - final boolean isUsingMacRandomization = - currentConfig.macRandomizationSetting - == WifiConfiguration.RANDOMIZATION_PERSISTENT - && isConnectedMacRandomizationEnabled(); if (mVerboseLoggingEnabled) { final String key = currentConfig.configKey(); log("enter ObtainingIpState netId=" + Integer.toString(mLastNetworkId) + " " + key + " " + " roam=" + mIsAutoRoaming - + " static=" + isUsingStaticIp - + " randomMac=" + isUsingMacRandomization); + + " static=" + isUsingStaticIp); } // Send event to CM & network change broadcast @@ -5006,25 +5001,25 @@ public class WifiStateMachine extends StateMachine { if (!TextUtils.isEmpty(mTcpBufferSizes)) { mIpClient.setTcpBufferSizes(mTcpBufferSizes); } - final IpClient.ProvisioningConfiguration.Builder prov; + final IpClient.ProvisioningConfiguration prov; if (!isUsingStaticIp) { prov = IpClient.buildProvisioningConfiguration() .withPreDhcpAction() .withApfCapabilities(mWifiNative.getApfCapabilities(mInterfaceName)) .withNetwork(getCurrentNetwork()) .withDisplayName(currentConfig.SSID) - if (isUsingMacRandomization) { - prov.withRandomMacAddress(); - } + .withRandomMacAddress() + .build(); } else { StaticIpConfiguration staticIpConfig = currentConfig.getStaticIpConfiguration(); prov = IpClient.buildProvisioningConfiguration() .withStaticConfiguration(staticIpConfig) .withApfCapabilities(mWifiNative.getApfCapabilities(mInterfaceName)) .withNetwork(getCurrentNetwork()) - .withDisplayName(currentConfig.SSID); + .withDisplayName(currentConfig.SSID) + .build(); } - mIpClient.startProvisioning(prov.build()); + mIpClient.startProvisioning(prov); // Get Link layer stats so as we get fresh tx packet counters getWifiLinkLayerStats(); } -- cgit v1.2.3