X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=NetworkPkg%2FUefiPxeBcDxe%2FPxeBcDriver.c;h=080b751cb19637541e81ef9bdec8db16c3302aaf;hp=179009f91c600802fb47c0f94ee5027e79ccb0a9;hb=75dce340624dba5e4a79b2e5b2dbe943bae0d0e9;hpb=e98e59c237e17f064a4ecffb39d45499f89720a1
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
index 179009f91c..080b751cb1 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
@@ -1,7 +1,7 @@
/** @file
Driver Binding functions implementationfor for UefiPxeBc Driver.
- Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -779,6 +779,7 @@ PxeBcCreateIp6Children (
EFI_IP6_MODE_DATA Ip6ModeData;
PXEBC_PRIVATE_PROTOCOL *Id;
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
+ UINTN Index;
if (Private->Ip6Nic != NULL) {
//
@@ -821,6 +822,16 @@ PxeBcCreateIp6Children (
goto ON_ERROR;
}
+ //
+ // Generate a random IAID for the Dhcp6 assigned address.
+ //
+ Private->IaId = NET_RANDOM (NetRandomInitSeed ());
+ if (Private->Snp != NULL) {
+ for (Index = 0; Index < Private->Snp->Mode->HwAddressSize; Index++) {
+ Private->IaId |= (Private->Snp->Mode->CurrentAddress.Addr[Index] << ((Index << 3) & 31));
+ }
+ }
+
//
// Create Mtftp6 child and open Mtftp6 protocol for PxeBc->Mtftp.
//