From 3a7f41792cbeabe74589f1c592ddac7bd579e57c Mon Sep 17 00:00:00 2001
From: snow flurry <snow@datagirl.xyz>
Date: Mon, 21 Mar 2022 20:00:27 -0700
Subject: [PATCH] Remove extraneous error checking

No reason to run TUNGIFHEAD, there's no fail condition in TUNSIFHEAD.
---
 tun/tun_netbsd.go | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/tun/tun_netbsd.go b/tun/tun_netbsd.go
index 0a24ed0..580705e 100644
--- a/tun/tun_netbsd.go
+++ b/tun/tun_netbsd.go
@@ -145,18 +145,6 @@ func CreateTUN(name string, mtu int) (Device, error) {
 		return nil, fmt.Errorf("Unable to put into multi-af mode: %v", errno)
 	}
 
-	_, _, errno = unix.Syscall(
-		unix.SYS_IOCTL,
-		tunfile.Fd(),
-		uintptr(_TUNGIFHEAD),
-		uintptr(unsafe.Pointer(&ifheadmode)),
-	)
-
-	if errno != 0 || ifheadmode == 0 {
-		tunfile.Close()
-		return nil, fmt.Errorf("Unable to validate multi-af mode: %v", errno)
-	}
-
 	if err == nil && name == "tun" {
 		fname := os.Getenv("WG_TUN_NAME_FILE")
 		if fname != "" {