From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2DA4321A09130 for ; Sun, 4 Nov 2018 22:58:36 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2018 22:58:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,467,1534834800"; d="scan'208";a="103448703" Received: from jiaxinwu-mobl.ccr.corp.intel.com ([10.239.192.152]) by fmsmga004.fm.intel.com with ESMTP; 04 Nov 2018 22:58:34 -0800 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Ye Ting , Fu Siyuan , Wu Jiaxin Date: Mon, 5 Nov 2018 14:58:29 +0800 Message-Id: <20181105065830.16192-1-Jiaxin.wu@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 Subject: [PATCH v1] MdeModulePkg/Mtftp4Dxe: Fix invalid configuration of MTFTP local port. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2018 06:58:36 -0000 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 Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin --- MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index f442e6d7ac..793ad77b1e 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -309,11 +309,11 @@ Mtftp4ConfigUnicastPort ( UdpConfig.ReceiveTimeout = 0; UdpConfig.TransmitTimeout = 0; 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); IP4_COPY_ADDRESS (&UdpConfig.RemoteAddress, &Ip); -- 2.17.1.windows.2