This commit is contained in:
Arceliar 2018-03-04 10:56:46 -06:00
parent e7726cfb00
commit 478b80a07a
3 changed files with 6 additions and 9 deletions

View File

@ -2,7 +2,7 @@ package yggdrasil
import "os/exec"
import "unsafe"
//import "syscall"
import "golang.org/x/sys/unix"
import water "github.com/yggdrasil-network/water"
@ -44,7 +44,6 @@ func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int)
case iftapmode || ifname[:8] == "/dev/tap":
config = water.Config{DeviceType: water.TAP}
case !iftapmode || ifname[:8] == "/dev/tun":
//config = water.Config{DeviceType: water.TUN}
panic("TUN mode is not currently supported on this platform, please use TAP instead")
default:
panic("TUN/TAP name must be in format /dev/tunX or /dev/tapX")

View File

@ -41,4 +41,3 @@ const TUNSIFINFO = (0x80000000) | ((8 & 0x1fff) << 16) | uint32(byte('t'))<<8 |
const TUNGIFINFO = (0x40000000) | ((8 & 0x1fff) << 16) | uint32(byte('t'))<<8 | 92
const TUNSIFHEAD = (0x80000000) | ((4 & 0x1fff) << 16) | uint32(byte('t'))<<8 | 96
const SIOCAIFADDR_IN6 = (0x80000000) | ((4 & 0x1fff) << 16) | uint32(byte('i'))<<8 | 27

View File

@ -54,4 +54,3 @@ func (ti *tuninfo) setInfo(tun *tunDevice) {
const TUNSIFINFO = (0x80000000) | ((12 & 0x1fff) << 16) | uint32(byte('t'))<<8 | 91
const TUNGIFINFO = (0x40000000) | ((12 & 0x1fff) << 16) | uint32(byte('t'))<<8 | 92
const SIOCAIFADDR_IN6 = (0x80000000) | ((4 & 0x1fff) << 16) | uint32(byte('i'))<<8 | 27