]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[pxe] Ensure cached DHCPACK is retrieved prior to network device creation
authorMichael Brown <mcb30@ipxe.org>
Fri, 8 Nov 2013 12:45:22 +0000 (12:45 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 8 Nov 2013 12:45:22 +0000 (12:45 +0000)
commitc3d1e7869731c8cccb041ce05ee0ebbb3dc375d5
tree83db0c631943bfec85a0062a86ebb29308ffa02c
parent43eba2f555e2a2ed0fbedeeda73dd1720437fd97
[pxe] Ensure cached DHCPACK is retrieved prior to network device creation

The retrieval of the cached DHCPACK and the creation of network
devices are both currently scheduled as STARTUP_NORMAL.  It is
therefore possible that the cached DHCPACK will not be retrieved in
time for cachedhcp_probe() to apply it to the relevant network device.

Fix by retrieving the cached DHCPACK at initialisation time rather
than at startup time.

As an optimisation, an unclaimed cached DHCPACK can be freed
immediately after the last network device has been created, rather
than waiting until shutdown.

Reported-by: Espen Braastad <espen.braastad@redpill-linpro.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/core/cachedhcp.c