diff options
author | Wolfgang Denk <wd@denx.de> | 2007-11-02 15:09:10 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-11-02 15:09:10 +0100 |
commit | f0516920f6e048425b005c049378e80d600bd268 (patch) | |
tree | 8038bb6bc203daf2ad4a9aa4d2e246f10f12a7c1 /net | |
parent | 5b746c3ea8c72035621435853d5b5278af0a1011 (diff) | |
parent | 8b6684a698500be9c142ec2c9f46cfc348e17f0c (diff) | |
download | u-boot-imx-f0516920f6e048425b005c049378e80d600bd268.zip u-boot-imx-f0516920f6e048425b005c049378e80d600bd268.tar.gz u-boot-imx-f0516920f6e048425b005c049378e80d600bd268.tar.bz2 |
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'net')
-rw-r--r-- | net/bootp.c | 11 |
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 + |