Correctly time out CMD_START_DHCP.
WifiStateMachine expects CMD_START_DHCP to time out after 30-40 seconds. Currently, DhcpClient imposes timeouts on DhcpInitState and on DhcpRequestState, but not on the time it takes to get to from CMD_START_DHCP to DhcpBoundState. So in theory the client could oscillate between DhcpInitState and DhcpRequestState and never time out. Fix this by introducing a new oneshot timer that is set when DHCP starts and is cancelled when it succeeds. CMD_RENEW_DHCP does not need this because it's implemented using only one state, so the oneshot timeout can be implemented using the state timeout. Bug: 19704592 Change-Id: I6a5847a3dee23a2692237b8f3b3b0f8049da5140
Loading
Please register or sign in to comment