aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_bsd.h
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@freebsd.org>2021-12-31 19:18:08 +0100
committerGitHub <noreply@github.com>2021-12-31 19:18:08 +0100
commite1768e9c12f6025bdcfe8a957808608d499692b8 (patch)
treead5f7bff14bcd0e2a0f92cacb5e0e09599f4e110 /executor/common_bsd.h
parent36bd2e4865254b8f17e4ab00a89d976d6f71d04b (diff)
executor: bump on FreeBSD the maximum number of tun devices to 256 (#2956)
syz-execprog now uses twice the number of CPU cores as the number of processes. Each process might use a tun device. So bump the maximum number of tun devices to the maximum of 256, which allows syz-execprog to run with default settings on systems with up to 128 cores.
Diffstat (limited to 'executor/common_bsd.h')
-rw-r--r--executor/common_bsd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/executor/common_bsd.h b/executor/common_bsd.h
index 633eadccc..7c6ad8efd 100644
--- a/executor/common_bsd.h
+++ b/executor/common_bsd.h
@@ -131,6 +131,11 @@ static int tunfd = -1;
// Increased number of tap and tun devices if image script is used
#define MAX_TUN 64
+#elif GOOS_freebsd
+// The maximum number of tun devices is limited by the way IP addresses
+// are assigned. Based on this, the limit is 256.
+#define MAX_TUN 256
+
#else
// Maximum number of tun devices in the default install.
#define MAX_TUN 4