mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-07 04:20:12 +02:00
5f903d1fbf
- syscall is deprecated and is not kept up-to-date - each OS is inherently different hence the syscall being deprecated
12 lines
365 B
Go
12 lines
365 B
Go
package icmp
|
|
|
|
import (
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
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 windows.SetsockoptInt(windows.Handle(fd), windows.IPPROTO_IP, 14, 1)
|
|
}
|