summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2020-04-09 16:41:30 -0700
committerRoshan Pius <rpius@google.com>2020-04-11 04:38:48 +0000
commit88624ac099ce8ecc04d05e59294a5900479e49e1 (patch)
treeb0b30da6eccf6c2cd5611e0f010e6a7206340a38 /libs
parentb69b89ff86db7b3e9f4263e7bb7fb48dba69832a (diff)
NetworkListStoreData: Fix badly formed WifiConfiguration
The network config created by the app_XXX in the associated bug had preSharedKey set, but did not have KeyMgmt.WPA_PSK bit set. It instead had a KeyMgmt.OSEN bit set (which is not even public, so not sure why the app is setting that). The user has a saved network with the same SSID in the XML file. So it looks like the app tried to add the same network back for some reason, but it had the wrong bits set in KeyMgmt. So, we ended up creating a different network with configKey set to "SSID"NONE. This was stored in the XML file, but when the user upgraded to a build containing ag/10449860, the calculated configKey became "SSID"OSEN which did not match the configKey stored in the XML file. Hence the parsing logic errored out. 2 fixes added: a) Add a generic correction logic in XML file parsing logic to reset the KeyMgmt to WPA_PSK if it detects a preSharedKey, but KeyMgmt not set appropriately. b) Apply the same fix in validate() method. We could have error'ed out here because it is an invalid WifiConfiguration. But, fixing in-place will avoid a lot of app compatibility issues. Bug: 153435438 Test: atest com.android.server.wifi Change-Id: Idc864d3a9205337f0ebeb6f1057a723f2e6ea36f
Diffstat (limited to 'libs')
0 files changed, 0 insertions, 0 deletions