Actually fall back from yiaddr to ciaddr.
The initial implementation of toDhcpResults attempted to get the leased IP address from ciaddr if yiaddr was 0.0.0.0, but it never actually did so because a) it used == instead of equals(), and b) the parsing code never populated mClientIp for a DhcpOfferPacket or DhcpAckPacket. Fix this and add a test for it.. Technically DHCP does not use ciaddr (only bootp uses it), but in 5.0 we would use ciaddr if yiaddr was 0.0.0.0 and a bit more compatibility shouldn't hurt. Bug: 19704592 Change-Id: I1f58555f0c10b9c576995a6edb759a83d8938ea0
Loading
Please register or sign in to comment