summaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2007-11-02 15:22:01 -0500
committerJon Loeliger <jdl@freescale.com>2007-11-02 15:22:01 -0500
commit3cac27c1d40b151f295dcfdb514fa928732e4ecf (patch)
tree5dbc1813bfa548e8d31879c39c075bfdcbbf8f86 /net/bootp.c
parent3c89d75409eb26639d36dfa11d4ee3d8b962dc3c (diff)
parente60adeac2d8fa30258e1706bb342a3363526e8d7 (diff)
downloadu-boot-imx-3cac27c1d40b151f295dcfdb514fa928732e4ecf.zip
u-boot-imx-3cac27c1d40b151f295dcfdb514fa928732e4ecf.tar.gz
u-boot-imx-3cac27c1d40b151f295dcfdb514fa928732e4ecf.tar.bz2
Merge commit 'remotes/wd/master'
Diffstat (limited to 'net/bootp.c')
-rw-r--r--net/bootp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 749d3e5..cfe6f8d 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -850,9 +850,9 @@ static void DhcpSendRequestPkt(Bootp_t *bp_offer)
bp->bp_hlen = HWL_ETHER;
bp->bp_hops = 0;
bp->bp_secs = htons(get_timer(0) / CFG_HZ);
- NetCopyIP(&bp->bp_ciaddr, &bp_offer->bp_ciaddr); /* both in network byte order */
- NetCopyIP(&bp->bp_yiaddr, &bp_offer->bp_yiaddr);
- NetCopyIP(&bp->bp_siaddr, &bp_offer->bp_siaddr);
+ /* Do not set the client IP, your IP, or server IP yet, since it hasn't been ACK'ed by
+ * the server yet */
+
/*
* RFC3046 requires Relay Agents to discard packets with
* nonzero and offered giaddr
@@ -870,7 +870,9 @@ static void DhcpSendRequestPkt(Bootp_t *bp_offer)
/*
* Copy options from OFFER packet if present
*/
- NetCopyIP(&OfferedIP, &bp->bp_yiaddr);
+
+ /* Copy offered IP into the parameters request list */
+ NetCopyIP(&OfferedIP, &bp_offer->bp_yiaddr);
extlen = DhcpExtended((u8 *)bp->bp_vend, DHCP_REQUEST, NetDHCPServerIP, OfferedIP);
pktlen = BOOTP_SIZE - sizeof(bp->bp_vend) + extlen;
@@ -980,3 +982,4 @@ void DhcpRequest(void)
#endif
#endif
+