Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e419da7d authored by Xiao Ma's avatar Xiao Ma Committed by Lorenzo Colitti
Browse files

Notify IpClient DHCP process success when entering DHCP Bound State.

After introducing IP address conflict detection mechanism, we might get
an duplicated IP address though the DHCP handshake, it's not appropriate
to notify IpClient that DHCP success and configure interface with this IP
address immediately. However, Bound State ensures that we have already
done DAD (if enabled) and IP address has been configured on the interface.
More reasonable to notify IpClient DHCP success when entering Bound state.

This CL does not change the behaviour of a successful transaction.
The call graph is:

- notifySuccess
  - acceptDhcpResults
    - when receiving an ACK in DhcpReacquiringState
      - next action: transition to DhcpBoundState
    - called from confirmDhcpLease
      - when receiving a rapid commit ACK in DhcpInitState
        - next action: ConfiguringInterfaceState
          - next action: configure link address, then transition to DhcpBoundState
      - when receiving an ACK in DhcpRequestingState
        - next action: ConfiguringInterfaceState
          - next action: configure link address, then transition to DhcpBoundState

This CL does change the behaviour of failed transactions. For example,
if configuring the IP address or opening the UDP socket fails, after
this CL, the client will no longer notify success. This is more correct.

Bug: 130775067
Test: atest NetworkStackTests NetworkStackIntegrationTests
Change-Id: Ie3b5edd8ddf04aac258b97ecaa291fcb25611bbd
parent d53b4053
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment