Revision: 18201
http://sourceforge.net/p/edk2/code/18201
Author: jiaxinwu
Date: 2015-08-11 11:07:17 +0000 (Tue, 11 Aug 2015)
Log Message:
-----------
MdeModulePkg: Fix issue about current Ip4Dxe implementation for DHCP DORA
process
DHCP policy is applied as default at boot time on all NICs in the system, which
results
in all NIC ports attempting DHCP and trying to acquire IP addresses during boot.
Ip4 driver should only set dhcp as default policy, and not trigger DORA at
driver binding
start(). We should start DORA until one IP child is configured to use default
address.
Cc: Fu Siyuan <[email protected]>
Cc: Ye Ting <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h
trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
Modified: trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
2015-08-11 01:11:54 UTC (rev 18200)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
2015-08-11 11:07:17 UTC (rev 18201)
@@ -85,22 +85,6 @@
}
/**
- Start the DHCP configuration for this IP service instance.
- It will locates the EFI_IP4_CONFIG2_PROTOCOL, then start the
- DHCP configuration.
-
- @param[in] Instance The IP4 config2 instance to configure.
-
- @retval EFI_SUCCESS The auto configuration is successfull started.
- @retval Others Failed to start auto configuration.
-
-**/
-EFI_STATUS
-Ip4StartAutoConfig (
- IN IP4_CONFIG2_INSTANCE *Instance
- );
-
-/**
Update the current policy to NewPolicy. During the transition
period, the default router list
and address list in all interfaces will be released.
@@ -992,10 +976,7 @@
}
if (NewPolicy == Instance->Policy) {
- if (NewPolicy != Ip4Config2PolicyDhcp || Instance->DhcpSuccess) {
- return EFI_ABORTED;
- }
-
+ return EFI_ABORTED;
} else {
if (NewPolicy == Ip4Config2PolicyDhcp) {
//
Modified: trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h
2015-08-11 01:11:54 UTC (rev 18200)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h
2015-08-11 11:07:17 UTC (rev 18201)
@@ -211,6 +211,22 @@
#pragma pack()
/**
+ Start the DHCP configuration for this IP service instance.
+ It will locates the EFI_IP4_CONFIG2_PROTOCOL, then start the
+ DHCP configuration.
+
+ @param[in] Instance The IP4 config2 instance to configure.
+
+ @retval EFI_SUCCESS The auto configuration is successfull started.
+ @retval Others Failed to start auto configuration.
+
+**/
+EFI_STATUS
+Ip4StartAutoConfig (
+ IN IP4_CONFIG2_INSTANCE *Instance
+ );
+
+/**
Initialize an IP4_CONFIG2_INSTANCE.
@param[out] Instance The buffer of IP4_CONFIG2_INSTANCE to be
initialized.
Modified: trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c 2015-08-11
01:11:54 UTC (rev 18200)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c 2015-08-11
11:07:17 UTC (rev 18201)
@@ -678,8 +678,11 @@
// been started, start it.
//
if (IpSb->State == IP4_SERVICE_UNSTARTED) {
- Status = EFI_NO_MAPPING;
- goto ON_ERROR;
+ Status = Ip4StartAutoConfig (&IpSb->Ip4Config2Instance);
+
+ if (EFI_ERROR (Status)) {
+ goto ON_ERROR;
+ }
}
IpIf = IpSb->DefaultInterface;
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits