diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-06 05:16:08 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-06 05:16:08 +0000 |
commit | 07e3550e9ad40806d54261d65123de2628129912 (patch) | |
tree | 8e2686d998fea7aeeb788fa3b7ad0d3d535ce892 | |
parent | 01750eb0aad0510c13da7453fa0c0b64aef0bc72 (diff) | |
download | edk2-platforms-07e3550e9ad40806d54261d65123de2628129912.tar.xz |
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
-rw-r--r-- | MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c | 5 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c index 3e04c0d77e..a61b6acff7 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c @@ -1421,7 +1421,7 @@ DeclineOffer ( OP_PAD
);
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;
@@ -1729,8 +1729,7 @@ TryFinishDORA ( //
DhcpRxBuf = &DHCPV4_ACK_BUFFER;
DHCPV4_OPTIONS_BUFFER.DhcpMessageType.Type = DHCPREQUEST;
- CopyMem (&DHCP_REQ_OPTIONS, &RequestOpEndStr, sizeof (RequestOpEndStr));
-// DHCP_REQ_OPTIONS = RequestOpEndStr;
+ CopyMem (&DHCP_REQ_OPTIONS, &RequestOpEndStr, sizeof (DHCP_REQ_OPTIONS));
DHCP_REQ_OPTIONS.OpReqIP.Ip = *(EFI_IPv4_ADDRESS *) &RxBuf[OfferIx].u.Dhcpv4.yiaddr;
CopyMem (
diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c index 6a42646ab3..b065a53f3a 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c @@ -778,7 +778,7 @@ MtftpListen ( //
do {
if ((SaveReplyLen = ReplyLen) > BufferSize) {
- SaveReplyLen = (UINTN) BufferSize;
+ SaveReplyLen = 0;
}
/* %%TBD - add big block number support */
@@ -1818,8 +1818,10 @@ PxeBcMtftp ( *(PacketSizePtr = &PacketSize) = MAX_TFTP_PKT_SIZE;
}
- if (*PacketSizePtr > *BufferSizePtr) {
- *PacketSizePtr = (UINTN) *BufferSizePtr;
+ if ((*PacketSizePtr > *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) {
|