mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-06 20:10:11 +02:00
feat(pmtud/tcp): use the TCP server with highest MSS to run MTU tests
This commit is contained in:
@@ -129,8 +129,8 @@ func runTest(ctx context.Context, dst netip.AddrPort, mtu uint32,
|
||||
if firstReplyHeader.options.mss != 0 {
|
||||
// If the server sent an MSS option, make sure our test packet is not larger than that MSS.
|
||||
tcpDataLength := getPayloadLength(mtu, dst) - constants.BaseTCPHeaderLength
|
||||
if tcpDataLength > uint32(firstReplyHeader.options.mss) {
|
||||
diff := tcpDataLength - uint32(firstReplyHeader.options.mss)
|
||||
if tcpDataLength > firstReplyHeader.options.mss {
|
||||
diff := tcpDataLength - firstReplyHeader.options.mss
|
||||
minMTU := constants.MinIPv4MTU
|
||||
if dst.Addr().Is6() {
|
||||
minMTU = constants.MinIPv6MTU
|
||||
|
||||
Reference in New Issue
Block a user