diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-30 07:49:21 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-30 07:49:21 +0000 |
commit | 4ad858e0f35e1dc69fe763ec342639761db6046c (patch) | |
tree | b65609af609192620f8c53e09a386766fb4bc224 /MdeModulePkg | |
parent | 6401e5ff130cb56719810768369af06b7b4b8568 (diff) | |
download | edk2-platforms-4ad858e0f35e1dc69fe763ec342639761db6046c.tar.xz |
Fix one issue: Some last IP settings may be lost when IP setting was re-set.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10720 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c index ca03a80239..e161b51ec5 100644 --- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c +++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c @@ -154,18 +154,26 @@ Ip4ConfigConvertDeviceConfigDataToIfrNvData ( NicConfig = EfiNicIp4ConfigGetInfo (Ip4ConfigInstance);
if (NicConfig != NULL) {
IfrFormNvData->Configure = 1;
+ Ip4ConfigInstance->Ip4ConfigCallbackInfo.Configured = TRUE;
if (NicConfig->Source == IP4_CONFIG_SOURCE_DHCP) {
IfrFormNvData->DhcpEnable = 1;
+ Ip4ConfigInstance->Ip4ConfigCallbackInfo.DhcpEnabled = TRUE;
} else {
IfrFormNvData->DhcpEnable = 0;
Ip4ConfigIpToStr (&NicConfig->Ip4Info.StationAddress, IfrFormNvData->StationAddress);
Ip4ConfigIpToStr (&NicConfig->Ip4Info.SubnetMask, IfrFormNvData->SubnetMask);
Ip4ConfigIpToStr (&NicConfig->Ip4Info.RouteTable[1].GatewayAddress, IfrFormNvData->GatewayAddress);
+
+ Ip4ConfigInstance->Ip4ConfigCallbackInfo.DhcpEnabled = FALSE;
+ CopyMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo.LocalIp, &NicConfig->Ip4Info.StationAddress, sizeof (EFI_IPv4_ADDRESS));
+ CopyMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo.SubnetMask, &NicConfig->Ip4Info.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
+ CopyMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo.Gateway, &NicConfig->Ip4Info.RouteTable[1].GatewayAddress, sizeof (EFI_IPv4_ADDRESS));
}
FreePool (NicConfig);
} else {
IfrFormNvData->Configure = 0;
+ Ip4ConfigInstance->Ip4ConfigCallbackInfo.Configured = FALSE;
}
}
|