summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
diff options
context:
space:
mode:
authorhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-01 09:08:33 +0000
committerhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-01 09:08:33 +0000
commit49fd66cbf8144802976b727fcb541a185f73daf3 (patch)
tree661d5c349a4febc91fa6201bcef227d202ed9624 /MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
parent7f97c9bb52c5938f841c396b60a41f05eba8640c (diff)
downloadedk2-platforms-49fd66cbf8144802976b727fcb541a185f73daf3.tar.xz
Fix a bug that mtftp4 driver reply 2 ACK in answer to incoming No.65535 block data. That issue incurs incorrect network transfer.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10619 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c')
-rw-r--r--MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
index 4dcdf827ea..bb4ce0ae65 100644
--- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
+++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
@@ -158,6 +158,7 @@ Mtftp4SetLastBlockNum (
@param Head The block range list to remove from
@param Num The block number to remove
+ @param Completed Whether Num is the last block number
@param TotalBlock The continuous block number in all
@retval EFI_NOT_FOUND The block number isn't in the block range list
@@ -169,6 +170,7 @@ EFI_STATUS
Mtftp4RemoveBlockNum (
IN LIST_ENTRY *Head,
IN UINT16 Num,
+ IN BOOLEAN Completed,
OUT UINT64 *TotalBlock
)
{
@@ -229,7 +231,7 @@ Mtftp4RemoveBlockNum (
Range->Round ++;
}
- if (Range->Start > Range->End) {
+ if ((Range->Start > Range->End) || Completed) {
RemoveEntryList (&Range->Link);
FreePool (Range);
}