MdeModulePkg: IP4 should re-initiate a DHCP if it detects network reconnection
v2: * Update the MediaPresent detect declaring. IP4 driver should re-initiate a DHCP if it detects that there is a network. To fix this issue, we can implement the DHCP re-initiate policy while the media change detected. The Ip4 driver should set a timer to signal the Ip4 to run the DHCP configuration again(D.O.R.A). IP4 driver should free old IP address related resource, then initiate a DHCP process to acquire new IP. Cc: Ye Ting <ting.ye@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Lubo Zhang <lubo.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18232 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -210,6 +210,10 @@ Ip4CreateService (
|
||||
|
||||
IpSb->Timer = NULL;
|
||||
|
||||
IpSb->ReconfigEvent = NULL;
|
||||
|
||||
IpSb->MediaPresent = TRUE;
|
||||
|
||||
//
|
||||
// Create various resources. First create the route table, timer
|
||||
// event and MNP child. IGMP, interface's initialization depend
|
||||
@ -386,6 +390,12 @@ Ip4CleanService (
|
||||
IpSb->Timer = NULL;
|
||||
}
|
||||
|
||||
if (IpSb->ReconfigEvent != NULL) {
|
||||
gBS->CloseEvent (IpSb->ReconfigEvent);
|
||||
|
||||
IpSb->ReconfigEvent = NULL;
|
||||
}
|
||||
|
||||
if (IpSb->MacString != NULL) {
|
||||
FreePool (IpSb->MacString);
|
||||
}
|
||||
|
Reference in New Issue
Block a user