Skip to content

Commit 9265521

Browse files
committed
address PR comments:
* add a comment explaining why we need to include ipv6 header len
1 parent 9f74ded commit 9265521

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dc/s2n-quic-dc/src/msg/segment.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const MAX_TOTAL_IPV4: u16 = if cfg!(target_os = "linux") {
4646

4747
/// The maximum payload allowed in sendmsg calls using IPv6+UDP
4848
const MAX_TOTAL_IPV6: u16 = if cfg!(target_os = "linux") {
49+
// The IPV6_HEADER_LEN is required in this calculation to accomodate older kernels (such as kernel 5.10)
4950
u16::MAX - IPV6_HEADER_LEN - UDP_HEADER_LEN
5051
} else {
5152
9001 - IPV6_HEADER_LEN - UDP_HEADER_LEN

0 commit comments

Comments
 (0)