summaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bootp.c')
-rw-r--r--net/bootp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 8aeddb0..f2978a2 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -949,6 +949,7 @@ static void dhcp_send_request_packet(struct bootp_hdr *bp_offer)
net_write_ip(&bp->bp_giaddr, zero_ip);
memcpy(bp->bp_chaddr, net_ethaddr, 6);
+ copy_filename(bp->bp_file, net_boot_file_name, sizeof(bp->bp_file));
/*
* ID is the id of the OFFER packet
@@ -995,6 +996,9 @@ static void dhcp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
debug("DHCPHandler: got DHCP packet: (src=%d, dst=%d, len=%d) state: "
"%d\n", src, dest, len, dhcp_state);
+ if (net_read_ip(&bp->bp_yiaddr).s_addr == 0)
+ return;
+
switch (dhcp_state) {
case SELECTING:
/*