When the firmware has cached a DHCP reply, bootp() requests the cached
address (INIT-REBOOT) and falls back to DISCOVER if that fails. A
DHCPNAK was ignored like any other unexpected reply, though, and a server
with no record of the client must stay silent (RFC 2131 § 4.3.2), so
either way the loader retransmitted for MAXWAIT (300 seconds) before
falling back. That is as long as the UEFI boot watchdog, so a netbooted
loader.efi hung after the console banner until the firmware reset the
machine.
Treat a NAK as the end of the exchange and give INIT-REBOOT 10 seconds
to be answered. The fallback message now says which of the two
happened. A NAK of the REQUEST that follows an OFFER now also ends
bootp() at once instead of after MAXWAIT.
Fixes: 88229544807f ("stand: Cleanup use of cached DHCP response packet")
Sponsored by: Rubicon Communications, LLC ("Netgate")