summaryrefslogtreecommitdiff
path: root/overlayable_hook.py
diff options
context:
space:
mode:
author Xiao Ma <xiaom@google.com> 2023-06-27 16:13:34 +0900
committer Xiao Ma <xiaom@google.com> 2023-07-28 19:09:57 +0900
commite5d7e4abf766633a73d99333bd8b8b83117dd0d1 (patch)
treed9148e9a51f9652cc2952c803af1cf908adb2696 /overlayable_hook.py
parent54c94563e7be2e957175a677df16058b4097e3b2 (diff)
Fix the race between ip reachability and provisioning failure.
Per current implementation an IP provisioning failure event failure from the legacy IpClientCallbacks instance immediately after IP reachability failure event will still trigger wifi disconnection, for example: - IpClient sends onReachabilityFailure callback, wifi receives the callback and posts CMD_IP_REACHABILITY_FAILURE, then returns; - IpClient sends an immediate onProvisioningFailure callback, wifi receives the callback and posts CMD_IP_CONFIGURATION_LOST, then returns; - state machine processes CMD_IP_REACHABILITY_FAILURE first and eventually transition to WaitBeforeL3ProvisioningState and recreates an IpClient instance there. - state machine receives CMD_IP_CONFIGURATION_LOST from message queue at WaitBeforeL3ProvisioningState, but defers the command to its parent state when transition to L3ProvisioningState. - CMD_IP_CONFIGURATION_LOST is processed at L2ConnectedState eventually, and triggers WiFi disconnection there. This patch fixes the race by assoicating an integer token with each IpClientCallbacks instance, check if the posted messages come from the current instance by comparing the token. Bug: 286338765 Test: atest com.android.server.wifi Change-Id: I7002849b97e82f8ed5d4fac662fcf594c5ce5c59
Diffstat (limited to 'overlayable_hook.py')
0 files changed, 0 insertions, 0 deletions