]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Mtftp4Dxe: Fix invalid configuration of MTFTP local port.
authorJiaxin Wu <Jiaxin.wu@intel.com>
Mon, 5 Nov 2018 06:46:57 +0000 (14:46 +0800)
committerJiaxin Wu <Jiaxin.wu@intel.com>
Tue, 6 Nov 2018 07:22:35 +0000 (15:22 +0800)
This patch is to fix the invalid setting of MTFTP local port. The
issue can be reproduced by tftp shell command by using [-l port]
option.

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: Fu Siyuan <siyuan.fu@intel.com>
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c

index f442e6d7acd93971df5744ab662d65841c045010..793ad77b1eef09ae3814a5ac3b0a20ecf912e92e 100644 (file)
@@ -311,7 +311,7 @@ Mtftp4ConfigUnicastPort (
   UdpConfig.UseDefaultAddress  = Config->UseDefaultSetting;\r
   IP4_COPY_ADDRESS (&UdpConfig.StationAddress, &Config->StationIp);\r
   IP4_COPY_ADDRESS (&UdpConfig.SubnetMask, &Config->SubnetMask);\r
-  UdpConfig.StationPort        = 0;\r
+  UdpConfig.StationPort        = Config->LocalPort;\r
   UdpConfig.RemotePort         = 0;\r
 \r
   Ip = HTONL (Instance->ServerIp);\r