Fix missing setupFD stubs

This commit is contained in:
Neil Alexander 2023-08-17 14:08:03 +01:00
parent db9b57c052
commit fbc5f62add
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 26 additions and 0 deletions

View file

@ -5,6 +5,7 @@ package tun
import (
"encoding/binary"
"fmt"
"os/exec"
"strconv"
"strings"
@ -88,6 +89,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")
}
func (tun *TunAdapter) setupAddress(addr string) error {
var sfd int
var err error