mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-03-21 22:42:06 +00:00
The `len` specified in the constructor of `IpPacket` is user-provided. Technically, that one can be longer than the actual packet. To make sure we only ever pass out the precise payload of the IP packet, we read the length from the IP header and cut the slice at the specified length. For #6461, we will build a control protocol on top of IP that runs through the WireGuard tunnel. Reading the exact length of the payload is important for that.