]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
MdeModulePkg: Replace ASSERT with error return code in PXE driver.
[mirror_edk2.git] / NetworkPkg / UefiPxeBcDxe / PxeBcDhcp4.c
index 40e1fe02109e2964e1e656fc6f8ceaa4478721f5..44b07143934dfdce53716f522b784629e4db4bd5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Functions implementation related with DHCPv4 for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2016, 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
 // This is a map from the interested DHCP4 option tags' index to the tag value.\r
 //\r
 UINT8 mInterestedDhcp4Tags[PXEBC_DHCP4_TAG_INDEX_MAX] = {\r
-  PXEBC_DHCP4_TAG_BOOTFILE_LEN,\r
-  PXEBC_DHCP4_TAG_VENDOR,\r
-  PXEBC_DHCP4_TAG_OVERLOAD,\r
-  PXEBC_DHCP4_TAG_MSG_TYPE,\r
-  PXEBC_DHCP4_TAG_SERVER_ID,\r
-  PXEBC_DHCP4_TAG_CLASS_ID,\r
-  PXEBC_DHCP4_TAG_BOOTFILE\r
+  DHCP4_TAG_BOOTFILE_LEN,\r
+  DHCP4_TAG_VENDOR,\r
+  DHCP4_TAG_OVERLOAD,\r
+  DHCP4_TAG_MSG_TYPE,\r
+  DHCP4_TAG_SERVER_ID,\r
+  DHCP4_TAG_VENDOR_CLASS_ID,\r
+  DHCP4_TAG_BOOTFILE\r
 };\r
 \r
 //\r
