From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: Two or more type TXT spf records found.) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=ting.ye@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 E144121109FFE for ; Fri, 31 Aug 2018 01:56:10 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2018 01:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,309,1531810800"; d="scan'208";a="76978029" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 31 Aug 2018 01:56:03 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 31 Aug 2018 01:56:02 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 31 Aug 2018 01:56:02 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by shsmsx102.ccr.corp.intel.com ([169.254.2.226]) with mapi id 14.03.0319.002; Fri, 31 Aug 2018 16:56:00 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" , "Wu, Jiaxin" Thread-Topic: [edk2] [Patch] MdeModulePkg/Ip4Dxe: Sync the direct route entry setting. Thread-Index: AQHUQMzpOUHTrFk2jk2EEL8sbKZ8C6TZjydA Date: Fri, 31 Aug 2018 08:56:00 +0000 Message-ID: References: <20180831014931.7020-1-Jiaxin.wu@intel.com> In-Reply-To: <20180831014931.7020-1-Jiaxin.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg/Ip4Dxe: Sync the direct route entry setting. 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: Fri, 31 Aug 2018 08:56:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ye Ting =20 -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiax= in Wu Sent: Friday, August 31, 2018 9:50 AM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan ; Wu, Jia= xin Subject: [edk2] [Patch] MdeModulePkg/Ip4Dxe: Sync the direct route entry se= tting. This patch is to sync the direct route entry setting in both the default an= d Instance route table {Subnet, Mask, NextHope}. Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin --- .../Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 7 ------- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 13 ++++++++++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeMo= dulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c index c19a72730e..b52542cd84 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c @@ -557,17 +557,10 @@ Ip4Config2SetDefaultAddr ( return Status; } } } =20 - Ip4AddRoute ( - IpSb->DefaultRouteTable, - StationAddress, - SubnetMask, - IP4_ALLZERO_ADDRESS - ); - // // Add a route for the connected network. // Subnet =3D StationAddress & SubnetMask; =20 diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg= /Universal/Network/Ip4Dxe/Ip4Impl.c index 6a26143e30..c68dad7a3c 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -593,10 +593,11 @@ Ip4ConfigProtocol ( IP4_SERVICE *IpSb; IP4_INTERFACE *IpIf; EFI_STATUS Status; IP4_ADDR Ip; IP4_ADDR Netmask; + IP4_ADDR Subnet; EFI_ARP_PROTOCOL *Arp; EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2; EFI_IP4_CONFIG2_POLICY Policy; =20 IpSb =3D IpInstance->Service; @@ -670,14 +671,20 @@ Ip4ConfigProtocol ( =20 InsertTailList (&IpSb->Interfaces, &IpIf->Link); } =20 // - // Add a route to this connected network in the route table + // Add a route to this connected network in the instance route table. // - Ip4AddRoute (IpInstance->RouteTable, Ip, Netmask, IP4_ALLZERO_ADDRESS)= ; - + Subnet =3D Ip & Netmask; + =20 + Ip4AddRoute ( + IpInstance->RouteTable,=20 + Subnet,=20 + Netmask,=20 + IP4_ALLZERO_ADDRESS + ); } else { // // Use the default address. Check the state. // if (IpSb->State =3D=3D IP4_SERVICE_UNSTARTED) { -- 2.17.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel