Fix miss tracking downstream problem in PrivateAddressCoordinator
The downstream do not be tracked if PrivateAddressCoordinator just return cached address. Then, PrivateAddressCoordinator would not notify that downstream if conflict happen. Also remove the null check in getDownstreamPrefix because: - An IpServer is only added to mDownstreams by requestDownstreamAddress. - That method will only add the IpServer to mDownstreams if it has an IPv4 address. - As soon as that method returns, the IpServer sets mIpv4Address to the address that was returned. - When an IpServer is torn down, mIpv4Address is set to null after releaseDownstream is called. So it should never be possible for this to return null. Bug: 168169687 Test: atest CtsTetheringTest atest TetheringTests Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459887 Change-Id: I4b4d75c8a4f1de07aa7bb68b12d150d7c85c9cc1 Merged-In: Ide5206b013acdc499344e1c839a830c5b245af41 (cherry picked from commit 335c9c52)
Loading
Please register or sign in to comment