Keeping it on makes IPv6 problematic and confuses routing daemons.
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
return nil, err
}
- // Set TUN iface to broadcast mode
- ifmodemode := unix.IFF_BROADCAST
- _, _, errno := unix.Syscall(
- unix.SYS_IOCTL,
- uintptr(tunfile.Fd()),
- uintptr(_TUNSIFMODE),
- uintptr(unsafe.Pointer(&ifmodemode)),
- )
-
- if errno != 0 {
- return nil, fmt.Errorf("error %s", errno.Error())
- }
-
tun, err := CreateTUNFromFile(tunfile, mtu)
if err == nil && name == "tun" {