Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go
This commit is contained in:
commit
d8d592787d
|
@ -46,7 +46,7 @@ var sockaddrCtlSize uintptr = 32
|
|||
|
||||
func CreateTUN(name string) (TUNDevice, error) {
|
||||
ifIndex := -1
|
||||
if (name != "utun") {
|
||||
if name != "utun" {
|
||||
fmt.Sscanf(name, "utun%d", &ifIndex)
|
||||
if ifIndex < 0 {
|
||||
return nil, fmt.Errorf("Interface name must be utun[0-9]*")
|
||||
|
|
|
@ -11,6 +11,7 @@ package main
|
|||
*/
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
@ -19,7 +20,6 @@ import (
|
|||
"net"
|
||||
"os"
|
||||
"strconv"
|
||||
"bytes"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
|
Loading…
Reference in a new issue