From 92a4950507d9d15be9541491300b2201433f6814 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 13 Jul 2018 12:46:32 +0200 Subject: pkg/host: add "network devices" feature Linux executor sets up some network devices for testing, detect when that's supported on the machine and don't do it if it's not supported. --- pkg/csource/linux_common.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/csource/linux_common.go') diff --git a/pkg/csource/linux_common.go b/pkg/csource/linux_common.go index 27b09e8be..32b65bb70 100644 --- a/pkg/csource/linux_common.go +++ b/pkg/csource/linux_common.go @@ -538,8 +538,16 @@ 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 + 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"}; const char* devnames[] = {"lo", "sit0", "bridge0", "vcan0", "tunl0", -- cgit mrf-deployment