aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
Diffstat (limited to 'executor')
-rw-r--r--executor/common_linux.h8
-rw-r--r--executor/executor.h4
2 files changed, 11 insertions, 1 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 0b23d201e..ff043cb8a 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -394,10 +394,18 @@ static void snprintf_check(char* str, size_t size, const char* format, ...)
va_end(args);
}
+#ifdef SYZ_EXECUTOR
+extern bool flag_enable_net_dev;
+#endif
+
// We test in a separate namespace, which does not have any network devices initially (even lo).
// Create/up as many as we can.
static void initialize_netdevices(void)
{
+#ifdef SYZ_EXECUTOR
+ if (!flag_enable_net_dev)
+ return;
+#endif
unsigned i;
const char* devtypes[] = {"ip6gretap", "bridge", "vcan", "bond", "team"};
// If you extend this array, also update netdev_addr_id in vnet.txt.
diff --git a/executor/executor.h b/executor/executor.h
index d3632ae43..1c4bfc523 100644
--- a/executor/executor.h
+++ b/executor/executor.h
@@ -54,6 +54,7 @@ bool flag_cover;
bool flag_sandbox_privs;
sandbox_type flag_sandbox;
bool flag_enable_tun;
+bool flag_enable_net_dev;
bool flag_enable_fault_injection;
bool flag_collect_cover;
@@ -243,7 +244,8 @@ void parse_env_flags(uint64 flags)
else if (flags & (1 << 3))
flag_sandbox = sandbox_namespace;
flag_enable_tun = flags & (1 << 4);
- flag_enable_fault_injection = flags & (1 << 5);
+ flag_enable_net_dev = flags & (1 << 5);
+ flag_enable_fault_injection = flags & (1 << 6);
}
void receive_handshake()