hotfix(pmtud): lower min MTU to MSS-matching-MTU minus 100 in case MSS is very small

This commit is contained in:
Quentin McGaw
2026-02-19 22:39:24 +00:00
parent 2192874de8
commit ea87c0a2aa
2 changed files with 21 additions and 14 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ func PathMTUDiscover(ctx context.Context, icmpAddrs []netip.Addr, tcpAddrs []net
minMTU = constants.MinIPv6MTU
}
if icmpSuccess {
const mtuMargin = 300
const mtuMargin = 150
minMTU = max(maxPossibleMTU-mtuMargin, minMTU)
}
mtu, err = tcp.PathMTUDiscover(ctx, tcpAddrs, minMTU, maxPossibleMTU, tryTimeout, fw, logger)