feat(pmtud/tcp): use the TCP server with highest MSS to run MTU tests

This commit is contained in:
Quentin McGaw
2026-02-19 14:03:46 +00:00
parent fb85ae79d1
commit 8d86470905
10 changed files with 323 additions and 59 deletions
+7
View File
@@ -7,6 +7,13 @@ import (
"github.com/qdm12/gluetun/internal/pmtud/constants"
)
func HeaderLength(ipv4 bool) uint32 {
if ipv4 {
return constants.IPv4HeaderLength
}
return constants.IPv6HeaderLength
}
func HeaderV4(srcIP, dstIP netip.Addr, payloadLength uint32) []byte {
ipHeader := make([]byte, constants.IPv4HeaderLength)
const version byte = 4