From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org 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 1A8F22214E320 for ; Tue, 12 Dec 2017 17:34:52 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2017 17:39:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,395,1508828400"; d="scan'208";a="183702636" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 12 Dec 2017 17:39:30 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 12 Dec 2017 17:39:29 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 12 Dec 2017 17:39:29 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Wed, 13 Dec 2017 09:39:27 +0800 From: "Fu, Siyuan" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , Karunakar P Thread-Topic: [Patch 2/2] NetworkPkg/Dhcp6Dxe: Check Media status before starting DHCP process. Thread-Index: AQHTan/ZgGOCRv9c3EyOCf/R8rpxzKNAkWYA Date: Wed, 13 Dec 2017 01:39:27 +0000 Message-ID: References: <1512117526-11308-1-git-send-email-jiaxin.wu@intel.com> <1512117526-11308-3-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1512117526-11308-3-git-send-email-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGY3NGM3MDUtZWJlNy00Y2YxLTk0MDYtN2MwM2ZjZGRkNDVhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJEclNlQVlodEVaaTEzQ1hVTUlhYlg0bkZPUTd2aGZVbERlTU1PUVVzVEFDRnR0Y0IzTmJnYmVjQ0QxZUd3aWZKIn0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 2/2] NetworkPkg/Dhcp6Dxe: Check Media status before starting DHCP process. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 01:34:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Fu Siyuan > -----Original Message----- > From: Wu, Jiaxin > Sent: Friday, December 1, 2017 4:39 PM > To: edk2-devel@lists.01.org > Cc: Ye, Ting ; Fu, Siyuan ; > Karunakar P ; Wu, Jiaxin > Subject: [Patch 2/2] NetworkPkg/Dhcp6Dxe: Check Media status before > starting DHCP process. >=20 > Cc: Ye Ting > Cc: Fu Siyuan > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Karunakar P > Signed-off-by: Wu Jiaxin > --- > NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) >=20 > diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c > b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c > index d8c0ad0..1107865 100644 > --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c > +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c > @@ -1,9 +1,9 @@ > /** @file > This EFI_DHCP6_PROTOCOL interface implementation. >=20 > - Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
> + Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
>=20 > 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. > @@ -74,10 +74,11 @@ EfiDhcp6Start ( > { > EFI_STATUS Status; > EFI_TPL OldTpl; > DHCP6_INSTANCE *Instance; > DHCP6_SERVICE *Service; > + BOOLEAN MediaPresent; >=20 > if (This =3D=3D NULL) { > return EFI_INVALID_PARAMETER; > } >=20 > @@ -99,10 +100,21 @@ EfiDhcp6Start ( > if (Instance->IaCb.Ia->State !=3D Dhcp6Init) { > return EFI_ALREADY_STARTED; > } >=20 > OldTpl =3D gBS->RaiseTPL (TPL_CALLBACK); > + > + // > + // Check Media Satus. > + // > + MediaPresent =3D TRUE; > + NetLibDetectMedia (Service->Controller, &MediaPresent); > + if (!MediaPresent) { > + Status =3D EFI_NO_MEDIA; > + goto ON_ERROR; > + } > + > Instance->UdpSts =3D EFI_ALREADY_STARTED; >=20 > // > // Send the solicit message to start S.A.R.R process. > // > -- > 1.9.5.msysgit.1