mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-21 21:36:30 +03:00
Fix missing setupFD stubs
This commit is contained in:
@@ -6,6 +6,8 @@ package tun
|
||||
// The linux platform specific tun parts
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/vishvananda/netlink"
|
||||
wgtun "golang.zx2c4.com/wireguard/tun"
|
||||
)
|
||||
@@ -28,6 +30,11 @@ func (tun *TunAdapter) setup(ifname string, addr string, mtu uint64) error {
|
||||
return tun.setupAddress(addr)
|
||||
}
|
||||
|
||||
// Configures the "utun" adapter from an existing file descriptor.
|
||||
func (tun *TunAdapter) setupFD(fd int32, addr string, mtu uint64) error {
|
||||
return fmt.Errorf("setup via FD not supported on this platform")
|
||||
}
|
||||
|
||||
// Configures the TUN adapter with the correct IPv6 address and MTU. Netlink
|
||||
// is used to do this, so there is not a hard requirement on "ip" or "ifconfig"
|
||||
// to exist on the system, but this will fail if Netlink is not present in the
|
||||
|
||||
Reference in New Issue
Block a user