diff options
author | Roshan Pius <rpius@google.com> | 2017-01-10 08:21:35 -0800 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2017-01-10 17:15:02 +0000 |
commit | 82c1e5cda881e7c9c6074f1769e002945e508d65 (patch) | |
tree | 104c0ad6ec587cbed6da2891c8049662c0c7b2a0 | |
parent | d84ac6ab3451b32aaedc2b497a57c700088d6f6d (diff) | |
download | android_frameworks_opt_net_wifi-82c1e5cda881e7c9c6074f1769e002945e508d65.tar.gz android_frameworks_opt_net_wifi-82c1e5cda881e7c9c6074f1769e002945e508d65.tar.bz2 android_frameworks_opt_net_wifi-82c1e5cda881e7c9c6074f1769e002945e508d65.zip |
DO NOT MERGE: WifiConfigStore: Strip out FT flags in WifiConfiguration
The FT flags are added dynamically to wpa_supplicant. These are not
exposed in the public API's and hence should not be returned in the
configs retrieved by apps. So, strip out the FT flags when reading
network configuration from wpa_supplicant.
Bug: 34095472
Test: Will send for regression testing.
Change-Id: I0d49fb3c98e49207f2faf30d54493f1147924e3b
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigStore.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java index beb3373d2..e4aef24c6 100644 --- a/service/java/com/android/server/wifi/WifiConfigStore.java +++ b/service/java/com/android/server/wifi/WifiConfigStore.java @@ -341,6 +341,8 @@ public class WifiConfigStore { readNetworkBitsetVariable(config.networkId, config.allowedKeyManagement, WifiConfiguration.KeyMgmt.varName, WifiConfiguration.KeyMgmt.strings); + // The FT flags should not be exposed to external apps. + config.allowedKeyManagement = removeFastTransitionFlags(config.allowedKeyManagement); readNetworkBitsetVariable(config.networkId, config.allowedAuthAlgorithms, WifiConfiguration.AuthAlgorithm.varName, WifiConfiguration.AuthAlgorithm.strings); @@ -605,6 +607,13 @@ public class WifiConfigStore { return modifiedFlags; } + private BitSet removeFastTransitionFlags(BitSet keyManagementFlags) { + BitSet modifiedFlags = keyManagementFlags; + modifiedFlags.clear(WifiConfiguration.KeyMgmt.FT_PSK); + modifiedFlags.clear(WifiConfiguration.KeyMgmt.FT_EAP); + return modifiedFlags; + } + /** * Save an entire network configuration to wpa_supplicant. * |