diff options
author | Stefan Roese <sr@denx.de> | 2007-11-13 08:16:40 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2007-11-13 08:16:40 +0100 |
commit | 5c568d6a7f950b9e7e32a63a5893f979b8789b4d (patch) | |
tree | 44ed0fdc0548facecfa35e8d6eedf0616c3ca269 /net | |
parent | 49801028715cd8bc22863cdfc0ee7919b7a6af4b (diff) | |
parent | 992742a5b09d9040adbd156fb90756af66ade310 (diff) | |
download | u-boot-imx-5c568d6a7f950b9e7e32a63a5893f979b8789b4d.zip u-boot-imx-5c568d6a7f950b9e7e32a63a5893f979b8789b4d.tar.gz u-boot-imx-5c568d6a7f950b9e7e32a63a5893f979b8789b4d.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot
Diffstat (limited to 'net')
-rw-r--r-- | net/bootp.c | 14 | ||||
-rw-r--r-- | net/nfs.c | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/net/bootp.c b/net/bootp.c index 749d3e5..55dcc81 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; @@ -977,6 +979,6 @@ void DhcpRequest(void) { BootpRequest(); } -#endif +#endif /* CONFIG_CMD_DHCP */ -#endif +#endif /* CONFIG_CMD_NET */ @@ -405,7 +405,6 @@ rpc_lookup_reply (int prog, uchar *pkt, unsigned len) if (rpc_pkt.u.reply.rstatus || rpc_pkt.u.reply.verifier || - rpc_pkt.u.reply.astatus || rpc_pkt.u.reply.astatus) { return -1; } |