aboutsummaryrefslogtreecommitdiff
path: root/src/net/fakedhcp.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2009-01-23 01:13:50 +0000
committerMichael Brown <mcb30@etherboot.org>2009-01-23 01:13:50 +0000
commit76d05a4da0184aea77ba8ca49062a2b26cbbebf4 (patch)
tree61be19227c8ac2d92da5f9e375b3c1e09eca0ce6 /src/net/fakedhcp.c
parentcf539989010741c4e0fb796fc796829b21265193 (diff)
downloadipxe-76d05a4da0184aea77ba8ca49062a2b26cbbebf4.zip
ipxe-76d05a4da0184aea77ba8ca49062a2b26cbbebf4.tar.gz
ipxe-76d05a4da0184aea77ba8ca49062a2b26cbbebf4.tar.bz2
[dhcp] Pass PXE boot menu item to PXE Boot Server
Pick out the first boot menu item from the boot menu (option 43.9) and pass it to the boot server as the boot menu item (option 43.71). Also improve DHCP debug messages to include more details of the packets being transmitted.
Diffstat (limited to 'src/net/fakedhcp.c')
-rw-r--r--src/net/fakedhcp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/fakedhcp.c b/src/net/fakedhcp.c
index d9ae36c..2fb08c6 100644
--- a/src/net/fakedhcp.c
+++ b/src/net/fakedhcp.c
@@ -108,11 +108,12 @@ static int copy_settings ( struct dhcp_packet *dest,
int create_fakedhcpdiscover ( struct net_device *netdev,
void *data, size_t max_len ) {
struct dhcp_packet dhcppkt;
- struct in_addr ciaddr = { 0 };
+ struct in_addr dummy_addr = { 0 };
int rc;
- if ( ( rc = dhcp_create_request ( &dhcppkt, netdev, ciaddr, NULL, data,
- max_len ) ) != 0 ) {
+ if ( ( rc = dhcp_create_request ( &dhcppkt, netdev, DHCPDISCOVER,
+ dummy_addr, dummy_addr, dummy_addr,
+ NULL, data, max_len ) ) != 0 ) {
DBG ( "Could not create DHCPDISCOVER: %s\n",
strerror ( rc ) );
return rc;