executor: connect tun and bpf devices on OpenBSD
diff --git a/executor/defs.h b/executor/defs.h
index 1a2c296..d949da2 100644
--- a/executor/defs.h
+++ b/executor/defs.h
@@ -130,7 +130,7 @@
 
 #if GOARCH_amd64
 #define GOARCH "amd64"
-#define SYZ_REVISION "90be3ee14a0e5373833cca67711a81b67f77813d"
+#define SYZ_REVISION "395c0a9b96ce31054c22d62cd7b0edfc612912e5"
 #define SYZ_EXECUTOR_USES_FORK_SERVER 1
 #define SYZ_EXECUTOR_USES_SHMEM 1
 #define SYZ_PAGE_SIZE 4096
diff --git a/sys/openbsd/dev_bpf.txt b/sys/openbsd/dev_bpf.txt
index 9defb0b..01c0756 100644
--- a/sys/openbsd/dev_bpf.txt
+++ b/sys/openbsd/dev_bpf.txt
@@ -3,6 +3,7 @@
 
 include <sys/types.h>
 include <sys/time.h>
+include <sys/fcntl.h>
 include <sys/ioctl.h>
 include <net/bpf.h>
 include <net/if.h>
@@ -28,7 +29,7 @@
 ioctl$BIOCSDIRFILT(fd fd_bpf, cmd const[BIOCSDIRFILT], arg ptr[in, int32])
 ioctl$BIOCSDLT(fd fd_bpf, cmd const[BIOCSDLT], arg ptr[in, int32])
 ioctl$BIOCSETF(fd fd_bpf, cmd const[BIOCSETF], arg ptr[in, bpf_program])
-ioctl$BIOCSETIF(fd fd_bpf, cmd const[BIOCSETIF], arg ptr[in, ifreq])
+ioctl$BIOCSETIF(fd fd_bpf, cmd const[BIOCSETIF], arg ptr[in, ifreq_name])
 ioctl$BIOCSETWF(fd fd_bpf, cmd const[BIOCSETWF], arg ptr[in, bpf_program])
 ioctl$BIOCSFILDROP(fd fd_bpf, cmd const[BIOCSFILDROP], arg ptr[in, int32])
 ioctl$BIOCSHDRCMPLT(fd fd_bpf, cmd const[BIOCSHDRCMPLT], arg ptr[in, int32])
@@ -68,6 +69,14 @@
 	ifr_ifru	ifr_ifru
 }
 
+ifreq_name {
+	ifr_name	stringnoz["tap"]
+	tapindex	proc['0', 1, int8]
+	z		const[0, int8]
+} [size[IFREQ_SIZE]]
+
+define IFREQ_SIZE	sizeof(struct ifreq)
+
 ifr_ifru [
 	ifru_addr	sockaddr_storage
 	ifru_dstaddr	sockaddr_storage
diff --git a/sys/openbsd/dev_bpf_amd64.const b/sys/openbsd/dev_bpf_amd64.const
index f97e86a..310c7b0 100644
--- a/sys/openbsd/dev_bpf_amd64.const
+++ b/sys/openbsd/dev_bpf_amd64.const
@@ -1,5 +1,5 @@
 # AUTOGENERATED FILE
-# AT_FDCWD is not set
+AT_FDCWD = 18446744073709551516
 BIOCFLUSH = 536887912
 BIOCGBLEN = 1074020966
 BIOCGDIRFILT = 1074020988
@@ -25,5 +25,6 @@
 BIOCSRTIMEOUT = 2148549229
 BIOCVERSION = 1074020977
 IFNAMSIZ = 16
+IFREQ_SIZE = 32
 SYS_ioctl = 54
 SYS_openat = 321
diff --git a/sys/openbsd/gen/amd64.go b/sys/openbsd/gen/amd64.go
index 5f649b8..e82df41 100644
--- a/sys/openbsd/gen/amd64.go
+++ b/sys/openbsd/gen/amd64.go
@@ -104,17 +104,6 @@
 		&ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
 		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
 	}}},
