mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[dhcp] Allow use of custom reallocation functions for DHCP option blocks
Allow functions other than realloc() to be used to reallocate DHCP option block data, and specify the reallocation function at the time of calling dhcpopt_init(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
+2
-1
@@ -267,7 +267,8 @@ void dhcppkt_init ( struct dhcp_packet *dhcppkt, struct dhcphdr *data,
|
||||
ref_init ( &dhcppkt->refcnt, NULL );
|
||||
dhcppkt->dhcphdr = data;
|
||||
dhcpopt_init ( &dhcppkt->options, &dhcppkt->dhcphdr->options,
|
||||
( len - offsetof ( struct dhcphdr, options ) ) );
|
||||
( len - offsetof ( struct dhcphdr, options ) ),
|
||||
dhcpopt_no_realloc );
|
||||
settings_init ( &dhcppkt->settings,
|
||||
&dhcppkt_settings_operations, &dhcppkt->refcnt, 0 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user