smoltcp
smoltcp copied to clipboard
ICMPv6 packets that don't transmit the entire payload can't get parsed
When ICMPv6 packets get parsed, the IPv6 packet field gets parsed as if it were a regular IPv6 packet. However, since ICMPv6 packets are usually sent with length of 1280 bytes to ensure it gets delivered, and also because of the ICMP protocol overhead, quite a bit of the original packet payload can get truncated, but the original payload length is sent anyway. Nonetheless, smoltcp attempts to parse and validate the packet, and fails, since the transmitted payload length is smaller than its advertised length.
This especially prevents it being used for e.g. path mtu discovery.
How does this work with the checksum? I don't know the standard that good, but is this behaviour described somewhere in an RFC?