Files
firezone/rust/ip-packet
Thomas Eizinger 0ef4b50913 refactor(ip-packet): be precise about length of payload (#6938)
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.
2024-10-07 22:48:52 +00:00
..