X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FMtftp4Dxe%2FMtftp4Impl.c;h=70bd693e4e3a6f172a543421a850e10cf5bebd1d;hp=03903640b8b61eaf29a53c3ea7381ab44c342586;hb=9d510e61fceee7b92955ef9a3c20343752d8ce3f;hpb=12ae56cf28d6a435f39a7c9c3a97185baf76f005 diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index 03903640b8..70bd693e4e 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -3,13 +3,7 @@ (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php
- -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -80,6 +74,9 @@ Mtftp4CleanOperation ( Instance->Operation = 0; Instance->BlkSize = MTFTP4_DEFAULT_BLKSIZE; + Instance->WindowSize = 1; + Instance->TotalBlock = 0; + Instance->AckedBlock = 0; Instance->LastBlock = 0; Instance->ServerIp = 0; Instance->ListeningPort = 0; @@ -308,7 +305,7 @@ Mtftp4ConfigUnicastPort ( UdpConfig.UseDefaultAddress = Config->UseDefaultSetting; IP4_COPY_ADDRESS (&UdpConfig.StationAddress, &Config->StationIp); IP4_COPY_ADDRESS (&UdpConfig.SubnetMask, &Config->SubnetMask); - UdpConfig.StationPort = 0; + UdpConfig.StationPort = Config->LocalPort; UdpConfig.RemotePort = 0; Ip = HTONL (Instance->ServerIp); @@ -428,6 +425,7 @@ Mtftp4Start ( Token->OptionList, Token->OptionCount, TRUE, + Instance->Operation, &Instance->RequestOption ); @@ -443,6 +441,7 @@ Mtftp4Start ( Config = &Instance->Config; Instance->Token = Token; Instance->BlkSize = MTFTP4_DEFAULT_BLKSIZE; + Instance->WindowSize = MTFTP4_DEFAULT_WINDOWSIZE; CopyMem (&Instance->ServerIp, &Config->ServerIp, sizeof (IP4_ADDR)); Instance->ServerIp = NTOHL (Instance->ServerIp);