]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IScsiDxe/IScsiDhcp.c
BaseTools: Make brotli a submodule
[mirror_edk2.git] / NetworkPkg / IScsiDxe / IScsiDhcp.c
index e6f6972ebd1bc7768449a2ac9559a5fb6d64db0a..7ce9bf575012b0f1594bd702cf2f4cfe73537dd9 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   iSCSI DHCP4 related configuration routines.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -134,6 +128,7 @@ IScsiDhcpExtractRootPath (
     CopyMem (&ConfigNvData->TargetUrl, Field->Str, Field->Len);\r
     ConfigNvData->TargetUrl[Field->Len + 1] = '\0';\r
   } else {\r
+    ConfigNvData->DnsMode = FALSE;\r
     ZeroMem(ConfigNvData->TargetUrl, sizeof (ConfigNvData->TargetUrl));\r
     Status = IScsiAsciiStrToIp (Field->Str, IpMode, &Ip);\r
     CopyMem (&ConfigNvData->TargetIp, &Ip, sizeof (EFI_IP_ADDRESS));\r
@@ -198,16 +193,16 @@ ON_EXIT:
 }\r
 \r
 /**\r
-  The callback function registerd to the DHCP4 instance that is used to select\r
+  The callback function registered to the DHCP4 instance that is used to select\r
   the qualified DHCP OFFER.\r
-  \r
+\r
   @param[in]  This         The DHCP4 protocol.\r
   @param[in]  Context      The context set when configuring the DHCP4 protocol.\r
   @param[in]  CurrentState The current state of the DHCP4 protocol.\r
   @param[in]  Dhcp4Event   The event occurs in the current state.\r
-  @param[in]  Packet       The DHCP packet that is to be sent or was already received. \r
+  @param[in]  Packet       The DHCP packet that is to be sent or was already received.\r
   @param[out] NewPacket    The packet used to replace the above Packet.\r
-  \r
+\r
   @retval EFI_SUCCESS      Either the DHCP OFFER is qualified or we're not intereseted\r
                            in the Dhcp4Event.\r
   @retval EFI_NOT_READY    The DHCP OFFER packet doesn't match our requirements.\r
@@ -410,7 +405,7 @@ IScsiSetIp4Policy (
                           );\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
-    } \r
+    }\r
   }\r
 \r
   return EFI_SUCCESS;\r
@@ -461,11 +456,11 @@ IScsiDoDhcp (
   }\r
 \r
   //\r
-  // DHCP4 service allows only one of its children to be configured in  \r
-  // the active state, If the DHCP4 D.O.R.A started by IP4 auto  \r
-  // configuration and has not been completed, the Dhcp4 state machine \r
-  // will not be in the right state for the iSCSI to start a new round D.O.R.A. \r
-  // So, we need to switch it's policy to static.\r
+  // DHCP4 service allows only one of its children to be configured in\r
+  // the active state, If the DHCP4 D.O.R.A started by IP4 auto\r
+  // configuration and has not been completed, the Dhcp4 state machine\r
+  // will not be in the right state for the iSCSI to start a new round D.O.R.A.\r
+  // So, we need to switch its policy to static.\r
   //\r
   Status = gBS->HandleProtocol (Controller, &gEfiIp4Config2ProtocolGuid, (VOID **) &Ip4Config2);\r
   if (!EFI_ERROR (Status)) {\r