shill doesn't generate unique or stable storage identifiers for cellular devices |
||||||
Issue descriptionshill currently uses 'device_<mac>' as the storage identifier for devices, which assumes the MAC address is a unique identifier available on any device. That assumption is not always true, especially for cellular devices, in the following aspects: (1) A MAC address isn't always available - cellular devices don't necessarily need a MAC address. (2) A MAC address isn't always unique - cellular devices of the same model may have the same default MAC address. (3) The MAC address of a device remains unchanged - Because of (1) and (2), kernel drivers may assign a randomly generated MAC address for a cellular device. It's thus inappropriate to use 'device_<mac>' as the storage identifier for cellular devices, which can lead to unstable identifier (e.g. a cellular device acquires a new storage identifier due to random MAC address assignment on each system boot) and potential (though rare) collisions of storage identifier. For cellular devices, we should use IMEI or MEID (or ESN) instead of MAC address to generate unique storage identifiers.
,
Oct 11 2017
,
Oct 13 2017
,
Oct 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/aosp/platform/system/connectivity/shill/+/14399a2a23fd25b5e320df7521a778f2fe145347 commit 14399a2a23fd25b5e320df7521a778f2fe145347 Author: Ben Chan <benchan@chromium.org> Date: Fri Oct 13 07:26:58 2017 shill: cellular: fix device storage identifier generation Cellular devices don't always have a unique MAC address or even have one. Cellular devices can be assigned a randomly generated MAC address by the kernel. Thus the MAC address is not unique or stable enough to be used in the storage identifier generation. Fortunately, cellular devices have their own unique identifier, such as IMEI for 3GPP devices and MEID for 3GPP2 devices. This CL updates the storage identifier generation for cellular devices to use IMEI or MEID, and fall back to use MAC address if neither IMEI nor MEID is available. BUG= chromium:773859 TEST=Run unit tests. TEST=Test a few cellular devices and verify that shill creates and uses the same device entry in the profile for each cellular device, including the cellular devices with a varying MAC address randomly generated by the kernel. Change-Id: If0a9acb444ae700ca2867f04de5698fd3285643e Reviewed-on: https://chromium-review.googlesource.com/715179 Commit-Ready: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org> Reviewed-by: Eric Caruso <ejcaruso@chromium.org> [modify] https://crrev.com/14399a2a23fd25b5e320df7521a778f2fe145347/device.h [modify] https://crrev.com/14399a2a23fd25b5e320df7521a778f2fe145347/cellular/cellular.cc [modify] https://crrev.com/14399a2a23fd25b5e320df7521a778f2fe145347/cellular/cellular.h [modify] https://crrev.com/14399a2a23fd25b5e320df7521a778f2fe145347/cellular/cellular_unittest.cc
,
Jan 22 2018
,
Jan 23 2018
,
Sep 13
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by benchan@chromium.org
, Oct 11 2017