diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c index e4e0725622..f38e3ee3fe 100644 --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c @@ -924,6 +924,11 @@ Dhcp6AppendIaOption ( *PacketCursor += sizeof (T2); } + // + // Update the packet length + // + Packet->Length += BytesNeeded; + // // Fill all the addresses belong to the Ia // @@ -935,11 +940,6 @@ Dhcp6AppendIaOption ( } } - // - // Update the packet length - // - Packet->Length += BytesNeeded; - // // Fill the value of Ia option length //