]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[cachedhcp] Retain cached DHCPACK after startup if not already consumed 844/head
authorMichael Brown <mcb30@ipxe.org>
Thu, 22 Dec 2022 15:12:34 +0000 (15:12 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 22 Dec 2022 15:12:34 +0000 (15:12 +0000)
commit7147532c3fbf9a7061e74549f6f920a91ca9a80d
treeb94bdf57d6379b8a4ac11c09fbb7247e88701f09
parent60b5532cfc1393a8d34cece1b49f953bd72c303c
[cachedhcp] Retain cached DHCPACK after startup if not already consumed

We currently free an unclaimed cached DHCPACK immediately after
startup, in order to free up memory.  This prevents the cached DHCPACK
from being applied to a device that is created after startup, such as
a VLAN device created via the "vcreate" command.

Retain any unclaimed DHCPACK after startup to allow it to be matched
against (and applied to) any device that gets created at runtime.
Free the DHCPACK during shutdown if it still remains unclaimed, in
order to exit with memory cleanly freed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/cachedhcp.c