mirror of https://github.com/acidanthera/audk.git
NetworkPkg: Dhcp6Dxe: Packet-Length is not updated before appending
In order for Dhcp6AppendIaAddrOption (..) to safely append the IA Address option, the Packet-Length field must be updated before appending the option. Cc: Saloni Kasbekar <saloni.kasbekar@intel.com> Cc: Zachary Clark-williams <zachary.clark-williams@intel.com> Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com> Reviewed-by: Saloni Kasbekar <saloni.kasbekar@intel.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
This commit is contained in:
parent
af3fad99d6
commit
75deaf5c3c
|
@ -924,6 +924,11 @@ Dhcp6AppendIaOption (
|
||||||
*PacketCursor += sizeof (T2);
|
*PacketCursor += sizeof (T2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Update the packet length
|
||||||
|
//
|
||||||
|
Packet->Length += BytesNeeded;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fill all the addresses belong to the Ia
|
// 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
|
// Fill the value of Ia option length
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue