mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-20 19:04:11 +02:00
feat(pmtud/tcp): use the TCP server with highest MSS to run MTU tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user