diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-11-29 14:35:01 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-12-13 16:25:49 +0800 |
commit | 8a5ef41ebb3dded5e9578ff4b716b87416b9c95f (patch) | |
tree | 6dd0aba7329c8357efeaa2f8d7fcde8498805933 /NetworkPkg/Dhcp6Dxe | |
parent | 5d34573df938ea7061fdd30a98acc71c4d4dc638 (diff) | |
download | edk2-8a5ef41ebb3dded5e9578ff4b716b87416b9c95f.tar.gz |
NetworkPkg/Dhcp6Dxe: Check Media status before starting DHCP process.
This patch is to resolve the issue reported @
https://bugzilla.tianocore.org/show_bug.cgi?id=804.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Karunakar P <karunakarp@amiindia.co.in>
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Diffstat (limited to 'NetworkPkg/Dhcp6Dxe')
-rw-r--r-- | NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c index d8c0ad0d24..1107865f42 100644 --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c @@ -1,7 +1,7 @@ /** @file
This EFI_DHCP6_PROTOCOL interface implementation.
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -76,6 +76,7 @@ EfiDhcp6Start ( EFI_TPL OldTpl;
DHCP6_INSTANCE *Instance;
DHCP6_SERVICE *Service;
+ BOOLEAN MediaPresent;
if (This == NULL) {
return EFI_INVALID_PARAMETER;
@@ -101,6 +102,17 @@ EfiDhcp6Start ( }
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
+
+ //
+ // Check Media Satus.
+ //
+ MediaPresent = TRUE;
+ NetLibDetectMedia (Service->Controller, &MediaPresent);
+ if (!MediaPresent) {
+ Status = EFI_NO_MEDIA;
+ goto ON_ERROR;
+ }
+
Instance->UdpSts = EFI_ALREADY_STARTED;
//
|