enable DPLPMTUD on macOS dual-stack sockets (#4723)

* enable DPLPMTUD on macOS dual-stack sockets

https://datatracker.ietf.org/doc/draft-seemann-tsvwg-udp-fragmentation/
contains details on how IP fragmentation is handled on different
platforms.

* only enable DF on macOS Sequoia (and newer) dual-stack sockets

* fix macOS version numbers

* fix comment in MTU integration test

* skip dual-stack test on old macOS versions
This commit is contained in:
Marten Seemann
2024-12-01 14:50:49 +08:00
committed by GitHub
parent aed4d8df0c
commit a302d7ba4d
4 changed files with 155 additions and 38 deletions

View File

@@ -72,7 +72,7 @@ var _ = Describe("DPLPMTUD", func() {
defer proxy.Close()
// Make sure to use v4-only socket here.
// We can't reliably set the DF bit on dual-stack sockets on macOS.
// We can't reliably set the DF bit on dual-stack sockets on macOS before Sequoia (macOS 15).
udpConn, err := net.ListenUDP("udp4", &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 0})
Expect(err).ToNot(HaveOccurred())
defer udpConn.Close()