summaryrefslogtreecommitdiffstats
path: root/src/net/udp
diff options
context:
space:
mode:
authorMichael Brown2008-03-21 23:55:59 +0100
committerMichael Brown2008-03-21 23:55:59 +0100
commita462c96ffc1e7d378c783823f768a47d323dd210 (patch)
tree3b4dc63908ea6535b454be3e2af041782c0353ef /src/net/udp
parent[Settings] Migrate DHCP and NVO code to the new settings API (untested) (diff)
downloadipxe-a462c96ffc1e7d378c783823f768a47d323dd210.tar.gz
ipxe-a462c96ffc1e7d378c783823f768a47d323dd210.tar.xz
ipxe-a462c96ffc1e7d378c783823f768a47d323dd210.zip
[Settings] DHCP is now working using the new settings API.
Diffstat (limited to 'src/net/udp')
-rw-r--r--src/net/udp/dhcp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 624532d2c..28f7e1d79 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -175,7 +175,7 @@ static int create_dhcp_packet ( struct dhcp_packet *dhcppkt,
}
dhcphdr->hlen = hlen;
memcpy ( dhcphdr->chaddr, netdev->ll_addr, hlen );
- memcpy ( dhcphdr->options, options, options_len );
+ memcpy ( dhcphdr->options, options->data, options_len );
/* Initialise DHCP packet structure and settings interface */
dhcppkt_init ( dhcppkt, NULL, data, max_len );
@@ -258,9 +258,10 @@ int create_dhcp_request ( struct dhcp_packet *dhcppkt,
"option: %s\n", strerror ( rc ) );
return rc;
}
- if ( ( rc = copy_setting ( &dhcppkt->settings, DHCP_EB_YIADDR,
+ if ( ( rc = copy_setting ( &dhcppkt->settings,
+ DHCP_REQUESTED_ADDRESS,
offer_settings,
- DHCP_REQUESTED_ADDRESS ) ) != 0 ) {
+ DHCP_EB_YIADDR ) ) != 0 ) {
DBG ( "DHCP could not set requested address "
"option: %s\n", strerror ( rc ) );
return rc;