Fix a bug in DHCP6 driver when using DUID LLT.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong Eric <eric.dong@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16337 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Fu Siyuan 2014-11-12 05:14:07 +00:00 committed by sfu5
parent 09fc7dbb94
commit 6da5153cfc
1 changed files with 3 additions and 3 deletions

View File

@ -143,9 +143,9 @@ Dhcp6GenerateClientId (
// //
// Set the Duid-type, hardware-type, time and copy the hardware address. // Set the Duid-type, hardware-type, time and copy the hardware address.
// //
WriteUnaligned16 ((UINT16 *) ((UINT8 *)&Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid)), HTONS (Dhcp6DuidTypeLlt)); WriteUnaligned16 ((UINT16 *) ((UINT8 *) Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid)), HTONS (Dhcp6DuidTypeLlt));
WriteUnaligned16 ((UINT16 *) ((UINT8 *)&Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid) + 2), HTONS (NET_IFTYPE_ETHERNET)); WriteUnaligned16 ((UINT16 *) ((UINT8 *) Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid) + 2), HTONS (NET_IFTYPE_ETHERNET));
WriteUnaligned32 ((UINT32 *) ((UINT8 *)&Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid) + 4), HTONL (Stamp)); WriteUnaligned32 ((UINT32 *) ((UINT8 *) Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid) + 4), HTONL (Stamp));
CopyMem (Duid->Duid + 8, &Mode->CurrentAddress, Mode->HwAddressSize); CopyMem (Duid->Duid + 8, &Mode->CurrentAddress, Mode->HwAddressSize);
} }