Merge branch 'develop' into future

This commit is contained in:
Neil 2023-09-03 12:58:55 +01:00 committed by GitHub
commit 6ab0639b82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 94 additions and 8 deletions

View file

@ -6,6 +6,7 @@ package tun
import (
"bytes"
"errors"
"fmt"
"log"
"net"
@ -50,6 +51,11 @@ func (tun *TunAdapter) setup(ifname string, addr string, mtu uint64) error {
})
}
// 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")
}
// Sets the MTU of the TUN adapter.
func (tun *TunAdapter) setupMTU(mtu uint64) error {
if tun.iface == nil || tun.Name() == "" {