summaryrefslogtreecommitdiff
path: root/NetworkPkg
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
index e4e0725..f38e3ee 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
@@ -925,6 +925,11 @@ Dhcp6AppendIaOption (
}
//
+ // Update the packet length
+ //
+ Packet->Length += BytesNeeded;
+
+ //
// Fill all the addresses belong to the Ia
//
for (Index = 0; Index < Ia->IaAddressCount; Index++) {
@@ -936,11 +941,6 @@ Dhcp6AppendIaOption (
}
//
- // Update the packet length
- //
- Packet->Length += BytesNeeded;
-
- //
// Fill the value of Ia option length
//
*Len = HTONS ((UINT16)(*PacketCursor - (UINT8 *)Len - 2));