Sync one bug on PxeBC module from R8.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3782 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2007-09-06 05:16:08 +00:00
parent 01750eb0aa
commit 07e3550e9a
2 changed files with 7 additions and 6 deletions

View File

@ -1421,7 +1421,7 @@ DeclineOffer (
OP_PAD OP_PAD
); );
DHCPDECLINEoptions.DhcpMessageType.Type = DHCPDECLINE; DHCPDECLINEoptions.DhcpMessageType.Type = DHCPDECLINE;
CopyMem (&DHCPDECLINEoptions.OpDeclineEnd, &DHCP_REQ_OPTIONS, sizeof (struct requestopendstr)); CopyMem (&DHCPDECLINEoptions.OpDeclineEnd, &DHCP_REQ_OPTIONS, sizeof (DHCPDECLINEoptions.OpDeclineEnd));
{ {
EFI_IP_ADDRESS TmpIp; EFI_IP_ADDRESS TmpIp;
@ -1729,8 +1729,7 @@ TryFinishDORA (
// //
DhcpRxBuf = &DHCPV4_ACK_BUFFER; DhcpRxBuf = &DHCPV4_ACK_BUFFER;
DHCPV4_OPTIONS_BUFFER.DhcpMessageType.Type = DHCPREQUEST; DHCPV4_OPTIONS_BUFFER.DhcpMessageType.Type = DHCPREQUEST;
CopyMem (&DHCP_REQ_OPTIONS, &RequestOpEndStr, sizeof (RequestOpEndStr)); CopyMem (&DHCP_REQ_OPTIONS, &RequestOpEndStr, sizeof (DHCP_REQ_OPTIONS));
// DHCP_REQ_OPTIONS = RequestOpEndStr;
DHCP_REQ_OPTIONS.OpReqIP.Ip = *(EFI_IPv4_ADDRESS *) &RxBuf[OfferIx].u.Dhcpv4.yiaddr; DHCP_REQ_OPTIONS.OpReqIP.Ip = *(EFI_IPv4_ADDRESS *) &RxBuf[OfferIx].u.Dhcpv4.yiaddr;
CopyMem ( CopyMem (

View File

@ -778,7 +778,7 @@ MtftpListen (
// //
do { do {
if ((SaveReplyLen = ReplyLen) > BufferSize) { if ((SaveReplyLen = ReplyLen) > BufferSize) {
SaveReplyLen = (UINTN) BufferSize; SaveReplyLen = 0;
} }
/* %%TBD - add big block number support */ /* %%TBD - add big block number support */
@ -1818,8 +1818,10 @@ PxeBcMtftp (
*(PacketSizePtr = &PacketSize) = MAX_TFTP_PKT_SIZE; *(PacketSizePtr = &PacketSize) = MAX_TFTP_PKT_SIZE;
} }
if (*PacketSizePtr > *BufferSizePtr) { if ((*PacketSizePtr > *BufferSizePtr) &&
*PacketSizePtr = (UINTN) *BufferSizePtr; (Operation != EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE) &&
(Operation != EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE)) {
*PacketSizePtr = MAX ((UINTN) *BufferSizePtr, MIN_TFTP_PKT_SIZE);
} }
if (*PacketSizePtr < MIN_TFTP_PKT_SIZE) { if (*PacketSizePtr < MIN_TFTP_PKT_SIZE) {