/** @file\r
iSCSI DHCP6 related configuration routines.\r
\r
-Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 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
IpMode = ConfigData->AutoConfigureMode;\r
}\r
\r
- Status = IScsiAsciiStrToIp (Field->Str, IpMode, &Ip);\r
- CopyMem (&ConfigNvData->TargetIp, &Ip, sizeof (EFI_IP_ADDRESS));\r
-\r
+ //\r
+ // Server name is expressed as domain name, just save it.\r
+ //\r
+ if ((!NET_IS_DIGIT (*(Field->Str))) && (*(Field->Str) != '[')) {\r
+ ConfigNvData->DnsMode = TRUE;\r
+ if (Field->Len > sizeof (ConfigNvData->TargetUrl)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+ CopyMem (&ConfigNvData->TargetUrl, Field->Str, Field->Len);\r
+ ConfigNvData->TargetUrl[Field->Len + 1] = '\0';\r
+ } else {\r
+ ZeroMem(&ConfigNvData->TargetUrl, sizeof (ConfigNvData->TargetUrl));\r
+ Status = IScsiAsciiStrToIp (Field->Str, IpMode, &Ip);\r
+ CopyMem (&ConfigNvData->TargetIp, &Ip, sizeof (EFI_IP_ADDRESS));\r
\r
- if (EFI_ERROR (Status)) {\r
- goto ON_EXIT;\r
+ if (EFI_ERROR (Status)) {\r
+ goto ON_EXIT;\r
+ }\r
}\r
+\r
//\r
// Check the protocol type.\r
//\r