diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-07-13 12:46:32 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-07-13 12:46:32 +0200 |
| commit | 92a4950507d9d15be9541491300b2201433f6814 (patch) | |
| tree | d31d41bddc32bd0857187d9b71664f04a7548989 /executor/common_linux.h | |
| parent | fcdb43e97de52b6eab494a8423c350ca45602d88 (diff) | |
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.
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 8 |
1 files changed, 8 insertions, 0 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. |