-	{Key: StructKey{Name: "ifr_ifru"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ifr_ifru", IsVarlen: true}, Fields: []Type{
-		&UnionType{Key: StructKey{Name: "sockaddr_storage"}, FldName: "ifru_addr"},
-		&UnionType{Key: StructKey{Name: "sockaddr_storage"}, FldName: "ifru_dstaddr"},
-		&UnionType{Key: StructKey{Name: "sockaddr_storage"}, FldName: "ifru_broadaddr"},
-		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "ifru_flags", TypeSize: 2}}},
-		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ifru_metric", TypeSize: 4}}},
-		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "ifru_vnetid", TypeSize: 8}}},
-		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "ifru_media", TypeSize: 8}}},
-		&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "ifru_data", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
-		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ifru_index", TypeSize: 4}}},
-	}}},
 	{Key: StructKey{Name: "ifr_ifru", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ifr_ifru", ArgDir: 1, IsVarlen: true}, Fields: []Type{
 		&UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}, FldName: "ifru_addr"},
 		&UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}, FldName: "ifru_dstaddr"},
@@ -126,14 +115,16 @@
 		&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "ifru_data", TypeSize: 8, ArgDir: 1}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
 		&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ifru_index", TypeSize: 4, ArgDir: 1}}},
 	}}},
-	{Key: StructKey{Name: "ifreq"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ifreq", IsVarlen: true}, Fields: []Type{
-		&BufferType{TypeCommon: TypeCommon{TypeName: "filename", FldName: "ifr_name", TypeSize: 16}, Kind: 3},
-		&UnionType{Key: StructKey{Name: "ifr_ifru"}, FldName: "ifr_ifru"},
-	}}},
 	{Key: StructKey{Name: "ifreq", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ifreq", ArgDir: 1, IsVarlen: true}, Fields: []Type{
 		&BufferType{TypeCommon: TypeCommon{TypeName: "filename", FldName: "ifr_name", TypeSize: 16, ArgDir: 1}, Kind: 3},
 		&UnionType{Key: StructKey{Name: "ifr_ifru", Dir: 1}, FldName: "ifr_ifru"},
 	}}},
+	{Key: StructKey{Name: "ifreq_name"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ifreq_name", TypeSize: 32}, Fields: []Type{
+		&BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "ifr_name", TypeSize: 3}, Kind: 2, Values: []string{"tap"}, NoZ: true},
+		&ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "tapindex", TypeSize: 1}}, ValuesStart: 48, ValuesPerProc: 1},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}},
+		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 27}}, IsPad: true},
+	}}},
 	{Key: StructKey{Name: "iovec_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "iovec_in", TypeSize: 16}, Fields: []Type{
 		&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "addr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
 		&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
@@ -972,7 +963,7 @@
 	{NR: 54, Name: "ioctl$BIOCSETIF", CallName: "ioctl", Args: []Type{
 		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf", FldName: "fd", TypeSize: 4}},
 		&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2149597804},
-		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ifreq"}}},
+		&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ifreq_name"}}},
 	}},
 	{NR: 54, Name: "ioctl$BIOCSETWF", CallName: "ioctl", Args: []Type{
 		&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf", FldName: "fd", TypeSize: 4}},
@@ -2159,6 +2150,7 @@
 	{Name: "GETVAL", Value: 5},
 	{Name: "GETZCNT", Value: 7},
 	{Name: "IFNAMSIZ", Value: 16},
+	{Name: "IFREQ_SIZE", Value: 32},
 	{Name: "IPC_CREAT", Value: 512},
 	{Name: "IPC_EXCL", Value: 1024},
 	{Name: "IPC_NOWAIT", Value: 2048},
@@ -2611,4 +2603,4 @@
 	{Name: "__MAP_NOREPLACE", Value: 2048},
 }
 
-const revision_amd64 = "90be3ee14a0e5373833cca67711a81b67f77813d"
+const revision_amd64 = "395c0a9b96ce31054c22d62cd7b0edfc612912e5"