dhcpcd: Track and validate disputed addresses

Keep track of whether we have received a NAK response.  If we
accept an ACK shortly after a NAK, although we accept this
address, it must be more carefully evaluated by using the "ARP
for self" method.  If this method succeeds, the system should
proceed as normal (either doing a gateway ARP or sending the
success notification via D-Bus).

Moreover, if the "ARP self" method fails, it will DECLINE the
lease and restart the DHCP process.  When examining any messages
from the DHCP server in this restarted session, ignore the
first OFFER if it is for the previously declined IP address.
In scenarios where there may be more than one conflicting DHCP
server on the network, this allows the possibility to accept
a more viable offer.

BUG=chromium:384897
TEST=New network_DhcpNak test subcase in CL:208248

Change-Id: Idf1aa74f68186136d0f9b080f04f6995ee02d322
Reviewed-on: https://chromium-review.googlesource.com/208273
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2 files changed