summaryrefslogtreecommitdiffstats
path: root/src/net/dhcppkt.c
diff options
context:
space:
mode:
authorMichael Brown2011-01-11 00:58:11 +0100
committerMichael Brown2011-01-11 22:24:40 +0100
commit17b6a3c506d94b8dc8bdae89828bac20ef56b1ef (patch)
tree68e953fe63ac12df77198e1c80de0ba8d45da881 /src/net/dhcppkt.c
parent[dhcp] Rename length fields for DHCP options (diff)
downloadipxe-17b6a3c506d94b8dc8bdae89828bac20ef56b1ef.tar.gz
ipxe-17b6a3c506d94b8dc8bdae89828bac20ef56b1ef.tar.xz
ipxe-17b6a3c506d94b8dc8bdae89828bac20ef56b1ef.zip
[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>
Diffstat (limited to 'src/net/dhcppkt.c')
-rw-r--r--src/net/dhcppkt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/dhcppkt.c b/src/net/dhcppkt.c
index e043bb5d..237c3e2c 100644
--- a/src/net/dhcppkt.c
+++ b/src/net/dhcppkt.c
@@ -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 );
}