diff options
author | Wolfgang Denk <wd@denx.de> | 2009-06-15 11:15:54 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-06-15 11:15:54 +0200 |
commit | c9005a72fee4231e30fe93c1741cea2342c54504 (patch) | |
tree | 50ae6edb28698df98211f99a8178f06a8b7ab50f /net/bootp.c | |
parent | 9ff67e5e4c719556d57f136a6453f8e4798d85c0 (diff) | |
parent | 60f61e6d7655400bb785a2ef637581679941f6d1 (diff) | |
download | u-boot-imx-c9005a72fee4231e30fe93c1741cea2342c54504.zip u-boot-imx-c9005a72fee4231e30fe93c1741cea2342c54504.tar.gz u-boot-imx-c9005a72fee4231e30fe93c1741cea2342c54504.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'net/bootp.c')
-rw-r--r-- | net/bootp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bootp.c b/net/bootp.c index 3dea70aa..77057c6 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -687,7 +687,7 @@ BootpRequest (void) * Calculate proper packet lengths taking into account the * variable size of the options field */ - pktlen = BOOTP_SIZE - sizeof(bp->bp_vend) + ext_len; + pktlen = ((int)(pkt-NetTxPacket)) + BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + ext_len; iplen = BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + ext_len; NetSetIP(iphdr, 0xFFFFFFFFL, PORT_BOOTPS, PORT_BOOTPC, iplen); NetSetTimeout(SELECT_TIMEOUT, BootpTimeout); @@ -860,7 +860,7 @@ static void DhcpSendRequestPkt(Bootp_t *bp_offer) NetCopyIP(&OfferedIP, &bp_offer->bp_yiaddr); extlen = DhcpExtended((u8 *)bp->bp_vend, DHCP_REQUEST, NetDHCPServerIP, OfferedIP); - pktlen = BOOTP_SIZE - sizeof(bp->bp_vend) + extlen; + pktlen = ((int)(pkt-NetTxPacket)) + BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + extlen; iplen = BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + extlen; NetSetIP(iphdr, 0xFFFFFFFFL, PORT_BOOTPS, PORT_BOOTPC, iplen); |