NetworkPkg/Mtftp6Dxe: Correct the total received and saved block number.

The block returned from Mtftp6RemoveBlockNum is not the total received and
saved block number if it works in passive (Slave) mode.

The issue was exposed by the EMS test.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
This commit is contained in:
Jiaxin Wu
2018-10-25 15:16:13 +08:00
parent 9202304c18
commit 2f6693c283
5 changed files with 28 additions and 18 deletions

View File

@@ -153,7 +153,7 @@ Mtftp6WrqHandleAck (
{
UINT16 AckNum;
INTN Expected;
UINT64 TotalBlock;
UINT64 BlockCounter;
*IsCompleted = FALSE;
AckNum = NTOHS (Packet->Ack.Block[0]);
@@ -172,9 +172,9 @@ Mtftp6WrqHandleAck (
//
// Remove the acked block number, if this is the last block number,
// tell the Mtftp6WrqInput to finish the transfer. This is the last
// block number if the block range are empty..
// block number if the block range are empty.
//
Mtftp6RemoveBlockNum (&Instance->BlkList, AckNum, *IsCompleted, &TotalBlock);
Mtftp6RemoveBlockNum (&Instance->BlkList, AckNum, *IsCompleted, &BlockCounter);
Expected = Mtftp6GetNextBlockNum (&Instance->BlkList);