summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Bonné <brambonne@google.com>2021-03-15 09:36:26 +0000
committerBram Bonné <brambonne@google.com>2021-03-15 15:07:50 +0000
commit8b266a30b0287705a269bd3f03bc966d796e0e21 (patch)
treeb0992f6bf01bea9362021c8cdd878a3acea57b76
parenteac13f7677f5d48720eaa446001236436b2d5471 (diff)
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
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java19
1 files 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();
}