diff --git a/tun/tun_netbsd.go b/tun/tun_netbsd.go index e5834c1..9c8a0fe 100644 --- a/tun/tun_netbsd.go +++ b/tun/tun_netbsd.go @@ -164,7 +164,7 @@ func CreateTUN(name string, mtu int) (Device, error) { uintptr(unsafe.Pointer(&ifheadmode)), ) - if errno != 0 || ifheadmode != 1 { + if errno != 0 || ifheadmode == 0 { tunfile.Close() return nil, fmt.Errorf("Unable to validate IFHEAD mode: %v (ifheadmode = %d)", errno, ifheadmode) }