@@ -58,7 +58,7 @@ PxeBcParseDhcp4Options (
   Option  = (EFI_DHCP4_PACKET_OPTION *) Buffer;\r
   Offset  = 0;\r
 \r
-  while (Offset < Length && Option->OpCode != PXEBC_DHCP4_TAG_EOP) {\r
+  while (Offset < Length && Option->OpCode != DHCP4_TAG_EOP) {\r
 \r
     if (Option->OpCode == OptTag) {\r
       //\r
@@ -70,7 +70,7 @@ PxeBcParseDhcp4Options (
     //\r
     // Skip the current option to the next.\r
     //\r
-    if (Option->OpCode == PXEBC_DHCP4_TAG_PAD) {\r
+    if (Option->OpCode == DHCP4_TAG_PAD) {\r
       Offset++;\r
     } else {\r
       Offset += Option->Length + 2;\r
@@ -108,7 +108,7 @@ PxeBcParseVendorOptions (
 \r
   ASSERT (PxeOption != NULL);\r
 \r
-  while ((Offset < VendorOptionLen) && (PxeOption->OpCode != PXEBC_DHCP4_TAG_EOP)) {\r
+  while ((Offset < VendorOptionLen) && (PxeOption->OpCode != DHCP4_TAG_EOP)) {\r
     //\r
     // Parse all the interesting PXE vendor options one by one.\r
     //\r
@@ -201,7 +201,7 @@ PxeBcParseVendorOptions (
     //\r
     // Continue to the next option.\r
     //\r
-    if (PxeOption->OpCode == PXEBC_DHCP4_TAG_PAD) {\r
+    if (PxeOption->OpCode == DHCP4_TAG_PAD) {\r
       Offset++;\r
     } else {\r
       Offset = (UINT8) (Offset + PxeOption->Length + 2);\r
@@ -243,7 +243,7 @@ PxeBcBuildDhcp4Options (
     //\r
     // Append message type.\r
     //\r
-    OptList[Index]->OpCode  = PXEBC_DHCP4_TAG_MSG_TYPE;\r
+    OptList[Index]->OpCode  = DHCP4_TAG_MSG_TYPE;\r
     OptList[Index]->Length  = 1;\r
     OptEnt.Mesg             = (PXEBC_DHCP4_OPTION_MESG *) OptList[Index]->Data;\r
     OptEnt.Mesg->Type       = PXEBC_DHCP4_MSG_TYPE_REQUEST;\r
@@ -253,10 +253,10 @@ PxeBcBuildDhcp4Options (
     //\r
     // Append max message size.\r
     //\r
-    OptList[Index]->OpCode  = PXEBC_DHCP4_TAG_MAXMSG;\r
+    OptList[Index]->OpCode  = DHCP4_TAG_MAXMSG;\r
     OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_MAX_MESG_SIZE);\r
     OptEnt.MaxMesgSize      = (PXEBC_DHCP4_OPTION_MAX_MESG_SIZE *) OptList[Index]->Data;\r
-    Value                   = NTOHS (PXEBC_DHCP4_PACKET_MAX_SIZE - 8);\r
+    Value                   = NTOHS (PXEBC_DHCP4_PACKET_MAX_SIZE);\r
     CopyMem (&OptEnt.MaxMesgSize->Size, &Value, sizeof (UINT16));\r
     Index++;\r
     OptList[Index]          = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);\r
@@ -265,36 +265,36 @@ PxeBcBuildDhcp4Options (
   //\r
   // Append parameter request list option.\r
   //\r
-  OptList[Index]->OpCode    = PXEBC_DHCP4_TAG_PARA_LIST;\r
+  OptList[Index]->OpCode    = DHCP4_TAG_PARA_LIST;\r
   OptList[Index]->Length    = 35;\r
   OptEnt.Para               = (PXEBC_DHCP4_OPTION_PARA *) OptList[Index]->Data;\r
-  OptEnt.Para->ParaList[0]  = PXEBC_DHCP4_TAG_NETMASK;\r
-  OptEnt.Para->ParaList[1]  = PXEBC_DHCP4_TAG_TIME_OFFSET;\r
-  OptEnt.Para->ParaList[2]  = PXEBC_DHCP4_TAG_ROUTER;\r
-  OptEnt.Para->ParaList[3]  = PXEBC_DHCP4_TAG_TIME_SERVER;\r
-  OptEnt.Para->ParaList[4]  = PXEBC_DHCP4_TAG_NAME_SERVER;\r
-  OptEnt.Para->ParaList[5]  = PXEBC_DHCP4_TAG_DNS_SERVER;\r
-  OptEnt.Para->ParaList[6]  = PXEBC_DHCP4_TAG_HOSTNAME;\r
-  OptEnt.Para->ParaList[7]  = PXEBC_DHCP4_TAG_BOOTFILE_LEN;\r
-  OptEnt.Para->ParaList[8]  = PXEBC_DHCP4_TAG_DOMAINNAME;\r
-  OptEnt.Para->ParaList[9]  = PXEBC_DHCP4_TAG_ROOTPATH;\r
-  OptEnt.Para->ParaList[10] = PXEBC_DHCP4_TAG_EXTEND_PATH;\r
-  OptEnt.Para->ParaList[11] = PXEBC_DHCP4_TAG_EMTU;\r
-  OptEnt.Para->ParaList[12] = PXEBC_DHCP4_TAG_TTL;\r
-  OptEnt.Para->ParaList[13] = PXEBC_DHCP4_TAG_BROADCAST;\r
-  OptEnt.Para->ParaList[14] = PXEBC_DHCP4_TAG_NIS_DOMAIN;\r
-  OptEnt.Para->ParaList[15] = PXEBC_DHCP4_TAG_NIS_SERVER;\r
-  OptEnt.Para->ParaList[16] = PXEBC_DHCP4_TAG_NTP_SERVER;\r
-  OptEnt.Para->ParaList[17] = PXEBC_DHCP4_TAG_VENDOR;\r
-  OptEnt.Para->ParaList[18] = PXEBC_DHCP4_TAG_REQUEST_IP;\r
-  OptEnt.Para->ParaList[19] = PXEBC_DHCP4_TAG_LEASE;\r
-  OptEnt.Para->ParaList[20] = PXEBC_DHCP4_TAG_SERVER_ID;\r
-  OptEnt.Para->ParaList[21] = PXEBC_DHCP4_TAG_T1;\r
-  OptEnt.Para->ParaList[22] = PXEBC_DHCP4_TAG_T2;\r
-  OptEnt.Para->ParaList[23] = PXEBC_DHCP4_TAG_CLASS_ID;\r
-  OptEnt.Para->ParaList[24] = PXEBC_DHCP4_TAG_TFTP;\r
-  OptEnt.Para->ParaList[25] = PXEBC_DHCP4_TAG_BOOTFILE;\r
-  OptEnt.Para->ParaList[26] = PXEBC_PXE_DHCP4_TAG_UUID;\r
+  OptEnt.Para->ParaList[0]  = DHCP4_TAG_NETMASK;\r
+  OptEnt.Para->ParaList[1]  = DHCP4_TAG_TIME_OFFSET;\r
+  OptEnt.Para->ParaList[2]  = DHCP4_TAG_ROUTER;\r
+  OptEnt.Para->ParaList[3]  = DHCP4_TAG_TIME_SERVER;\r
+  OptEnt.Para->ParaList[4]  = DHCP4_TAG_NAME_SERVER;\r
+  OptEnt.Para->ParaList[5]  = DHCP4_TAG_DNS_SERVER;\r
+  OptEnt.Para->ParaList[6]  = DHCP4_TAG_HOSTNAME;\r
+  OptEnt.Para->ParaList[7]  = DHCP4_TAG_BOOTFILE_LEN;\r
+  OptEnt.Para->ParaList[8]  = DHCP4_TAG_DOMAINNAME;\r
+  OptEnt.Para->ParaList[9]  = DHCP4_TAG_ROOTPATH;\r
+  OptEnt.Para->ParaList[10] = DHCP4_TAG_EXTEND_PATH;\r
+  OptEnt.Para->ParaList[11] = DHCP4_TAG_EMTU;\r
+  OptEnt.Para->ParaList[12] = DHCP4_TAG_TTL;\r
+  OptEnt.Para->ParaList[13] = DHCP4_TAG_BROADCAST;\r
+  OptEnt.Para->ParaList[14] = DHCP4_TAG_NIS_DOMAIN;\r
+  OptEnt.Para->ParaList[15] = DHCP4_TAG_NIS_SERVER;\r
+  OptEnt.Para->ParaList[16] = DHCP4_TAG_NTP_SERVER;\r
+  OptEnt.Para->ParaList[17] = DHCP4_TAG_VENDOR;\r
+  OptEnt.Para->ParaList[18] = DHCP4_TAG_REQUEST_IP;\r
+  OptEnt.Para->ParaList[19] = DHCP4_TAG_LEASE;\r
+  OptEnt.Para->ParaList[20] = DHCP4_TAG_SERVER_ID;\r
+  OptEnt.Para->ParaList[21] = DHCP4_TAG_T1;\r
+  OptEnt.Para->ParaList[22] = DHCP4_TAG_T2;\r
+  OptEnt.Para->ParaList[23] = DHCP4_TAG_VENDOR_CLASS_ID;\r
+  OptEnt.Para->ParaList[24] = DHCP4_TAG_TFTP;\r
+  OptEnt.Para->ParaList[25] = DHCP4_TAG_BOOTFILE;\r
+  OptEnt.Para->ParaList[26] = DHCP4_TAG_UUID;\r
   OptEnt.Para->ParaList[27] = 0x80;\r
   OptEnt.Para->ParaList[28] = 0x81;\r
   OptEnt.Para->ParaList[29] = 0x82;\r
@@ -309,7 +309,7 @@ PxeBcBuildDhcp4Options (
   //\r
   // Append UUID/Guid-based client identifier option\r
   //\r
-  OptList[Index]->OpCode  = PXEBC_PXE_DHCP4_TAG_UUID;\r
+  OptList[Index]->OpCode  = DHCP4_TAG_UUID;\r
   OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_UUID);\r
   OptEnt.Uuid             = (PXEBC_DHCP4_OPTION_UUID *) OptList[Index]->Data;\r
   OptEnt.Uuid->Type       = 0;\r
@@ -326,7 +326,7 @@ PxeBcBuildDhcp4Options (
   //\r
   // Append client network device interface option\r
   //\r
-  OptList[Index]->OpCode  = PXEBC_PXE_DHCP4_TAG_UNDI;\r
+  OptList[Index]->OpCode  = DHCP4_TAG_UNDI;\r
   OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_UNDI);\r
   OptEnt.Undi             = (PXEBC_DHCP4_OPTION_UNDI *) OptList[Index]->Data;\r
 \r
@@ -346,7 +346,7 @@ PxeBcBuildDhcp4Options (
   //\r
   // Append client system architecture option\r
   //\r
-  OptList[Index]->OpCode  = PXEBC_PXE_DHCP4_TAG_ARCH;\r
+  OptList[Index]->OpCode  = DHCP4_TAG_ARCH;\r
   OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_ARCH);\r
   OptEnt.Arch             = (PXEBC_DHCP4_OPTION_ARCH *) OptList[Index]->Data;\r
   Value                   = HTONS (EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE);\r
@@ -357,7 +357,7 @@ PxeBcBuildDhcp4Options (
   //\r
   // Append vendor class identify option\r
   //\r
-  OptList[Index]->OpCode  = PXEBC_DHCP4_TAG_CLASS_ID;\r
+  OptList[Index]->OpCode  = DHCP4_TAG_VENDOR_CLASS_ID;\r
   OptList[Index]->Length  = (UINT8) sizeof (PXEBC_DHCP4_OPTION_CLID);\r
   OptEnt.Clid             = (PXEBC_DHCP4_OPTION_CLID *) OptList[Index]->Data;\r
   CopyMem (\r
@@ -414,7 +414,7 @@ PxeBcSeedDhcp4Packet (
   CopyMem (Header->ClientHwAddr, &Mode.CurrentAddress, Header->HwAddrLen);\r
 \r
   Seed->Dhcp4.Magik     = PXEBC_DHCP4_MAGIC;\r
-  Seed->Dhcp4.Option[0] = PXEBC_DHCP4_TAG_EOP;\r
+  Seed->Dhcp4.Option[0] = DHCP4_TAG_EOP;\r
 }\r
 \r
 \r
@@ -460,9 +460,11 @@ PxeBcParseDhcp4Packet (
   BOOLEAN                        IsProxyOffer;\r
   BOOLEAN                        IsPxeOffer;\r
   UINT8                          *Ptr8;\r
+  BOOLEAN                        FileFieldOverloaded;\r
 \r
   IsProxyOffer = FALSE;\r
   IsPxeOffer   = FALSE;\r
+  FileFieldOverloaded = FALSE;\r
 \r
   ZeroMem (Cache4->OptList, sizeof (Cache4->OptList));\r
   ZeroMem (&Cache4->VendorOpt, sizeof (Cache4->VendorOpt));\r
@@ -488,6 +490,7 @@ PxeBcParseDhcp4Packet (
   Option = Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD];\r
   if (Option != NULL) {\r
     if ((Option->Data[0] & PXEBC_DHCP4_OVERLOAD_FILE) != 0) {\r
+      FileFieldOverloaded = TRUE;\r
       for (Index = 0; Index < PXEBC_DHCP4_TAG_INDEX_MAX; Index++) {\r
         if (Options[Index] == NULL) {\r
           Options[Index] = PxeBcParseDhcp4Options (\r
@@ -512,7 +515,7 @@ PxeBcParseDhcp4Packet (
   }\r
 \r
   //\r
-  // The offer with "yiaddr" is a proxy offer.\r
+  // The offer with zero "yiaddr" is a proxy offer.\r
   //\r
   if (Offer->Dhcp4.Header.YourAddr.Addr[0] == 0) {\r
     IsProxyOffer = TRUE;\r
@@ -550,7 +553,7 @@ PxeBcParseDhcp4Packet (
     if (*(Ptr8 - 1) != '\0') {\r
       *Ptr8 = '\0';\r
     }\r
-  } else if (Offer->Dhcp4.Header.BootFileName[0] != 0) {\r
+  } else if (!FileFieldOverloaded && Offer->Dhcp4.Header.BootFileName[0] != 0) {\r
     //\r
     // If the bootfile is not present and bootfilename is present in DHCPv4 packet, just parse it.\r
     // Do not count dhcp option header here, or else will destroy the serverhostname.\r
@@ -1177,10 +1180,10 @@ PxeBcDhcp4CallBack (
   MaxMsgSize = PxeBcParseDhcp4Options (\r
                  Packet->Dhcp4.Option,\r
                  GET_OPTION_BUFFER_LEN (Packet),\r
-                 PXEBC_DHCP4_TAG_MAXMSG\r
+                 DHCP4_TAG_MAXMSG\r
                  );\r
   if (MaxMsgSize != NULL) {\r
-    Value = HTONS (PXEBC_DHCP4_PACKET_MAX_SIZE - 8);\r
+    Value = HTONS (PXEBC_DHCP4_PACKET_MAX_SIZE);\r
     CopyMem (MaxMsgSize->Data, &Value, sizeof (Value));\r
   }\r
 \r
@@ -1206,6 +1209,14 @@ PxeBcDhcp4CallBack (
   switch (Dhcp4Event) {\r
 \r
   case Dhcp4SendDiscover:\r
+    if (Packet->Length > PXEBC_DHCP4_PACKET_MAX_SIZE) {\r
+      //\r
+      // If the to be sent packet exceeds the maximum length, abort the DHCP process.\r
+      //\r
+      Status = EFI_ABORTED;\r
+      break;\r
+    }\r
+\r
     //\r
     // Cache the DHCPv4 discover packet to mode data directly.\r
     // It need to check SendGuid as well as Dhcp4SendRequest.\r
@@ -1213,6 +1224,14 @@ PxeBcDhcp4CallBack (
     CopyMem (&Mode->DhcpDiscover.Dhcpv4, &Packet->Dhcp4, Packet->Length);\r
 \r
   case Dhcp4SendRequest:\r
+    if (Packet->Length > PXEBC_DHCP4_PACKET_MAX_SIZE) {\r
+      //\r
+      // If the to be sent packet exceeds the maximum length, abort the DHCP process.\r
+      //\r
+      Status = EFI_ABORTED;\r
+      break;\r
+    }\r
+    \r
     if (Mode->SendGUID) {\r
       //\r
       // Send the system Guid instead of the MAC address as the hardware address if required.\r
@@ -1229,6 +1248,12 @@ PxeBcDhcp4CallBack (
 \r
   case Dhcp4RcvdOffer:\r
     Status = EFI_NOT_READY;\r
+    if (Packet->Length > PXEBC_DHCP4_PACKET_MAX_SIZE) {\r
+      //\r
+      // Ignore the incoming packets which exceed the maximum length.\r
+      //\r
+      break;\r
+    }\r
     if (Private->OfferNum < PXEBC_OFFER_MAX_NUM) {\r
       //\r
       // Cache the DHCPv4 offers to OfferBuffer[] for select later, and record\r
@@ -1253,6 +1278,14 @@ PxeBcDhcp4CallBack (
     break;\r
 \r
   case Dhcp4RcvdAck:\r
+    if (Packet->Length > PXEBC_DHCP4_PACKET_MAX_SIZE) {\r
+      //\r
+      // Abort the DHCP if the ACK packet exceeds the maximum length.\r
+      //\r
+         Status = EFI_ABORTED;\r
+         break;\r
+    }\r
+\r
     //\r
     // Cache the DHCPv4 ack to Private->Dhcp4Ack, but it's not the final ack in mode data\r
     // without verification.\r
@@ -1353,14 +1386,14 @@ PxeBcDhcp4Discover (
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
-    OptList[OptCount]->OpCode     = PXEBC_DHCP4_TAG_VENDOR;\r
+    OptList[OptCount]->OpCode     = DHCP4_TAG_VENDOR;\r
     OptList[OptCount]->Length     = (UINT8) (VendorOptLen - 2);\r
     PxeOpt                        = (EFI_DHCP4_PACKET_OPTION *) OptList[OptCount]->Data;\r
     PxeOpt->OpCode                = PXEBC_VENDOR_TAG_BOOT_ITEM;\r
     PxeOpt->Length                = (UINT8) sizeof (PXEBC_OPTION_BOOT_ITEM);\r
     PxeBootItem                   = (PXEBC_OPTION_BOOT_ITEM *) PxeOpt->Data;\r
     PxeBootItem->Type             = HTONS (Type);\r
-    PxeOpt->Data[PxeOpt->Length]  = PXEBC_DHCP4_TAG_EOP;\r
+    PxeOpt->Data[PxeOpt->Length]  = DHCP4_TAG_EOP;\r
 \r
     if (Layer != NULL) {\r
       PxeBootItem->Layer          = HTONS (*Layer);\r
@@ -1506,6 +1539,52 @@ PxeBcDhcp4Discover (
   return Status;\r
 }\r
 \r
+/**\r
+  Switch the Ip4 policy to static.\r
+\r
+  @param[in]  Private             The pointer to PXEBC_PRIVATE_DATA.\r
+\r
+  @retval     EFI_SUCCESS         The policy is already configured to static.\r
+  @retval     Others              Other error as indicated..\r
+\r
+**/\r
+EFI_STATUS\r
+PxeBcSetIp4Policy (   \r
+  IN PXEBC_PRIVATE_DATA            *Private\r
+  )\r
+{\r
+  EFI_STATUS                   Status;\r
+  EFI_IP4_CONFIG2_PROTOCOL     *Ip4Config2;\r
+  EFI_IP4_CONFIG2_POLICY       Policy;\r
+  UINTN                        DataSize;\r
+\r
+  Ip4Config2 = Private->Ip4Config2;\r
+  DataSize = sizeof (EFI_IP4_CONFIG2_POLICY);\r
+  Status = Ip4Config2->GetData (\r
+                       Ip4Config2,\r
+                       Ip4Config2DataTypePolicy,\r
+                       &DataSize,\r
+                       &Policy\r
+                       );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+  \r
+  if (Policy != Ip4Config2PolicyStatic) {\r
+    Policy = Ip4Config2PolicyStatic;\r
+    Status= Ip4Config2->SetData (\r
+                          Ip4Config2,\r
+                          Ip4Config2DataTypePolicy,\r
+                          sizeof (EFI_IP4_CONFIG2_POLICY),\r
+                          &Policy\r
+                          );\r
+    if (EFI_ERROR (Status)) {\r
+      return Status;\r
+    } \r
+  }\r
+\r
+  return  EFI_SUCCESS;\r
+}\r
 \r
 /**\r
   Start the D.O.R.A DHCPv4 process to acquire the IPv4 address and other PXE boot information.\r
@@ -1569,10 +1648,12 @@ PxeBcDhcp4Dora (
   ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));\r
 \r
   //\r
-  // Start DHCPv4 D.O.R.A. process to acquire IPv4 address.\r
+  // Start DHCPv4 D.O.R.A. process to acquire IPv4 address. This may \r
+  // have already been done, thus do not leave in error if the return\r
+  // code is EFI_ALREADY_STARTED.\r
   //\r
   Status = Dhcp4->Start (Dhcp4, NULL);\r
-  if (EFI_ERROR (Status)) {\r
+  if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {\r
     if (Status == EFI_ICMP_ERROR) {\r
       PxeMode->IcmpErrorReceived = TRUE;\r
     }\r
@@ -1595,7 +1676,7 @@ PxeBcDhcp4Dora (
   CopyMem (&PxeMode->StationIp, &Private->StationIp, sizeof (EFI_IPv4_ADDRESS));\r
   CopyMem (&PxeMode->SubnetMask, &Private->SubnetMask, sizeof (EFI_IPv4_ADDRESS));\r
 \r
-  Status = PxeBcFlushStaionIp (Private, &Private->StationIp, &Private->SubnetMask);\r
+  Status = PxeBcFlushStationIp (Private, &Private->StationIp, &Private->SubnetMask);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r