From 738d58ade0f41fb8ab33066dc0dd486d86383ef5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 17 May 2018 19:57:54 +0200 Subject: pkg/csource: minimize netdevices and net reset Add separate options to minimize netdevices setup and net namespace reset. Fixes #581 --- pkg/csource/common.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkg/csource/common.go') diff --git a/pkg/csource/common.go b/pkg/csource/common.go index 27caac40d..e8fce42a6 100644 --- a/pkg/csource/common.go +++ b/pkg/csource/common.go @@ -92,6 +92,12 @@ func defineList(p *prog.Prog, opts Options) ([]string, error) { if opts.EnableCgroups { defines = append(defines, "SYZ_ENABLE_CGROUPS") } + if opts.EnableNetdev { + defines = append(defines, "SYZ_ENABLE_NETDEV") + } + if opts.ResetNet { + defines = append(defines, "SYZ_RESET_NET_NAMESPACE") + } if opts.UseTmpDir { defines = append(defines, "SYZ_USE_TMP_DIR") } @@ -100,9 +106,6 @@ func defineList(p *prog.Prog, opts Options) ([]string, error) { } if opts.WaitRepeat { defines = append(defines, "SYZ_WAIT_REPEAT") - // TODO(dvyukov): this should have a separate option, - // but for now it's bundled with WaitRepeat. - defines = append(defines, "SYZ_RESET_NET_NAMESPACE") } if opts.Debug { defines = append(defines, "SYZ_DEBUG") -- cgit mrf-deployment