mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-15 04:50:56 +02:00
be92aa2ac4
- Existing option `WIREGUARD_MTU` , if set, disables PMTUD and is used - New option `PMTUD_ICMP_ADDRESSES=1.1.1.1,8.8.8.8` and `PMTUD_TCP_ADDRESSES=1.1.1.1:443,8.8.8.8:443` - ICMP PMTUD now targets external-by-default IP addresses - New TCP PMTUD (binary search only) as a second MTU confirmation and fallback mechanism. - Force set TCP MSS to MTU - IP header - TCP base header - "magic 20 bytes" 🎆 - Fix #3108
12 lines
348 B
Go
12 lines
348 B
Go
package icmp
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
func setDontFragment(fd uintptr) (err error) {
|
|
// https://docs.microsoft.com/en-us/troubleshoot/windows/win32/header-library-requirement-socket-ipproto-ip
|
|
// #define IP_DONTFRAGMENT 14 /* don't fragment IP datagrams */
|
|
return syscall.SetsockoptInt(syscall.Handle(fd), syscall.IPPROTO_IP, 14, 1)
|
|
}
|