audk/MdeModulePkg/Universal
Jiaxin Wu bd0656b5e2 MdeModulePkg: Fix potential failure if UseDefaultAddress configured
IpSb->Reconfig should not be set to TRUE to focal the reconfiguration
during the policy changes from Static to DHCP. It's redundancy because
the default router table and default addresses have been freed ahead (
Detailed see Ip4Config2OnPolicyChanged() function). Otherwise, the
potential failure will appear if UseDefaultAddress configured. Reproduce
steps see below:

#1. Set policy to DHCP.
#2. If DHCP process is not complete yet, then run one APP to invoke UDP4
Configure with "UseDefaultAddress = TRUE" (loop to call UDP4 Configure
until Ip4Mode.IsConfigured changes to TRUE).
#3. Even DHCP succeed but Ip4Mode.IsConfigured flag never set to TRUE

Concrete analysis is as follows:
In #1, the policy will be set to DHCP, and then Ip4Config2OnPolicyChanged()
will be called. In this function, if "IpSb->Reconfig" flag is set to TRUE,
the original "IpSb->DefaultInterface" will be abandoned/freed once the
DHCP process finished.

In #2, UDP4 Configure with "UseDefaultAddress = TRUE" is called, that means
the default interface (IpSb->DefaultInterface) will be selected as current
instance's interface.

In #3, when DHCP process finished, the original DefaultInterface will be
abandoned/freed because "IpSb->Reconfig" flag is true. Meanwhile, one new
interface is assigned to "IpSb->DefaultInterface". This new interface is
different to the original one assigned to the UDP4 Configured instance. So,
even DHCP process succeed, the up caller will never have the chance to get
it's truly status.

Cc: Cohen Eugene <eugene@hp.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Tested-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2016-08-18 13:54:50 +08:00
..
Acpi MdeModulePkg BootScriptExecutorDxe: Convert X64/S3Asm.asm to NASM 2016-06-28 09:52:01 +08:00
BdsDxe MdeModulePkg: Skip registering BootManagerMenu if absent 2016-07-05 17:33:05 +08:00
BootManagerPolicyDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
CapsulePei MdeModulePkg CapsulePei: Convert X64/PageFaultHandler.asm to NASM 2016-06-28 09:51:55 +08:00
CapsuleRuntimeDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Console MdeModulePkg: Fix typos in comments and variables 2016-07-11 10:29:48 +08:00
DebugPortDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
DebugSupportDxe MdeModulePkg DebugSupportDxe: Convert X64/AsmFuncs.asm to NASM 2016-06-28 09:51:57 +08:00
DevicePathDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Disk MdeModulePkg RamDiskDxe: Not use hardcode 'SectionInstance' to locate SSDT 2016-07-20 15:07:19 +08:00
DisplayEngineDxe MdeModulePkg/DisplayEngine: Fix memory leak issues in DisplayEngine 2016-05-25 16:31:37 +08:00
DriverHealthManagerDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
DriverSampleDxe MdeModulePkg/DriverSample: Skip the character "&" before "OFFSET=" 2016-08-11 15:38:43 +08:00
EbcDxe MdeModulePkg EbcDxe: Convert X64/EbcLowLevel.asm to NASM 2016-06-28 09:51:58 +08:00
EsrtDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
FaultTolerantWriteDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
FaultTolerantWritePei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
FileExplorerDxe MdeModulePkg FileExplorerDxe: Change file format which has mixed file format. 2015-12-16 03:22:39 +00:00
FvSimpleFileSystemDxe MdeModulePkg/FvSimpleFileSystem: fix assertions when FV is empty 2016-08-03 09:48:18 +08:00
HiiDatabaseDxe MdeModulePkg/HiiDB: Share default if some default value are not specified 2016-08-11 15:36:43 +08:00
HiiResourcesSampleDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
LegacyRegion2Dxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
LoadFileOnFv2 MdeModulePkg LoadFileOnFv2: Fix the potential NULL pointer access 2016-08-03 15:20:50 +08:00
LockBox/SmmLockBox MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
MemoryTest MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Metronome MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
MonotonicCounterRuntimeDxe MdeModulePkg: Minor comments update to GetNextHighMonotonicCount() 2016-01-29 09:26:49 +00:00
Network MdeModulePkg: Fix potential failure if UseDefaultAddress configured 2016-08-18 13:54:50 +08:00
PCD MdeModulePkg PCD: Avoid DynamicHii PCD set to override other values 2016-06-20 17:27:58 +08:00
PcatSingleSegmentPciCfg2Pei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PlatformDriOverrideDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PrintDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PropertiesTableAttributesDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
RegularExpressionDxe MdeModulePkg: Fixed incorrect return value of MatchString 2016-03-17 10:53:48 +08:00
ReportStatusCodeRouter MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
ResetSystemRuntimeDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SectionExtractionDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SectionExtractionPei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SecurityStubDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SerialDxe MdeModulePkg/SerialDxe: Set FIFO depth with PCD 2016-03-29 15:00:30 +08:00
SetupBrowserDxe MdeModulePkg/Browser: Enhance the logic when getting value from AltResp 2016-08-12 13:53:12 +08:00
SmbiosDxe MdeModulePkg SmbiosDxe: Use definition in IndustryStandard/Smbios.h 2016-07-29 10:10:56 +08:00
SmbiosMeasurementDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SmmCommunicationBufferDxe MdeModulePkg: Add new driver to publish EDKII_PI_SMM_COMMUNICATION_REGION_TABLE. 2016-04-29 12:49:09 +08:00
StatusCodeHandler MdeModulePkg/MemoryStatusCode: Expose the DXE memory status code table. 2016-06-29 09:46:51 +08:00
TimestampDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Variable MdeModulePkg: Terminate two unterminated VA_COPYs in CheckRemainingSpaceForConsistencyInternal() 2016-05-18 09:50:42 +08:00
WatchdogTimerDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00