summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
diff options
context:
space:
mode:
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2012-11-14 01:43:18 +0000
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2012-11-14 01:43:18 +0000
commit5f6aee0f72dc29b42b133a6ccf81ba369ad0f3c0 (patch)
tree592961c823f4bc666c9d67f59378c22020e2ba78 /MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
parent0406a5717b3b3760a7bf6b5cc1a5efe7aa7a76b1 (diff)
Fix issue that node is still reachable after executing ifconfig –c.
Signed-off-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13940 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c')
-rw-r--r--MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
index 7288234bf..5493d07d1 100644
--- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
+++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
@@ -1,7 +1,7 @@
/** @file
This code implements the IP4Config and NicIp4Config protocols.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
which accompanies this distribution. The full text of the license may be found at<BR>
@@ -125,6 +125,15 @@ EfiNicIp4ConfigSetInfo (
// Signal the IP4 to run the auto configuration again
//
if (Reconfig && (Instance->ReconfigEvent != NULL)) {
+ //
+ // When NicConfig is NULL, NIC IP4 configuration parameter is removed,
+ // the auto configuration process should stop running the configuration
+ // policy for the EFI IPv4 Protocol driver.
+ //
+ if (NicConfig == NULL) {
+ Instance->DoNotStart = TRUE;
+ }
+
Status = gBS->SignalEvent (Instance->ReconfigEvent);
DispatchDpc ();
}
@@ -344,6 +353,12 @@ EfiIp4ConfigStart (
Instance->NicConfig = EfiNicIp4ConfigGetInfo (Instance);
if (Instance->NicConfig == NULL) {
+ if (Instance->DoNotStart) {
+ Instance->DoNotStart = FALSE;
+ Status = EFI_SUCCESS;
+ goto ON_EXIT;
+ }
+
Source = IP4_CONFIG_SOURCE_DHCP;
} else {
Source = Instance->NicConfig->Source;