mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 00:54:06 +02:00
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
This commit is contained in:
parent
0406a5717b
commit
5f6aee0f72
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
This code implements the IP4Config and NicIp4Config protocols.
|
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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>
|
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
|
// Signal the IP4 to run the auto configuration again
|
||||||
//
|
//
|
||||||
if (Reconfig && (Instance->ReconfigEvent != NULL)) {
|
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);
|
Status = gBS->SignalEvent (Instance->ReconfigEvent);
|
||||||
DispatchDpc ();
|
DispatchDpc ();
|
||||||
}
|
}
|
||||||
@ -344,6 +353,12 @@ EfiIp4ConfigStart (
|
|||||||
Instance->NicConfig = EfiNicIp4ConfigGetInfo (Instance);
|
Instance->NicConfig = EfiNicIp4ConfigGetInfo (Instance);
|
||||||
|
|
||||||
if (Instance->NicConfig == NULL) {
|
if (Instance->NicConfig == NULL) {
|
||||||
|
if (Instance->DoNotStart) {
|
||||||
|
Instance->DoNotStart = FALSE;
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
goto ON_EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
Source = IP4_CONFIG_SOURCE_DHCP;
|
Source = IP4_CONFIG_SOURCE_DHCP;
|
||||||
} else {
|
} else {
|
||||||
Source = Instance->NicConfig->Source;
|
Source = Instance->NicConfig->Source;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Header file for IP4Config driver.
|
Header file for IP4Config driver.
|
||||||
|
|
||||||
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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>
|
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||||
@ -138,6 +138,11 @@ typedef struct _IP4_CONFIG_INSTANCE {
|
|||||||
// Underlying media present status.
|
// Underlying media present status.
|
||||||
//
|
//
|
||||||
BOOLEAN MediaPresent;
|
BOOLEAN MediaPresent;
|
||||||
|
|
||||||
|
//
|
||||||
|
// A flag to indicate EfiIp4ConfigStart should not run
|
||||||
|
//
|
||||||
|
BOOLEAN DoNotStart;
|
||||||
} IP4_CONFIG_INSTANCE;
|
} IP4_CONFIG_INSTANCE;
|
||||||
|
|
||||||
#define IP4_CONFIG_INSTANCE_FROM_IP4CONFIG(this) \
|
#define IP4_CONFIG_INSTANCE_FROM_IP4CONFIG(this) \
|
||||||
|
@ -87,7 +87,8 @@ IP4_CONFIG_INSTANCE mIp4ConfigTemplate = {
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
TRUE
|
TRUE,
|
||||||
|
FALSE
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -215,7 +215,7 @@ Ip4ConfigConvertIfrNvDataToDeviceConfigData (
|
|||||||
//
|
//
|
||||||
ZeroMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo, sizeof (IP4_SETTING_INFO));
|
ZeroMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo, sizeof (IP4_SETTING_INFO));
|
||||||
|
|
||||||
Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, FALSE);
|
Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, TRUE);
|
||||||
if (Status == EFI_NOT_FOUND) {
|
if (Status == EFI_NOT_FOUND) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -629,7 +629,7 @@ Ip4DeviceRouteConfig (
|
|||||||
FreePool (NicInfo);
|
FreePool (NicInfo);
|
||||||
} else {
|
} else {
|
||||||
ZeroMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo, sizeof (IP4_SETTING_INFO));
|
ZeroMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo, sizeof (IP4_SETTING_INFO));
|
||||||
Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, FALSE);
|
Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user