From 6c907ce8d12b9f410b46700cda91acb8e7c15d76 Mon Sep 17 00:00:00 2001 From: likewise Date: Thu, 1 May 2003 08:00:41 +0000 Subject: [PATCH] Patch #1308. Still disabled, as it needs to make sure no file field is not overloaded. --- src/core/dhcp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/core/dhcp.c b/src/core/dhcp.c index 47d4ef98..5292fa79 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -442,6 +442,20 @@ static void dhcp_handle_ack(struct netif *netif) /* (y)our internet address */ ip_addr_set(&dhcp->offered_ip_addr, &dhcp->msg_in->yiaddr); +/** + * Patch #1308 + * TODO: we must check if the file field is not overloaded by DHCP options! + */ +#if 0 + /* boot server address */ + ip_addr_set(&dhcp->offered_si_addr, &dhcp->msg_in->siaddr); + /* boot file name */ + if (dhcp->msg_in->file[0]) { + dhcp->boot_file_name = mem_malloc(strlen(dhcp->msg_in->file) + 1); + strcpy(dhcp->boot_file_name, dhcp->msg_in->file); + } +#endif + /* subnet mask */ option_ptr = dhcp_get_option_ptr(dhcp, DHCP_OPTION_SUBNET_MASK); /* subnet mask given? */