]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Fix IPv4 stack potential disappeared issue
authorJiaxin Wu <jiaxin.wu@intel.com>
Thu, 30 Jun 2016 07:53:01 +0000 (15:53 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Thu, 7 Jul 2016 00:46:48 +0000 (08:46 +0800)
commiteab4016490c863895c8773033dfe651b9dc90816
tree415cd6ccf06dd72083120cfa98396d7a07cc71b4
parente06a4c0812cfac25a9eb1e8c851156fe19a29ab3
MdeModulePkg: Fix IPv4 stack potential disappeared issue

IP4_CONFIG2_INSTANCE->DataItem is used to save the configuration
data to NV variable. When the policy is changed from static to
DHCP, DnsServers info will be cleaned from DataItem first
(See Ip4Config2SetPolicy), it's correct because DnsServers info
should not be saved to NV variable.
But if there is any DnsServers info received from DHCP message, it
will be reset to DataItem again (See Ip4Config2SetDnsServerWorker),
which may cause the NV variable contain the DnsServers info while
the policy is DHCP (See Ip4Config2WriteConfigData).
Then, while the platform is reset, the issue happened. Because
Ip4Config2DataTypeDnsServer is set under DHCP policy, which is not
allowed by UEFI Spec and error returned.

This patch is used to resolve this potential issue.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@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: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c