mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-17 00:44:10 +02:00
chore(pmtud): remove calls to syscall in favor of unix and windows
- syscall is deprecated and is not kept up-to-date - each OS is inherently different hence the syscall being deprecated
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package icmp
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func setDontFragment(fd uintptr) (err error) {
|
||||
return syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IP,
|
||||
syscall.IP_MTU_DISCOVER, syscall.IP_PMTUDISC_PROBE)
|
||||
return unix.SetsockoptInt(int(fd), unix.IPPROTO_IP,
|
||||
unix.IP_MTU_DISCOVER, unix.IP_PMTUDISC_PROBE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user