]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6Impl.c
Use string pointer instead string buffer to avoid string copy operation.
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Impl.c
index 9b34eceeb71d391d941604aa405ebd931604fc68..621879b1ea579583af79b1340fb0a7b101a89e13 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of EFI_IP6_PROTOCOL protocol interfaces.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -15,7 +15,7 @@
 \r
 #include "Ip6Impl.h"\r
 \r
-EFI_IPSEC_PROTOCOL    *mIpSec = NULL;\r
+EFI_IPSEC2_PROTOCOL    *mIpSec = NULL;\r
 \r
 EFI_IP6_PROTOCOL mEfiIp6ProtocolTemplete = {\r
   EfiIp6GetModeData,\r
@@ -635,7 +635,7 @@ EfiIp6Configure (
   IpInstance = IP6_INSTANCE_FROM_PROTOCOL (This);\r
   IpSb       = IpInstance->Service;\r
 \r
-  if (IpSb->LinkLocalDadFail) {\r
+  if (IpSb->LinkLocalDadFail && Ip6ConfigData != NULL) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
@@ -689,7 +689,7 @@ EfiIp6Configure (
     Status = Ip6CleanProtocol (IpInstance);\r
 \r
     //\r
-    // Don't change the state if it is DESTORY, consider the following\r
+    // Don't change the state if it is DESTROY, consider the following\r
     // valid sequence: Mnp is unloaded-->Ip Stopped-->Udp Stopped,\r
     // Configure (ThisIp, NULL). If the state is changed to UNCONFIGED,\r
     // the unload fails miserably.\r
@@ -705,11 +705,6 @@ EfiIp6Configure (
   //\r
   Ip6ServiceConfigMnp (IpInstance->Service, FALSE);\r
 \r
-  //\r
-  // Update the variable data.\r
-  //\r
-  Ip6SetVariableData (IpInstance->Service);\r
-\r
 Exit:\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
@@ -1777,10 +1772,6 @@ EfiIp6Cancel (
   IpInstance = IP6_INSTANCE_FROM_PROTOCOL (This);\r
   IpSb       = IpInstance->Service;\r
 \r
-  if (IpSb->LinkLocalDadFail) {\r
-    return EFI_DEVICE_ERROR;\r
-  }\r
-\r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
   if (IpInstance->State != IP6_STATE_CONFIGED) {\r