Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICMPv6 packets that don't transmit the entire payload can't get parsed #638

Closed
chayleaf opened this issue Jul 4, 2022 · 2 comments · Fixed by #807
Closed

ICMPv6 packets that don't transmit the entire payload can't get parsed #638

chayleaf opened this issue Jul 4, 2022 · 2 comments · Fixed by #807
Labels

Comments

@chayleaf
Copy link
Contributor

chayleaf commented Jul 4, 2022

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.

@chayleaf chayleaf changed the title ICMPv6 packets that don't transmit the entire payload get rejected ICMPv6 packets that don't transmit the entire payload can't get parsed Jul 4, 2022
@thvdveld
Copy link
Contributor

thvdveld commented Jul 7, 2022

How does this work with the checksum? I don't know the standard that good, but is this behaviour described somewhere in an RFC?

@chayleaf
Copy link
Contributor Author

chayleaf commented Jun 26, 2023

The spec says:

(c) Every ICMPv6 error message (type < 128) MUST include as much of
the IPv6 offending (invoking) packet (the packet that caused the
error) as possible without making the error message packet exceed
the minimum IPv6 MTU [IPv6].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants