Fix some iface issues

This commit is contained in:
braginini
2022-09-07 21:59:01 +02:00
parent 660b2542d2
commit 5a504ee6be
4 changed files with 56 additions and 46 deletions

View File

@@ -2,7 +2,6 @@ package iface
import (
"errors"
"golang.zx2c4.com/wireguard/conn"
"math"
"os"
"syscall"
@@ -33,12 +32,6 @@ func WireguardModExists() bool {
return errors.Is(err, syscall.EINVAL)
}
func (w *WGIface) CreateNew(bind conn.Bind) error {
w.mu.Lock()
defer w.mu.Unlock()
return w.createWithUserspaceNew(bind)
}
// Create creates a new Wireguard interface, sets a given IP and brings it up.
// Will reuse an existing one.