From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 352C2802A8 for ; Fri, 10 Mar 2017 00:56:26 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 10 Mar 2017 00:56:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,139,1486454400"; d="scan'208";a="833074793" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 10 Mar 2017 00:56:25 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 10 Mar 2017 00:56:25 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 10 Mar 2017 00:56:25 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.59]) by shsmsx102.ccr.corp.intel.com ([169.254.2.88]) with mapi id 14.03.0248.002; Fri, 10 Mar 2017 16:56:21 +0800 From: "Ni, Ruiyu" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Fu, Siyuan" , "Wu, Jiaxin" , "Gao, Liming" Thread-Topic: [edk2] [Patch] MdePkg/UefiDevicePathLib: Fix the wrong MAC address length Thread-Index: AQHSmWoybXj7Bo/bfEiF6criCXiAUaGNxUHA Date: Fri, 10 Mar 2017 08:56:21 +0000 Deferred-Delivery: Fri, 10 Mar 2017 08:56:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B8C6658@SHSMSX104.ccr.corp.intel.com> References: <1489128443-108752-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1489128443-108752-1-git-send-email-jiaxin.wu@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdePkg/UefiDevicePathLib: Fix the wrong MAC address length X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2017 08:56:26 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Jiaxin Wu > Sent: Friday, March 10, 2017 2:47 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Ye, Ting ; Fu, Siy= uan > ; Wu, Jiaxin ; Gao, Liming > > Subject: [edk2] [Patch] MdePkg/UefiDevicePathLib: Fix the wrong MAC > address length >=20 > Network interface type should be checked before the conversion between > text device path node and MAC device path. Otherwise, the MAC text string > can't be converted to the representation of a device node, which leads to > the series failure of network HII configuration(e.g. IP, VLAN, HTTP Boot > configuration in Network Device List). >=20 > Cc: Liming Gao > Cc: Ruiyu Ni > Cc: Ye Ting > Cc: Fu Siyuan > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Wu Jiaxin > --- > MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c > b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c > index ae38859..a52cbef 100644 > --- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c > +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c > @@ -1798,10 +1798,14 @@ DevPathFromTextMAC ( > ); >=20 > MACDevPath->IfType =3D (UINT8) Strtoi (IfTypeStr); >=20 > Length =3D sizeof (EFI_MAC_ADDRESS); > + if (MACDevPath->IfType =3D=3D 0x01 || MACDevPath->IfType =3D=3D 0x00) = { > + Length =3D 6; > + } > + > StrHexToBytes (AddressStr, Length * 2, MACDevPath->MacAddress.Addr, > Length); >=20 > return (EFI_DEVICE_PATH_PROTOCOL *) MACDevPath; > } >=20 > -- > 1.9.5.msysgit.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel