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

Add constraint for UDP's length field #134

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

lemmy
Copy link
Contributor

@lemmy lemmy commented Mar 18, 2024

https://www.ietf.org/rfc/rfc768.txt

Length is the length in octets of this user datagram including this header and the data. (This means the minimum value of the length is eight.)

https://en.wikipedia.org/wiki/User_Datagram_Protocol#UDP_datagram_structure

This field specifies the length in bytes of the UDP header and UDP data. The minimum length is 8 bytes, the length of the header. The field size sets a theoretical limit of 65,535 bytes (8-byte header + 65,527 bytes of data) for a UDP datagram. However, the actual limit for the data length, which is imposed by the underlying IPv4 protocol, is 65,507 bytes (65,535 bytes − 8-byte UDP header − 20-byte IP header).[5]
Using IPv6 jumbograms it is possible to have UDP datagrams of size greater than 65,535 bytes. The length field is set to zero if the length of the UDP header plus UDP data is greater than 65,535.[6]

https://www.ietf.org/rfc/rfc768.txt

> Length  is the length  in octets  of this user datagram  including  this header  and the data.   (This  means  the minimum value of the length is eight.)

https://en.wikipedia.org/wiki/User_Datagram_Protocol#UDP_datagram_structure

> This field specifies the length in bytes of the UDP header and UDP data. The minimum length is 8 bytes, the length of the header. The field size sets a theoretical limit of 65,535 bytes (8-byte header + 65,527 bytes of data) for a UDP datagram. However, the actual limit for the data length, which is imposed by the underlying [IPv4](https://en.wikipedia.org/wiki/IPv4) protocol, is 65,507 bytes (65,535 bytes − 8-byte UDP header − 20-byte [IP header](https://en.wikipedia.org/wiki/IPv4_header)).[[5]](https://en.wikipedia.org/wiki/User_Datagram_Protocol#cite_note-5)
Using IPv6 [jumbograms](https://en.wikipedia.org/wiki/Jumbogram) it is possible to have UDP datagrams of size greater than 65,535 bytes. The length field is set to zero if the length of the UDP header plus UDP data is greater than 65,535.[[6]](https://en.wikipedia.org/wiki/User_Datagram_Protocol#cite_note-rfc2675-6)
@tahina-pro tahina-pro merged commit 262e932 into project-everest:master Mar 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants