]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
PXE driver bug fix.
[mirror_edk2.git] / NetworkPkg / UefiPxeBcDxe / PxeBcDhcp6.c
index 07f1724365f4dc7078d2c833ec4abefe9808ae93..35bdc57479caf54e17ca591861a28d41a6cd082c 100644 (file)
@@ -2,7 +2,7 @@
   Functions implementation related with DHCPv6 for UefiPxeBc Driver.\r
 \r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2015, 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
@@ -793,8 +793,8 @@ PxeBcRequestBootService (
     \r
   Status = PxeBc->UdpRead (\r
                     PxeBc,\r
-                    EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP,\r
-                    &Private->StationIp,\r
+                    EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP | EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP,\r
+                    NULL,\r
                     &SrcPort,\r
                     &Private->ServerIp,\r
                     &DestPort,\r
@@ -1807,7 +1807,6 @@ PxeBcDhcp6Discover (
   UINT8                               *RequestOpt;\r
   UINT8                               *DiscoverOpt;\r
   UINTN                               ReadSize;\r
-  UINT16                              OpFlags;\r
   UINT16                              OpCode;\r
   UINT16                              OpLen;\r
   UINT32                              Xid;\r
@@ -1818,7 +1817,6 @@ PxeBcDhcp6Discover (
   Request     = Private->Dhcp6Request;\r
   SrcPort     = PXEBC_BS_DISCOVER_PORT;\r
   DestPort    = PXEBC_BS_DISCOVER_PORT;\r
-  OpFlags     = 0;\r
 \r
   if (!UseBis && Layer != NULL) {\r
     *Layer &= EFI_PXE_BASE_CODE_BOOT_LAYER_MASK;\r
@@ -1862,7 +1860,7 @@ PxeBcDhcp6Discover (
 \r
   Status = PxeBc->UdpWrite (\r
                     PxeBc,\r
-                    OpFlags,\r
+                    0,\r
                     &Private->ServerIp,\r
                     &DestPort,\r
                     NULL,\r
@@ -1899,8 +1897,8 @@ PxeBcDhcp6Discover (
   \r
   Status = PxeBc->UdpRead (\r
                     PxeBc,\r
-                    OpFlags,\r
-                    &Private->StationIp,\r
+                    EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP,\r
+                    NULL,\r
                     &SrcPort,\r
                     &Private->ServerIp,\r
                     &DestPort,\r