aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun_freebsd.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-27 02:26:56 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-27 22:55:15 +0200
commit5079298ce2fb783ccfff83b4cf4af57c74ed2546 (patch)
tree76b9eee344c5d5be5491e8d1d167ce6e0547b236 /tun/tun_freebsd.go
parentDisappointing anti-sticky experiment (diff)
downloadwireguard-go-5079298ce2fb783ccfff83b4cf4af57c74ed2546.tar.xz
wireguard-go-5079298ce2fb783ccfff83b4cf4af57c74ed2546.zip
Disable broadcast mode on *BSD
Keeping it on makes IPv6 problematic and confuses routing daemons.
Diffstat (limited to 'tun/tun_freebsd.go')
-rw-r--r--tun/tun_freebsd.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/tun/tun_freebsd.go b/tun/tun_freebsd.go
index 435ff91..8c7bcdd 100644
--- a/tun/tun_freebsd.go
+++ b/tun/tun_freebsd.go
@@ -262,19 +262,6 @@ func CreateTUN(name string, mtu int) (TUNDevice, error) {
return nil, fmt.Errorf("error %s", errno.Error())
}
- // Set TUN iface to broadcast mode. TUN inferfaces on freebsd come up in point to point by default
- ifmodemode := unix.IFF_BROADCAST
- _, _, errno = unix.Syscall(
- unix.SYS_IOCTL,
- uintptr(tunfd),
- uintptr(_TUNSIFMODE),
- uintptr(unsafe.Pointer(&ifmodemode)),
- )
-
- if errno != 0 {
- return nil, fmt.Errorf("error %s", errno.Error())
- }
-
// Rename tun interface
// Open control socket